/* CSS VARIABLES */
:root {
    --orange-primary: #f97316;
    --orange-dark: #ea580c;
    --red-danger: #ef4444;
    --red-critical: #dc2626;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --white: #ffffff;
    --green-400: #4ade80;
}

/* RESET AND BASE */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-900);
    color: var(--white);
    line-height: 1.6;
    overflow: auto;
    
}


/* UTILITY CLASSES */
.hidden {
    display: none !important;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-critical {
    from {
        opacity: 0.8;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* WELCOME SCREEN */
.welcome-container {
    background: linear-gradient(135deg, var(--gray-900) 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    cursor: pointer;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--orange-primary);
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 0.9rem;
    color: var(--gray-400);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.3s ease;
}

.welcome-subtitle:hover {
    color: var(--orange-primary);
}

/* BUTTONS */
.sets-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: var(--orange-primary);
    color: var(--white);
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.sets-btn:hover {
    background: var(--orange-dark);
    transform: scale(1.05);
}

.sets-btn i {
    margin-right: 0.5rem;
}

.upload-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--orange-primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    transition: transform 0.2s;
}

.upload-btn:hover {
    transform: scale(1.1);
}





.info-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2rem;
    height: 2rem;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 50%;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.info-btn:hover {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
}

.home-btn {
    position: fixed;
    z-index: 9999;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--orange-primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.home-btn:hover {
    background: var(--orange-dark);
    transform: scale(1.1);
}

.btn-primary {
    padding: 14px;
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-dark) 100%);
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 8px;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--gray-600);
    border-color: var(--orange-primary);
}

.show-answers-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--orange-primary) 0%, var(--orange-dark) 100%);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    margin-bottom: 32px;
}

.show-answers-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4);
}

/* MODAL OVERLAYS */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

/* SETTINGS MODAL */
.settings-modal {
    background: var(--gray-800);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gray-700);
    width: 520px;
    max-width: 90vw;
    max-height: 88vh;        /* 🔥 limitamos altura para que aparezca el scroll si se excede */
    overflow-y: auto;        /* scroll vertical */
    overflow-x: hidden;      /* evitamos scroll horizontal */
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--orange-primary) transparent;
}

/* Chrome, Edge, Safari */
.settings-modal::-webkit-scrollbar {
    width: 8px;   /* ancho del scroll vertical */
    height: 0;    /* ocultar horizontal */
}

.settings-modal::-webkit-scrollbar-track {
    background: transparent;
}

.settings-modal::-webkit-scrollbar-thumb {
    background-color: var(--orange-primary);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.settings-modal::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--orange-primary) 85%, black);
}


