:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #6b21a8;
    --success: #16a34a;
    --danger: #dc2626;
    --border: #e6e9ef;
    --radius: 12px;
    --card-max-width: 900px;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #111827;
    box-sizing: border-box;
}

.quiz-page-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

#header-placeholder {
}

.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    margin: 0;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block !important;
    visibility: visible !important;
}

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

.home-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: opacity 0.3s ease;
}

.home-link:hover {
    opacity: 0.8;
}

.home-icon {
    width: 20px;
    height: 20px;
}

.home-text {
    font-size: 14px;
    font-weight: 500;
}

.hamburger {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-wrapper {
    flex: 1;
    max-width: var(--card-max-width);
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.scrollable-card {
    max-height: 85vh;
    overflow-y: auto;
}

.card-content {
    padding: 32px;
}

.card-content h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

.card-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-content p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: #374151 !important;
    font-weight: 500;
    margin-bottom: 2rem;
    text-align: center;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 500;
}

/* Animated Section */
.animated-section {
    margin: 3rem 0;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left-color: #764ba2;
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-card h3 {
    color: #111827;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.benefit-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Areas Section */
.areas-section {
    margin: 3rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 2rem;
    border-radius: 16px;
}

.areas-section h3 {
    text-align: center;
    color: #111827;
    margin-bottom: 2rem;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.area-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #f093fb;
}

.area-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-left-color: #f5576c;
}

/* Platform Section */
.platform-section {
    margin: 3rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.feature-card h4 {
    color: #111827;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card ul {
    margin: 0;
    padding-left: 1.5rem;
}

.feature-card li {
    margin-bottom: 0.75rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Learning Benefits */
.learning-benefits {
    margin: 3rem 0;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.benefit-item {
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #16a34a;
}

.benefit-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-left-color: #22c55e;
}

.benefit-item h4 {
    color: #111827;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.benefit-item p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Quiz Specific Styles */
.quiz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.quiz-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quiz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.quiz-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.quiz-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.quiz-content {
    padding: 1.5rem;
}

.quiz-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.quiz-difficulty {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.difficulty-easy {
    background: #dcfce7;
    color: #16a34a;
}

.difficulty-medium {
    background: #fef3c7;
    color: #d97706;
}

.difficulty-hard {
    background: #fee2e2;
    color: #dc2626;
}

.quiz-questions {
    font-size: 0.875rem;
    color: #6b7280;
}

.quiz-description {
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.quiz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.quiz-tag {
    font-size: 0.75rem;
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.quiz-action {
    display: block;
    width: 100%;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quiz-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Quiz Stats Section */
.quiz-stats-section {
    margin: 3rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    padding: 2rem;
    border-radius: 16px;
}

.quiz-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quiz-stat-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.quiz-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.quiz-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.quiz-stat-label {
    color: #6b7280;
    font-weight: 500;
}

/* Categories Section */
.categories-section {
    margin: 3rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.category-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 15px;
    }
    
    .card-content {
        padding: 24px;
    }
    
    .card-content h1 {
        font-size: 2rem;
    }
    
    .card-content h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .areas-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
    }
    
    .quiz-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 10px;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-content h1 {
        font-size: 1.75rem;
    }
    
    .card-content h2 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .benefit-icon {
        font-size: 2rem;
    }
    
    .quiz-header h3 {
        font-size: 1.125rem;
    }
    
    .quiz-stat-number {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.quiz-card {
    animation: slideUp 0.5s ease-out;
}

/* Focus and Accessibility */
.quiz-card:focus,
.quiz-action:focus,
button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .quiz-card {
        border: 2px solid #000;
    }
    
    .quiz-action {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Quiz Sample Styles */
.quiz-container {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 0 auto;
    width: 100%;
    max-width: var(--card-max-width, 800px);
    padding: 2rem;
    text-align: left;
    height: auto;
    overflow: visible;
}

/* Responsive Quiz Design */
@media (max-width: 768px) {
    .quiz-container {
        margin: 1rem auto;
        padding: 1.5rem;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        height: auto;
        min-height: calc(100vh - 40px);
        margin: 20px auto;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .question {
        font-size: 1rem;
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }
    
    .option {
        padding: 0.6rem;
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    
    .buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .quiz-header-compact {
        padding: 0.75rem;
    }
    
    #correctStats {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    #questionNumber {
        font-size: 0.75rem;
    }
    
    .btn-change-topic {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        margin-left: 0.3rem;
        min-height: 32px;
        min-width: 60px;
        touch-action: manipulation;
        display: inline-block;
        visibility: visible;
        opacity: 1;
    }
    
    .btn-change-topic:hover {
        transform: none;
        background: linear-gradient(135deg, #ff5252, #e64a19);
    }
    
    .btn-change-topic:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #ff3838, #d32f2f);
    }
    
    .btn-change-topic:focus {
        outline: 2px solid #ff6b6b;
        outline-offset: 2px;
    }
}

.question {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #333;
}

.options {
    margin-bottom: 2rem;
}

.option {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.option input[type="radio"] {
    margin-right: 1rem;
}

.option.selected {
    background: #e3f2fd;
    border-color: #2196f3;
}

.option.correct {
    background: #d4edda;
    border-color: #28a745;
}

.option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
}

.buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: #4caf50;
    color: white;
}

.btn-submit:hover {
    background: #45a049;
}

.btn-next {
    background: #2196f3;
    color: white;
}

.btn-next:hover {
    background: #1976d2;
}

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

.btn-secondary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ff5252, #e64a19);
}

.btn-change-topic {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.btn-change-topic:hover {
    background: linear-gradient(135deg, #ff5252, #e64a19);
    transform: translateY(-1px);
}

.btn-submit-small {
    background: #4caf50;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-small:hover {
    background: #45a049;
}

.btn-cancel-small {
    background: #6c757d;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel-small:hover {
    background: #5a6268;
}

/* Compact Quiz Header */
.quiz-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.quiz-header-compact .topic-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 140px;
}

.quiz-header-compact .quiz-stats {
    flex: 0 0 auto;
}

.quiz-header-compact .question-counter {
    flex: 0 0 auto;
    text-align: right;
}

.topic-info {
    display: flex;
    align-items: center;
}

.topic-info span {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.quiz-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.quiz-stats span {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.85rem;
}

#correctStats {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #c3e6cb;
    color: #155724;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Compact Topic Selector */
.topic-selector-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%);
    border-radius: 6px;
    border: 1px solid #fed7d7;
}

.topic-selector-compact label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.topic-dropdown-small {
    padding: 0.4rem;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 130px;
}

.topic-dropdown-small:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.1);
}

/* Topic Selector Styles - Modern Design */
.topic-selector {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.topic-selector label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.topic-dropdown {
    width: 100%;
    max-width: 320px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.topic-dropdown:hover {
    border-color: #667eea;
    box-shadow: 0 4px 6px -1px rgba(102, 126, 234, 0.1), 0 2px 4px -1px rgba(102, 126, 234, 0.06);
    transform: translateY(-1px);
}

.topic-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 4px 6px -1px rgba(102, 126, 234, 0.1), 0 2px 4px -1px rgba(102, 126, 234, 0.06);
}

.topic-dropdown:disabled {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.topic-dropdown option {
    padding: 0.75rem;
    background: white;
    color: #1a202c;
    font-weight: 500;
}

/* Question Header */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.question-header span {
    font-weight: 600;
    color: #333;
}

#questionNumber {
    color: #667eea;
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 2rem;
}

.quiz-results h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.score-display {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.score-display span:last-child {
    font-weight: bold;
    color: #667eea;
}

.percentage {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #667eea;
}

/* Enhanced Results Display */
.score-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    text-align: center;
}

.score-summary .score-display {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.score-summary .score-display span:last-child {
    color: #ffd700;
    font-weight: bold;
}

.score-summary .percentage {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.skill-level {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    display: inline-block;
}

/* Statistics */
.statistics {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.statistics h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.stat-value.correct {
    color: #28a745;
}

.stat-value.incorrect {
    color: #dc3545;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.chart-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

#performanceChart {
    max-width: 200px;
    height: auto;
}

.chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-color.correct {
    background: #28a745;
}

.legend-color.incorrect {
    background: #dc3545;
}

.legend-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
}

/* Question Review */
.question-details {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.question-details h3 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.question-review {
    max-height: 400px;
    overflow-y: auto;
}

.question-review-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ddd;
}

.question-review-item.correct {
    background: #d4edda;
    border-left-color: #28a745;
}

.question-review-item.incorrect {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.question-number {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.question-text {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.answer-section {
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}

.user-answer,
.correct-answer {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.user-answer {
    color: #666;
}

.correct-answer {
    color: #28a745;
    font-weight: 500;
}

.result-status {
    font-weight: bold;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.question-review-item.correct .result-status {
    color: #28a745;
}

.question-review-item.incorrect .result-status {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .score-summary {
        padding: 1.5rem;
    }
    
    .score-summary .percentage {
        font-size: 2rem;
    }
    
    .skill-level {
        font-size: 1.2rem;
    }
    
    .question-review-item {
        padding: 1rem;
    }
    

}

/* Welcome Content Styles */
.welcome-content {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-content h2 {
    color: #333;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.welcome-content > p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

/* Quiz Features */
.quiz-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    margin-bottom: 0;
}

.feature-item {
    background: white;
    padding: 0.8rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-item h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: #333;
    font-weight: 600;
}

.feature-item p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0;
}

/* Popular Topics */
.popular-topics {
    margin-bottom: 3rem;
}

.popular-topics h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.topics-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.topic-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 3px solid #667eea;
}

.topic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.topic-name {
    font-weight: 500;
    color: #333;
}

.topic-badge {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* How It Works */
.how-it-works h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.step-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.step-text {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Responsive Design for Welcome Content */@media (max-width: 768px) {
    .quiz-container {
        margin: 10px auto;
        padding: 1.25rem;
        width: calc(100% - 20px);
        max-width: 95%;
        box-sizing: border-box;
    }

    .welcome-content {
        padding: 1rem;
        margin: 0 auto 1rem;
        width: 100%;
    }
    
    .quiz-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        width: 100%;
    }

    .feature-item {
        margin: 0;
        width: 100%;
    }

    .topic-selector {
        padding: 1.5rem 1rem;
        width: 100%;
        margin: 0 auto;
    }

    .topic-dropdown {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        padding: 1rem;
        width: calc(100% - 10px);
    }

    .card-content h1 {
        font-size: 1.4rem;
    }

    .welcome-content h2 {
        font-size: 1.3rem;
    }
}
