@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    background-color: #f3f4f6;
    color: #1f2937;
}

.dark body {
    background-color: #111827;
    color: #f3f4f6;
}

.file-input {
    display: none;
}

.app-container {
    min-height: 100vh;
}

#theme-toggle:checked ~ .dot {
    transform: translateX(100%);
    background-color: #3b82f6;
}

/* --- FORZATURA SFONDI BOX --- */
.light-bg-force {
    background-color: #ffffff !important;
}

.dark .dark-bg-force-q {
    background-color: #1f2937 !important;
}

.dark .dark-bg-force-a {
    background-color: #374151 !important;
}

/* --- FIX TESTO DEFINITIVO --- */
#question-text,
#answer-text {
    color: #000000;
}

.dark #question-text,
.dark #answer-text {
    color: #ffffff;
}

/* --- STILI PULSANTI MCQ --- */
.mcq-option-button-default {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background-color: rgba(249, 250, 251, 0.9);
    color: #111827;
    font-weight: 500;
    text-align: left;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.dark .mcq-option-button-default {
    background-color: rgba(31, 41, 55, 0.95);
    border-color: rgba(75, 85, 99, 0.9);
    color: #e5e7eb;
}

.mcq-option-button-default:hover:not(.mcq-disabled) {
    background-color: rgba(229, 231, 235, 0.95);
}

.dark .mcq-option-button-default:hover:not(.mcq-disabled) {
    background-color: rgba(55, 65, 81, 0.95);
}

.mcq-disabled {
    cursor: default;
}

.mcq-clicked {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.mcq-correct {
    background-color: rgba(34, 197, 94, 0.18);
    border-color: rgb(34, 197, 94);
    color: #065f46;
}

.dark .mcq-correct {
    background-color: rgba(34, 197, 94, 0.25);
    border-color: rgb(34, 197, 94);
    color: #bbf7d0;
}

.mcq-wrong-soft {
    background-color: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.7);
    color: #7f1d1d;
}

.dark .mcq-wrong-soft {
    background-color: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.9);
    color: #fecaca;
}

.mcq-wrong-strong {
    background-color: rgba(239, 68, 68, 0.25);
    border-color: rgb(220, 38, 38);
    color: #7f1d1d;
}

.dark .mcq-wrong-strong {
    background-color: rgba(239, 68, 68, 0.35);
    border-color: rgb(248, 113, 113);
    color: #fee2e2;
}

/* --- STILE BLOCCO CODICE --- */
.deck-code-block {
    margin-top: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background-color: #f3f4f6;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
    white-space: pre-wrap;
    overflow-x: auto;
}

.dark .deck-code-block {
    background-color: #111827;
    border-color: #4b5563;
    color: #f3f4f6;
}