/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root {
    --hacker-green: #00ff41;
    --hacker-dark: #000000;
    --hacker-glow: rgba(0, 255, 65, 0.4);
    --text-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

/* =========================================
   2. ESTRUCTURA GLOBAL (Layout)
   ========================================= */




body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 4.5)), url(matrix.jpg);

    background-color: var(--hacker-dark);
    color: var(--hacker-green);
    min-height: 100vh;
    display: flex;
    flex-direction: column; 
    align-items: center;
    padding: 20px;
}

/* --- Estilos del Encabezado/Título --- */
.main-header {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    width: 100%;
    max-width: 1200px;
}

.hacker-title {
    font-size: 2.5rem;
    color: var(--hacker-green);
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--hacker-glow);
}

.system-status {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.7rem;
    color: #444; 
    margin-bottom: 5px;
}

.status-node {
    border-left: 2px solid var(--hacker-green);
    padding-left: 8px;
}

.main-header::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hacker-green), transparent);
    margin-top: 15px;
    opacity: 0.5;
}

/* --- Contenedor Principal --- */
#container {
    flex: 1; 
    display: flex;
    flex-direction: row; 
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    width: 100%;
    border: 1px solid var(--hacker-green);
    padding: 50px;
    margin: 40px 0;
    background-color: rgba(0, 255, 65, 0.02);
    box-shadow: inset 0 0 20px rgba(0, 255, 65, 0.05);
}

/* =========================================
   3. ELEMENTOS VISUALES (Imagen)
   ========================================= */
#container img {
    max-width: 450px;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* =========================================
   4. FORMULARIO Y INPUTS
   ========================================= */
.coin-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 420px;
}

.coin-input-container {
    display: flex;
    flex-direction: column;
}

label {
    padding-top: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.coin-input {
    background-color: transparent;
    border: 1px solid var(--hacker-green);
    color: var(--hacker-green);
    padding: 14px;
    font-size: 1rem;
    outline: none;
    width: 100%;
    transition: all 0.3s ease;
}

.coin-input:focus {
    box-shadow: 0 0 10px var(--hacker-glow);
    background-color: rgba(0, 255, 65, 0.05);
}

select option {
    background-color: var(--hacker-dark);
    color: var(--hacker-green);
}

/* =========================================
   5. BOTÓN Y RESULTADOS
   ========================================= */
#formulario-btn {
    margin-top: 10px;
    background-color: var(--hacker-green);
    color: var(--hacker-dark);
    border: none;
    padding: 14px;
    width: 100%;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#formulario-btn:hover {
    background-color: #0dcc30;
    box-shadow: 0 0 25px var(--hacker-green);
    transform: translateY(-2px);
    animation: title-glow 1.5s infinite; /* Reutiliza el brillo del título */
}

#coin-info {
    margin-top: 10px;
    width: 100%;
}

.border-info {
    border: 1px dashed var(--hacker-green);
    padding: 20px;
}

.info {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.price {
    color: var(--text-white);
    font-weight: bold;
}

/* =========================================
   6. FOOTER (Estilo Hacker)
   ========================================= */
#hacker-image {
    max-width: 400px; /* Tamaño máximo ajustado para PC */
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px var(--hacker-green)); /* Brillo neón extra */
    opacity: 0.9;
    /* Asegura que no se estire demasiado si el panel derecho es corto */
    align-self: center; 
}


.hacker-footer {
    width: 100%;
    max-width: 1200px;
    border-top: 1px solid var(--hacker-green);
    padding: 30px 10px;
    text-align: center;
    margin-top: auto;
}

.terminal-prefix {
    color: #666;
    margin-right: 5px;
}

.dev-name {
    color: var(--text-white);
    font-weight: bold;
}

.dev-name::after {
    content: "|";
    color: var(--hacker-green);
    margin-left: 5px;
    animation: blink 1s step-end infinite;
}

.github-link {
    color: var(--hacker-green);
    text-decoration: none;
    margin-left: 15px;
    padding: 5px 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.github-link:hover {
    border: 1px dashed var(--hacker-green);
    background: rgba(0, 255, 65, 0.05);
}


.lds-hourglass,
.lds-hourglass:after {
  box-sizing: border-box;
}
.lds-hourglass {
  display: flex;
  padding-left: 100px;
  width: 150px;
  height: 150px;
  
}
.lds-hourglass:after {
  content: " ";
  display: block;
  border-radius: 50%;
  width: 0;
  height: 0;
  margin: 8px;
  box-sizing: border-box;
  border: 32px solid currentColor;
  border-color: currentColor transparent currentColor transparent;
  animation: lds-hourglass 1.2s infinite;
}
@keyframes lds-hourglass {
  0% {
    transform: rotate(0);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }
  50% {
    transform: rotate(900deg);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  100% {
    transform: rotate(1800deg);
  }
}



/* =========================================
   7. ANIMACIONES Y RESPONSIVE
   ========================================= */
@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes title-glow {
    0%, 100% { text-shadow: 0 0 10px var(--hacker-glow); }
    50% { text-shadow: 0 0 20px var(--hacker-green), 0 0 30px var(--hacker-green); }
}

.hacker-title:hover {
    animation: title-glow 1.5s infinite;
}

@media (max-width: 950px) {
    #container {
        flex-direction: column;
        padding: 30px;
        gap: 30px;
    }

    #container img {
        max-width: 300px;
    }

    .coin-container {
        max-width: 100%;
    }

    .hacker-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    #hacker-image {
        display: none; 
    }
}