/* Licencia Armas - Diseño Moderno y Elegante */

/* Variables de diseño */
:root {
    --bg-color: #0a1428;
    --bg-secondary: #1a2d47;
    --text-color: #e2e8f0;
    --text-secondary: #cbd5e1;
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --accent: #f97316;
    --accent-light: #fb923c;
    --success: #10b981;
    --danger: #ef4444;
    --card-bg: #152238;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.5);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

/* Elementos básicos */
html {
    width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Canvas para confetti */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
}

/* Loader */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-container.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(6, 182, 212, 0.2);
    border-top: 4px solid var(--primary);
    border-right: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header moderno */
header {
    background: rgba(10, 20, 40, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    width: 100%;
}

header .container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

header .logo {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

nav {
    align-items: center;
    display: flex;
    gap: 24px;
    line-height: 3;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--accent);
}

nav .nav-btn-exam:hover {
    color: black;
}

nav a:not(.nav-btn-exam)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transition: width 0.3s;
}

nav a:not(.nav-btn-exam):hover::after {
    width: 100%;
}

.nav-btn-exam {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    padding: 0 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    text-decoration: none;
    display: inline-block;
}

.nav-btn-exam:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
    transform: translateY(-2px);
}

.btn-exam {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    text-decoration: none;
    display: inline-block;
    }
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Sticky Header Container */
.sticky-header-container {
    position: sticky;
    top: 60px;
    z-index: 99;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    transition: all 0.3s ease;
}

.sticky-header-container.scrolled {
    background: rgba(10, 20, 40, 0.95);
    backdrop-filter: blur(10px);
}

/* Sección del título principal */
.main-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("../images/tema-1.jpg") center;
    background-size: 100%;
    background-attachment: fixed;
    background-position-y: -340px;
    border: none;
    transition: all 0.3s ease;
    margin: 0;
    width: 100%;
    position: relative;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

.main-header > * {
    position: relative;
    z-index: 2;
}

.main-header.shrink {
    padding: 15px 20px;
}

.main-header.shrink h1 {
    font-size: 1.3rem;
    margin: 24px 0 5px 0;
}

.main-header.shrink p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.85;
}

.main-header h1 {
    color: #e2e8f0;
    font-size: 2.5rem;
    margin: 0 auto 0 auto;
    max-width: 1024px;
    font-weight: 800;
    text-align: left;
    transition: all 0.3s ease;
    text-shadow:
        2px 2px 4px rgba(0, 0, 0, 0.7),
        0px 0px 20px rgba(6, 182, 212, 0.3);
    letter-spacing: 1px;
}

.main-header p {
    color: #cbd5e1;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 auto 20px auto;
    max-width: 1024px;
    text-align: left;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.5px;
}

/* Grid de temas */
.theme-grid {
    margin: 24px;
    border-top: 1px solid rgba(6, 182, 212, 0.15);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding-top 0.3s ease, margin-top 0.3s ease;
    opacity: 1;
}

.theme-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.theme-item:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
}

.theme-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.theme-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 500;
}

.main-header.shrink .theme-grid {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}


/* Títulos generales */
h1, h2 {
    color: var(--text-color);
    font-weight: 600;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

/* Stats Header */
.stats-header {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(249, 115, 22, 0.04) 100%);
    padding: 18px 20px;
    border-top: 1px solid rgba(6, 182, 212, 0.1);
    border-bottom: 1px solid rgba(6, 182, 212, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    width: 100%;
    margin: 0;
    transition: all 0.3s ease;
}

/* Barra de Progreso */
.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
}

.progress-bar-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.progress-bar-segments {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 2px;
    width: 60%;
}

