:root {
    --primary-color: #003366;
    /* Deep Navy Blue */
    --accent-color: #0066cc;
    /* Bright Blue */
    --bg-color: #f0f2f5;
    /* Light Gray */
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-light: #666666;
    --border-color: #e1e4e8;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --font-family: 'Inter', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background-color: var(--card-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background-color: var(--bg-color);
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    color: var(--primary-color);
    background-color: rgba(0, 51, 102, 0.05);
}

.nav-btn.active {
    color: var(--primary-color);
    background-color: rgba(0, 51, 102, 0.1);
}

/* Content Area */
.content-area {
    padding: 2rem 1rem;
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Accordion */
.main-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.accordion-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
}

.accordion-header {
    width: 100%;
    padding: 1.5rem;
    background: white;
    border: none;
    text-align: left;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.accordion-header:hover {
    background: #f8fbff;
}

.accordion-header .icon {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
    color: var(--accent-color);
}

.accordion-item.open .accordion-header .icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background: white;
}

.inner-content {
    padding: 0 1.5rem 2rem 1.5rem;
    color: #4a5568;
    border-top: 1px solid var(--border-color);
}

.inner-content h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.inner-content ul,
.inner-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.inner-content li {
    margin-bottom: 0.5rem;
}

/* Quiz V3 Styles */
.intro-card,
.result-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 600px;
    margin: 2rem auto;
}

/* Timer Bar */
.timer-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--accent-color);
    width: 100%;
    z-index: 200;
    transition: width 1s linear, background-color 0.3s;
}

.timer-bar.warning {
    background-color: var(--warning-color);
}

.timer-bar.danger {
    background-color: var(--error-color);
}

/* Quiz Status Header */
.quiz-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.block-title {
    font-weight: 700;
    color: var(--primary-color);
}

.timer-display {
    font-weight: 600;
    font-family: monospace;
    font-size: 1.2rem;
    color: var(--text-light);
}

.timer-display.danger {
    color: var(--error-color);
    animation: pulse 1s infinite;
}

/* Question Card */
.question-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    max-width: 700px;
    margin: 0 auto;
    animation: slideIn 0.3s ease-out;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Options */
.options-grid {
    display: grid;
    gap: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.05rem;
}

.option-label:hover {
    background-color: #f8f9fa;
    border-color: #c0c4cc;
}

.option-label.selected {
    border-color: var(--accent-color);
    background-color: rgba(0, 102, 204, 0.05);
}

.option-label input {
    display: none;
}

/* Hide default radio */

/* Navigation */
.quiz-nav {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.success-btn {
    background-color: var(--success-color) !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3) !important;
}

.success-btn:hover {
    background-color: #218838 !important;
}

.secondary-btn {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none;
}

.input-group {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

.intro-card .primary-btn {
    margin-top: 0.5rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .main-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .question-card,
    .intro-card {
        padding: 1.5rem;
    }

    .quiz-status-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .timer-display {
        align-self: flex-end;
    }
}