:root {
    --color-tema: #4caf50;
    --color-hover: #66bb6a;
    --nexo-font: 'Montserrat', sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--fondo-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

header {
    text-align: center;
    width: 100%;
    margin-top: 5rem;
}

.btn-back {
    display: inline-block;
    margin: 2rem auto 1rem auto;
    padding: 10px 20px;
    background-color: var(--fondo-card);
    border: 2px solid var(--borde-card);
    border-radius: 8px;
    text-decoration: none;
    color: var(--texto-negro);
    font-weight: 700;
    transition: all 0.2s;
}

.btn-back:hover {
    background-color: var(--color-tema);
    color: #fff;
    border-color: var(--color-tema);
    transform: translateY(-2px);
}

.page-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 1.5rem auto 0.8rem auto;
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: var(--color-tema);
}

.intro-text {
    font-size: 1rem;
    color: var(--texto-gris);
    margin-bottom: 2.5rem;
    text-align: center;
}

.test-container {
    max-width: 850px;
    margin: 0 auto 2.5rem auto;
    padding: 0 20px;
}

.results-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.metric-box {
    background-color: var(--fondo-card);
    border: 2px solid var(--borde-card);
    border-radius: 12px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    box-shadow: var(--sombra-industrial);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--texto-gris);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.value-display {
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-tema);
}

.value-display.peak {
    color: #ff6b35;
}

.verdict-box {
    grid-column: 1 / -1;
}

.verdict-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--texto-negro);
    padding: 1rem;
}

.capture-zone {
    background-color: var(--fondo-card);
    border: 3px dashed var(--borde-card);
    border-radius: 16px;
    padding: 3rem 1.5rem;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.capture-zone:hover {
    border-color: var(--color-tema);
    background-color: var(--fondo-card-hover, #f1f8f4);
}

.zone-content {
    width: 100%;
}

.icon-mouse {
    font-size: 3rem;
    margin-bottom: 0.8rem;
}

.zone-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--texto-negro);
    margin-bottom: 0.8rem;
}

.zone-content p {
    font-size: 1rem;
    color: var(--texto-gris);
    margin-bottom: 2rem;
}

.graph-bar {
    width: 100%;
    max-width: 500px;
    height: 40px;
    background-color: #e0e0e0;
    border-radius: 20px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.graph-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    transition: width 0.1s;
}

.info-note {
    background-color: var(--fondo-card);
    border-left: 4px solid var(--color-tema);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.info-note p {
    margin: 0;
    color: var(--texto-gris);
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-note strong {
    color: var(--texto-negro);
}

body.dark-mode {
    --color-tema: #66bb6a;
    --fondo-card-hover: #1a1a1a;
}

body.dark-mode .page-title {
    color: var(--color-tema);
}

body.dark-mode .intro-text {
    color: #aaa;
}

body.dark-mode .metric-box,
body.dark-mode .capture-zone,
body.dark-mode .info-note {
    background-color: #27272a;
    border-color: #444;
}

body.dark-mode .zone-content h3,
body.dark-mode .verdict-display {
    color: #fff;
}

body.dark-mode .zone-content p,
body.dark-mode .info-note p {
    color: #aaa;
}

body.dark-mode .info-note strong {
    color: #fff;
}

body.dark-mode .graph-bar {
    background-color: #3a3a3a;
}

body.dark-mode .btn-back {
    background-color: #27272a;
    border-color: #555;
    color: #fff;
}

body.dark-mode .btn-back:hover {
    background-color: var(--color-tema);
    color: #000;
    border-color: var(--color-tema);
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }
    
    .results-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .value-display {
        font-size: 2rem;
    }
    
    .capture-zone {
        padding: 3rem 1.5rem;
        min-height: 300px;
    }
    
    .icon-mouse {
        font-size: 3rem;
    }
    
    .zone-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        margin-top: 3rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .intro-text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .metric-box {
        padding: 1.5rem 1rem;
        min-height: 140px;
    }
    
    .value-display {
        font-size: 1.8rem;
    }
    
    .label {
        font-size: 0.75rem;
    }
    
    .capture-zone {
        padding: 2rem 1rem;
        min-height: 250px;
    }
    
    .zone-content h3 {
        font-size: 1.3rem;
    }
    
    .zone-content p {
        font-size: 0.9rem;
    }
}