.progress-segment {
    aspect-ratio: 1;
    border-radius: 0;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-segment.pending {
    background-color: rgba(107, 114, 128, 0.3);
}

.progress-segment.completed {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: none;
}

.progress-segment:hover {
    opacity: 0.8;
}

.progress-segment.completed:hover {
    opacity: 0.85;
}

.progress-segment.correct {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: none;
}

.progress-segment.correct:hover {
    opacity: 0.85;
}

.progress-segment.incorrect {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    box-shadow: none;
}

.progress-segment.incorrect:hover {
    opacity: 0.85;
}

@keyframes highlight {
    0% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
    }
    50% {
        background-color: rgba(6, 182, 212, 0.2);
        box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
    }
    100% {
        background-color: transparent;
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

.progress-bar-label {
    text-align: center;
}

#progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Botón Reordenar en Nav */
.nav-btn-reorder {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.nav-btn-reorder:hover {
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(21, 34, 56, 0.8) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 450px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.15);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-warning {
    color: var(--danger) !important;
    font-weight: 600;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(6, 182, 212, 0.15);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-modal-cancel {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.btn-modal-cancel:hover {
    background: rgba(107, 114, 128, 0.3);
    border-color: rgba(107, 114, 128, 0.5);
}

.btn-modal-confirm {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-modal-confirm:hover {
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
}

/* Modal de Éxito */
.modal-success {
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.modal-header-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.modal-icon-success {
    font-size: 3rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.modal-header-success h2 {
    color: var(--success);
    margin: 0;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem !important;
    margin: 0 !important;
}

.btn-modal-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-modal-success:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

/* Modal de Fallo */
.modal-failure {
    border: 2px solid rgba(249, 115, 22, 0.3);
}

.modal-header-failure {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.05) 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.modal-icon-failure {
    font-size: 3rem;
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-header-failure h2 {
    color: var(--accent);
    margin: 0;
}

.modal-tip {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 12px;
}

.btn-modal-failure {
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
    color: white;
}

.btn-modal-failure:hover {
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}

/* Footer single button */
.modal-footer-single {
    justify-content: center;
}

/* Sección de Resultados */
.results-section {
    margin-top: 40px;
    animation: slideIn 0.4s ease;
}

.results-section h2 {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(21, 34, 56, 0.5) 100%);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.result-item.correct {
    border-left-color: var(--success);
}

.result-item.incorrect {
    border-left-color: var(--danger);
}

.result-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.result-number {
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 30px;
}

.result-status {
    font-weight: 600;
    font-size: 0.9rem;
}

.result-item.correct .result-status {
    color: var(--success);
}

.result-item.incorrect .result-status {
    color: var(--danger);
}

.result-question {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.5;
}

.result-answer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
}

.answer-option {
    padding: 10px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.answer-option.your-answer {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid var(--danger);
    color: var(--text-secondary);
}

.answer-option.correct-answer {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid var(--success);
    color: var(--text-secondary);
}

.answer-icon {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.result-item.correct .answer-option.correct-answer .answer-icon {
    color: var(--success);
}

.result-item.incorrect .answer-option.your-answer .answer-icon {
    color: var(--danger);
}

.result-item.incorrect .answer-option.correct-answer .answer-icon {
    color: var(--success);
}

.result-description {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-left: 3px solid var(--primary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    font-style: italic;
}

/* Badges */
.tema-badge {
    display: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Cards */
.question-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(21, 34, 56, 0.5) 100%);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid rgba(6, 182, 212, 0.15);
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: rgba(6, 182, 212, 0.3);
}

.question-card h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 24px;
    font-weight: 600;
}

/* Opciones */
.options-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-item {
    margin: 14px 0;
}

.option-label {
    display: flex;
    align-items: flex-start;
    padding: 16px 18px;
    border: 2px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(6, 182, 212, 0.05);
    position: relative;
    overflow: hidden;
}

.option-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.option-label:hover {
    border-color: var(--primary);
    background-color: rgba(6, 182, 212, 0.12);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.option-label:hover::before {
    left: 100%;
}

.option-label:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
    background-color: rgba(249, 115, 22, 0.08);
}

.option-label input {
    margin-right: 14px;
    margin-top: 3px;
    accent-color: var(--primary);
    transform: scale(1.2);
    cursor: pointer;
    outline: none;
}

.option-label input:focus {
    outline: none;
}

.option-label input:hover {
    accent-color: var(--accent);
}

/* Estados */
.correct {
    border-color: var(--success) !important;
    background-color: rgba(16, 185, 129, 0.15) !important;
}

.correct input {
    accent-color: var(--success) !important;
}

.incorrect {
    border-color: var(--danger) !important;
    background-color: rgba(239, 68, 68, 0.15) !important;
}

.incorrect input {
    accent-color: var(--danger) !important;
}

/* Botones */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-retry {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}

/* Result Box */
.result-container {
    text-align: center;
    padding: 40px;
    margin: 32px 0;
    border-radius: var(--radius-lg);
    font-size: 1.2rem;
    font-weight: 600;
    display: none;
    border: 2px solid;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1.8;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.apto {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success);
    border-color: var(--success);
}

.no-apto {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--danger);
    border-color: var(--danger);
}

/* Footer */
footer {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.95) 0%, rgba(21, 34, 56, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(6, 182, 212, 0.2);
    margin-top: 60px;
    padding: 40px 20px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.footer-section p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 6px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    transition: all 0.3s ease;
    width: fit-content;
}

.footer-link:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.4);
    color: var(--accent);
    transform: translateX(4px);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
}

.footer-author {
    text-align: center;
    padding-top: 10px;
}

.footer-author p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.author-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.author-link:hover {
    color: var(--accent);
}

.author-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.author-link:hover::after {
    width: 100%;
}

/* Media query */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .main-header {
        background-position-y: -10px;
    }

    .main-header h1 {
        font-size: 2rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .question-card {
        padding: 20px;
    }

    .stats-header {
        flex-direction: column;
        gap: 12px;
        top: 70px;
        text-align: center;
    }

    .progress-bar-wrapper {
        width: 380px;
        padding: 0 10px;
    }

    .progress-bar-segments {
        width: 100%;
        grid-template-columns: repeat(10, 1fr);
        gap: 1px;
    }

    .progress-segment {
        min-height: 24px;
    }
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card {
    animation: slideIn 0.4s ease-out;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

/* Utilidades */
.text-muted {
    color: var(--text-secondary);
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Dropdown Menú de Temas */
.nav-dropdown {
    align-content: center;
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-dropdown-toggle:hover {
    color: var(--accent);
}

.nav-dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transition: width 0.3s;
}

.nav-dropdown-toggle:hover::after {
    width: 100%;
}

.nav-dropdown-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 4px;
}

.nav-dropdown-toggle.active .nav-dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 122%;
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(6, 182, 212, 0.3);
    min-width: 250px;
    margin-top: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
    padding: 0;
}

.nav-dropdown-toggle.active + .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-dropdown-item:hover {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    padding-left: 25px;
}

.nav-dropdown-item.current {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding-left: 17px;
}

.nav-dropdown-item-icon {
    font-size: 1.2rem;
    width: 20px;
}

.nav-dropdown-item-text {
    flex: 1;
}

.nav-dropdown-item-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    display: block;
    margin-top: -16px;
}

/* Donation Card */
.donation-card {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.05) 100%);
    border: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.donation-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.donation-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.5rem 0;
}

.donation-card-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

.donation-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.donation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.5);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        padding: 20px;

    .nav-dropdown-menu {
        right: 0;
        left: auto;
        right: -130px;
        width: 250px;
    }
    }

    .nav-dropdown-item {
        padding: 10px 15px;
    }

    .nav-dropdown-item:hover {
        padding-left: 20px;
    }

    .theme-grid {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-dropdown-menu {
        right: -130px;
        width: 250px;
    }
}
