:root {
    --primary: #0ea5e9;
    --primary-hover: #0284c7;
    --bg-main: #020617;
    --bg-card: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #10b981;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(15, 23, 42, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    background-image:
        radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.15) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.1) 0, transparent 50%);
    background-attachment: fixed;
    padding-bottom: 4rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    backdrop-filter: blur(20px);
    background: var(--glass);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 3px;
    display: inline-block;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
    filter: brightness(1.1);
}

.main-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem 0 2rem;
}

.main-header h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.main-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s, border-color 0.3s;
}

.survey-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.survey-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.8rem;
}

input,
select,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    padding: 1rem;
    font-size: 1rem;
    color: #ffffff;
    /* Texto blanco para legibilidad */
    border-radius: 0.8rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.question-block {
    background: rgba(15, 23, 42, 0.4);
    padding: 2rem;
    border-radius: 1.25rem;
    margin-top: 1.5rem;
    position: relative;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
}

.grid-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    background: linear-gradient(135deg, var(--primary), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* RESPONSIVENESS */

/* Tablets and below */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2.5rem;
    }

    .main-header {
        padding: 2rem 0;
    }

    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .survey-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Previene zoom automático en iOS y asegura legibilidad */
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    nav {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .main-header h1 {
        font-size: 2rem;
        letter-spacing: -0.02em;
    }

    .main-header p {
        font-size: 0.95rem;
    }

    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 0.9rem;
    }

    .grid-results {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    header[style*="display: flex"] {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        gap: 1.5rem;
    }

    .stat-card {
        width: 100%;
        padding: 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    /* Evitar que el texto se encoja en las preguntas */
    .form-group label {
        font-size: 1rem;
        line-height: 1.4;
    }
}