.modal-heading {
    color: var(--orange-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0 10px;
    text-align: center;
}

.file-name {
    font-size: 1.1rem;
    color: var(--gray-200);
    text-align: center;
    text-transform: uppercase;
    max-width: 90%;
    line-height: 1.5;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.error-title {
    color: var(--red-danger);
    font-weight: 600;
    margin-bottom: 8px;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-300);
}

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item label {
    font-size: 0.95rem;
    color: var(--gray-300);
}

.number-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-input {
    width: 72px;
    padding: 8px 10px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    text-align: center;
}

.unit {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.actions {
    margin-top: 36px;
    display: flex;
    gap: 12px;
}




/* QUIZ SCREEN */
.quiz-screen {
    min-height: 100vh;
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 20px;
    border-bottom: 1px solid var(--gray-700);
}

.header-badges {
    display: flex;
    gap: 12px;
}

.badge {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-name-header {
    font-size: 2rem;
    color: var(--gray-200);
    font-style: italic;
    text-transform: uppercase;
    text-align: center;
    margin: 10px 0;
}

.progress-container {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.question-progress {
    width: 100%;
    height: 8px;
    background: var(--gray-700);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.question-progress-fill {
    height: 100%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: width 1s linear;
}

.time-high {
    background: linear-gradient(90deg, var(--orange-primary), #fb923c);
}

.time-medium {
    background: linear-gradient(90deg, #fb923c, #fbbf24);
}

.time-low {
    background: linear-gradient(90deg, #fbbf24, var(--red-danger));
}

.time-critical {
    background: linear-gradient(90deg, var(--red-danger), var(--red-critical));
    animation: pulse-critical 0.5s infinite alternate;
}

.quiz-content {
    max-width: 1200px;
    margin: 0 auto;
    animation: slideUp 0.5s ease-out;
}

/* QUESTION CARDS */
.question-card {
    background: var(--gray-800);
    border-radius: 16px;
    padding: 20px;
    margin: 1rem auto 30px;
    border: 1px solid var(--gray-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 100%;
}

.question-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.active-question-text {
    font-size: 2rem;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 0 auto 0;
    max-width: 100%;
}

.option-text {
    font-size: 2rem;
    line-height: 1.4;
}

.literal-label {
    color: var(--orange-primary);
    font-size: 2.5rem;
    font-weight: bold;
    margin-right: 0.5rem;
    user-select: none;
}

/* RESULTS SCREEN */
.results-screen {
    min-height: 100vh;
    background: var(--gray-900);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-container {
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-out;
}

.results-container h1 {
    color: var(--orange-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.results-subtitle {
    color: var(--gray-400);
    margin-bottom: 2rem;
}

/* REVIEW SCREEN */
.review-screen {
    min-height: 100vh;
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.review-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--orange-primary);
    text-align: center;
    margin-bottom: 2rem;
}

.review-instruction {
    text-align: center;
    margin-bottom: 2rem;
}

.review-instruction p {
    color: var(--gray-400);
}

.sticky-panels {
    position: sticky;
    top: 15px;
    z-index: 10;
    max-width: 98%;
    margin: 0 auto 1rem;
}

.sticky-panels::before {
    content: '';
    position: absolute;
    inset: -15px -15px -15px -15px;
    background: linear-gradient(
        to bottom,
        rgba(17, 24, 39, 0.98) 0%,
        rgba(17, 24, 39, 0.95) 50%,
        rgba(17, 24, 39, 0.85) 80%,
        transparent 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: -1;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.review-detail-panels {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 100%;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 16px;
    
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.review-panel {
    background: var(--gray-800);
    border-radius: 12px;
    padding: 14px;
    border: 1px solid var(--gray-700);
    transition: transform 0.4s ease;
}

.review-panel.flipped {
    animation: flipCard 0.4s ease;
}

/* NUEVA ANIMACIÓN más suave */
@keyframes flipCard {
    0% { 
        transform: rotateX(0deg);
        opacity: 1;
    }
    50% { 
        transform: rotateX(90deg);
        opacity: 0.3;
    }
    100% { 
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.review-panel-title {
    color: var(--orange-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.review-panel-content {
    color: var(--gray-300);
    line-height: 2rem;
    font-size: 2rem;
    padding-bottom: 1rem;
    margin: 0;
}

.review-content {
    max-width: 1536px;
    margin: 0 auto;
}

.review-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin: 0 auto;
    max-width: 100%;
}

/* AGREGAR al final de styles.css - línea ~1700 */

/* Navegación por teclado en review screen */
#reviewGrid:focus {
    outline: none;
}

.review-question-card {
    position: relative;
    background: var(--gray-800);
    border: 2px solid var(--gray-700);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-question-card:focus {
    outline: none;
}

/* Borde naranja para navegación por teclado */
.review-question-card[data-keyboard-focus="true"] {
    box-shadow: 0 0 0 3px var(--orange-primary);
}

.review-question-card:hover {
    transform: translateY(-4px);
    border-color: var(--orange-primary);
   /* box-shadow: 0 8px 20px rgba(41, 249, 22, 0.2);*/
}

.review-question-card.selected {
    border-color: var(--orange-primary);
    background: rgba(155, 160, 177, 0.363);
    transform: translateY(-2px);
}

.review-question-number {
    font-size: 1rem;
    color: var(--gray-400);
    margin-bottom: 8px;
    font-weight: 500;
}

.review-correct-answer {
    font-size: 3rem;
    font-weight: 700;
    color: var(--green-400);
    margin: 0;
}

/* INFO MODAL */
.info-modal {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 16px;
    width: 92%;
    max-width: 820px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease; 
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-700);
}

.info-header h2 {
    color: var(--orange-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.close-info {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-info:hover {
    color: var(--white);
}

.info-content {
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-panel {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}




.example-panel {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.example-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    position: relative;
}

.example-panel h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-300);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    position: relative;
}

.panel-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-300);
}




/* Chrome, Edge, Safari */
.info-content::-webkit-scrollbar {
    width: 8px;              /* ancho del scroll vertical */
    height: 0;               /* ocultamos el horizontal */
}

.info-content::-webkit-scrollbar-track {
    background: transparent; /* fondo del track */
}

.info-content::-webkit-scrollbar-thumb {
    background-color: orange;   /* color de la barra */
    border-radius: 8px;         /* bordes redondeados */
    border: 2px solid transparent;
    background-clip: content-box; /* da efecto de espacio alrededor */
}

.info-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--orange-dark);/* tonalidad más fuerte al pasar el mouse */
}

.copy-btn {
    background: var(--orange-primary);
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: var(--orange-dark);
}

.copied-toast {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(120%);
    background: var(--orange-primary);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    z-index: 10;
    opacity: 0;
    transition: all 0.4s ease;
}

.copied-toast.show {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
}

.howto-list {
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
}

.howto-list li {
    margin-bottom: 0.5rem;
    color: var(--gray-300);
}

pre {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--gray-300);
}

code {
    background: var(--gray-700);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* SETS MODAL */
.sets-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sets-modal {
    background: var(--gray-800);
    border: 1px solid var(--gray-700);
    border-radius: 1rem;
    width: 100%;
    max-width: 1024px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
}

.sets-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-700);
}

.sets-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--orange-primary);
    margin: 0;
}

.close-sets-modal {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

.close-sets-modal:hover {
    color: var(--white);
}

.sets-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sets-grid button {
    background: var(--gray-700);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sets-grid button:hover {
    background: var(--gray-600);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

.preview-pane {
    /* Initially hidden, shown with JS */
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.back-to-sets {
    background: none;
    border: none;
    color: var(--orange-primary);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.back-to-sets:hover {
    color: var(--orange-dark);
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 10px;
    margin-left: 10px;
}


/* REEMPLAZAR el bloque completo de .toggle por este: */
.toggle {
    appearance: none;
    width: 50px;
    height: 26px;
    background: var(--gray-600);
    border-radius: 15px;
    position: relative;
    outline: none;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
}

.toggle::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle:checked {
    background: var(--orange-primary);
}

.toggle:checked::before {
    transform: translateX(24px);
}

.toggle:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle:hover:not(:disabled) {
    background: var(--gray-500);
}

.toggle:checked:hover:not(:disabled) {
    background: var(--orange-dark);
}






.toggle-all-btn {
    background: none;
    border: none;
    color: var(--gray-300);
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-all-btn:hover {
    color: var(--white);
}

.toggle-all-btn i {
    margin-right: 0.25rem;
}

.toggle-answers-btn {
    background: var(--gray-700);
    border: none;
    border-radius: 50%;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-answers-btn:hover {
    background: var(--gray-600);
}

.toggle-answers-btn i {
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.toggle-answers-btn i.active {
    color: var(--orange-primary);
}

.toggle-answers-btn:hover i {
    color: var(--white);
}

.toggle-answers-btn i.active:hover {
    color: var(--orange-dark);
}






.preview-content {
    max-height: 55vh;
    overflow-y: auto;
    overflow-x: hidden;  /* ocultar horizontal */
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    /* Firefox */
    scrollbar-width: thin; 
    scrollbar-color: var(--orange-primary) transparent;
}

/* Chrome, Edge, Safari */
.preview-content::-webkit-scrollbar {
    width: 8px;   /* ancho del scroll vertical */
    height: 0;    /* ocultar horizontal */
}

.preview-content::-webkit-scrollbar-track {
    background: transparent;
}

.preview-content::-webkit-scrollbar-thumb {
    background-color: var(--orange-primary);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.preview-content::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--orange-primary) 85%, black);
}


.preview-content>div {
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 0.5rem;
    padding: 1rem;
}

.preview-content>div>div {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.preview-content>div>div>div:last-child {
    flex: 1;
}

.preview-content .font-medium {
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.preview-content .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-300);
}

.preview-content .grid>div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.answer-text {
    transition: filter 0.3s ease;
}

.answer-text.correct {
    color: var(--green-400);
}

.sets-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* CAMBIAR de flex-end a space-between */
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-700);
}

.selected-count {
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* Special styles for preview content elements */
#previewContent .literal-label {
    color: var(--orange-primary);
    font-weight: 700;
    margin-right: 0.25rem;
}

#eyeIcon.text-orange-400 {
    color: var(--orange-primary);
}

/* Additional Sets Modal Styles */
#setsModal .animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}

#setsGrid button {
    transition: all 0.2s ease;
}

#setsGrid button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25);
}

#toggleAllCheckboxes {
    cursor: pointer;

}



/* Preview content en dos columnas */
.preview-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}



@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.score-badge {
    background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
    font-weight: 700;
}

input[type="checkbox"] {
    accent-color: var(--orange-primary);
}

.preview-content>div>div>input[type="checkbox"]:checked {
    accent-color: var(--orange-primary);
}

/* Añadir después de la línea ~1500 donde están los estilos de preview-content */
.preview-content>div:hover {
    background: var(--gray-800);
    border-color: var(--orange-primary);
    transition: all 0.2s ease;
}

#csvPreviewContent>div:hover {
    background: var(--gray-800);
    border-color: var(--orange-primary);
    transition: all 0.2s ease;
}




.selection-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.selection-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selection-label {
    font-size: 0.875rem;
    color: var(--gray-400);
    font-weight: 500;
}

.selection-number-input {
    width: 70px;
    padding: 6px 10px;
    background: var(--gray-700);
    border: 2px solid var(--orange-primary);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.selection-number-input:focus {
    outline: none;
    border-color: var(--orange-dark);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.selection-total {
    font-size: 0.875rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* Ocultar footer cuando se muestra el grid de sets */
.sets-modal-body:has(.sets-grid:not(.hidden)) ~ .sets-modal-footer {
    display: none;
}





.option-card {
    background: var(--gray-800);
    border-radius: 16px;
    padding: 20px;
    margin: 1rem auto 1rem;
    border: 1px solid var(--gray-700);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease; /* Añadir transición suave */
    max-width: 100%;
}

/* Estado de selección confirmada */
.option-card.selected-confirming {
    border: 3px solid var(--orange-primary);
    background: rgba(249, 115, 22, 0.15);
    transform: scale(1.02);
}



/* Barra de progreso de preguntas */
/* Barra de progreso de preguntas */
.questions-progress-bar {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 8px;
    margin-top: 10px;
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
}

.question-segment {
    flex: 1;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
}

/* Estados para modo Assess Myself con Instant Feedback */
.question-segment.correct {
    background: var(--green-400);
}

.question-segment.incorrect {
    background: #ef4444;
}

/* Pregunta actual en modo Shower */
.question-segment.current-shower {
    background: var(--white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Pregunta actual en modo Assess */
.question-segment.current-assess {
    background: var(--white);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Estados para modo Shower */
.question-segment.completed {
    background: var(--gray-600);
}

.question-segment.pending {
    background: var(--gray-700);
}


