:root {
    --primary-color: #4f46e5;
    --secondary-color: #10b981;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-light: #64748b;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Anti-Copy: Disable selection and long-press callouts */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

.header {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-weight: 600;
}

.mode-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mode-practice {
    background: #dcfce7;
    color: #166534;
}

.mode-quiz {
    background: #fee2e2;
    color: #991b1b;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.question-text {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.option-item:hover {
    border-color: var(--primary-color);
    background: #f5f3ff;
}

.option-item.selected {
    border-color: var(--primary-color);
    background: #eef2ff;
    color: var(--primary-color);
    font-weight: 600;
}

.footer-actions {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.explanation-box {
    margin-top: 20px;
    padding: 15px;
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-radius: 4px;
    display: none;
}

.explanation-box.show {
    display: block;
}

/* Modal Result */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.score-text {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Timer & Header */
.timer-float {
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#currentQuizIDDisplay {
    letter-spacing: 1px;
}