/* ✅ CONSOLIDATED QUIZ STYLING - ALL THEMES */

/* BASE QUIZ STYLING (shared across all themes) */
.quiz-enhanced {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid;
}

/* ✅ ALLOW NORMAL GAME CONTAINER CLICKS FOR QUIZ-ENHANCED */
.quiz-enhanced.clickable {
    cursor: pointer;
}

.quiz-enhanced.clickable .game-header {
    cursor: pointer;
}

.quiz-enhanced:hover {
    transform: translateY(-4px);
}
  
  .quiz-badge,
  .quiz-level {
    font-size: 0.9rem;
    padding: 4px 10px;
  }

.quiz-info {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quiz-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.quiz-level {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.quiz-preview {
    padding: 24px;
    background: white;
}

.quiz-description {
    margin-bottom: 20px;
}

.quiz-description p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

.quiz-features {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.feature {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.quiz-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin: 20px 0;
    padding: 16px;
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.quiz-start-btn {
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
}

.quiz-start-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.quiz-start-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.quiz-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.quiz-completion-message {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    z-index: 1000;
    animation: slideInRight 0.5s ease;
}

.completion-content h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.completion-content p {
    margin: 4px 0;
    font-size: 14px;
}

/* ✅ LEEK THEME (Intermediate/Green) */
.quiz-enhanced.leek {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(139, 195, 74, 0.1) 100%);
    border-color: rgba(76, 175, 80, 0.3);
}

.quiz-enhanced.leek:hover {
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}

.quiz-enhanced .game-header {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%) !important;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  
  .quiz-left h3 {
    margin: 0;
    font-size: 1.1rem;
    white-space: nowrap;
  }
  
  .quiz-middle {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex: 1;
  }
  
  .quiz-badge,
  .quiz-level {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
  }
  
  .quiz-right .toggle-arrow {
    font-size: 20px;
    color: orange;
  }

.quiz-enhanced.leek .feature {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.quiz-enhanced.leek .quiz-stats {
    background: rgba(76, 175, 80, 0.05);
}

.quiz-enhanced.leek .stat-value {
    color: #4CAF50;
}

.quiz-enhanced.leek .stat-value.completed {
    color: #4CAF50;
}

.quiz-enhanced.leek .stat-value.in-progress {
    color: #FF9800;
}

.quiz-enhanced.leek .quiz-start-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.quiz-enhanced.leek .quiz-start-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #66BB6A 0%, #4CAF50 100%);
}

.quiz-enhanced.leek .quiz-completion-message {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.3);
}

/* ✅ BEGINNER THEME (Orange) */
.quiz-enhanced.beginner {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 183, 77, 0.1) 100%);
    border-color: rgba(255, 152, 0, 0.3);
}

.quiz-enhanced.beginner:hover {
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.2);
    border-color: #FF9800;
}

.quiz-enhanced.beginner .game-header {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%) !important;
}

.quiz-enhanced.beginner .feature {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.quiz-enhanced.beginner .quiz-stats {
    background: rgba(255, 152, 0, 0.05);
}

.quiz-enhanced.beginner .stat-value {
    color: #FF9800;
}

.quiz-enhanced.beginner .stat-value.completed {
    color: #FF9800;
}

.quiz-enhanced.beginner .stat-value.in-progress {
    color: #FF5722;
}

.quiz-enhanced.beginner .quiz-start-btn {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.quiz-enhanced.beginner .quiz-start-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%);
}

.quiz-enhanced.beginner .quiz-completion-message {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    box-shadow: 0 8px 30px rgba(255, 152, 0, 0.3);
}

/* ✅ ADVANCED THEME (Purple) */
.quiz-enhanced.advanced {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1) 0%, rgba(171, 71, 188, 0.1) 100%);
    border-color: rgba(156, 39, 176, 0.3);
}

.quiz-enhanced.advanced:hover {
    box-shadow: 0 8px 25px rgba(156, 39, 176, 0.2);
    border-color: #9C27B0;
}

.quiz-enhanced.advanced .game-header {
    background: linear-gradient(135deg, #9C27B0 0%, #AB47BC 100%) !important;
}

.quiz-enhanced.advanced .feature {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.quiz-enhanced.advanced .quiz-stats {
    background: rgba(156, 39, 176, 0.05);
}

.quiz-enhanced.advanced .stat-value {
    color: #9C27B0;
}

.quiz-enhanced.advanced .stat-value.completed {
    color: #9C27B0;
}

.quiz-enhanced.advanced .stat-value.in-progress {
    color: #673AB7;
}

.quiz-enhanced.advanced .quiz-start-btn {
    background: linear-gradient(135deg, #9C27B0 0%, #AB47BC 100%);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.3);
}

.quiz-enhanced.advanced .quiz-start-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
    background: linear-gradient(135deg, #AB47BC 0%, #9C27B0 100%);
}

.quiz-enhanced.advanced .quiz-completion-message {
    background: linear-gradient(135deg, #9C27B0 0%, #AB47BC 100%);
    box-shadow: 0 8px 30px rgba(156, 39, 176, 0.3);
}

/* ✅ EXPERT THEME (Red) */
.quiz-enhanced.expert {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1) 0%, rgba(198, 40, 40, 0.1) 100%);
    border-color: rgba(211, 47, 47, 0.3);
}

.quiz-enhanced.expert:hover {
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.2);
    border-color: #D32F2F;
}

.quiz-enhanced.expert .game-header {
    background: linear-gradient(135deg, #D32F2F 0%, #C62828 100%) !important;
}

.quiz-enhanced.expert .feature {
    background: rgba(211, 47, 47, 0.1);
    color: #D32F2F;
}

.quiz-enhanced.expert .quiz-stats {
    background: rgba(211, 47, 47, 0.05);
}

.quiz-enhanced.expert .stat-value {
    color: #D32F2F;
}

.quiz-enhanced.expert .stat-value.completed {
    color: #D32F2F;
}

.quiz-enhanced.expert .stat-value.in-progress {
    color: #F44336;
}

.quiz-enhanced.expert .quiz-start-btn {
    background: linear-gradient(135deg, #D32F2F 0%, #C62828 100%);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.quiz-enhanced.expert .quiz-start-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
    background: linear-gradient(135deg, #C62828 0%, #D32F2F 100%);
}

.quiz-enhanced.expert .quiz-completion-message {
    background: linear-gradient(135deg, #D32F2F 0%, #C62828 100%);
    box-shadow: 0 8px 30px rgba(211, 47, 47, 0.3);
}

/* ✅ SPECIALIST THEME (Blue) */
.quiz-enhanced.specialist {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1) 0%, rgba(13, 71, 161, 0.1) 100%);
    border-color: rgba(25, 118, 210, 0.3);
}

.quiz-enhanced.specialist:hover {
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.2);
    border-color: #1976D2;
}

.quiz-enhanced.specialist .game-header {
    background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%) !important;
}

.quiz-enhanced.specialist .feature {
    background: rgba(25, 118, 210, 0.1);
    color: #1976D2;
}

.quiz-enhanced.specialist .quiz-stats {
    background: rgba(25, 118, 210, 0.05);
}

.quiz-enhanced.specialist .stat-value {
    color: #1976D2;
}

.quiz-enhanced.specialist .stat-value.completed {
    color: #1976D2;
}

.quiz-enhanced.specialist .stat-value.in-progress {
    color: #2196F3;
}

.quiz-enhanced.specialist .quiz-start-btn {
    background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.quiz-enhanced.specialist .quiz-start-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
    background: linear-gradient(135deg, #0D47A1 0%, #1976D2 100%);
}

.quiz-enhanced.specialist .quiz-completion-message {
    background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%);
    box-shadow: 0 8px 30px rgba(25, 118, 210, 0.3);
}

/* ✅ AUTHORITY THEME (Dark Purple) */
.quiz-enhanced.authority {
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.1) 0%, rgba(74, 20, 140, 0.1) 100%);
    border-color: rgba(106, 27, 154, 0.3);
}

.quiz-enhanced.authority:hover {
    box-shadow: 0 8px 25px rgba(106, 27, 154, 0.2);
    border-color: #6A1B9A;
}

.quiz-enhanced.authority .game-header {
    background: linear-gradient(135deg, #6A1B9A 0%, #4A148C 100%) !important;
}

.quiz-enhanced.authority .feature {
    background: rgba(106, 27, 154, 0.1);
    color: #6A1B9A;
}

.quiz-enhanced.authority .quiz-stats {
    background: rgba(106, 27, 154, 0.05);
}

.quiz-enhanced.authority .stat-value {
    color: #6A1B9A;
}

.quiz-enhanced.authority .stat-value.completed {
    color: #6A1B9A;
}

.quiz-enhanced.authority .stat-value.in-progress {
    color: #8E24AA;
}

.quiz-enhanced.authority .quiz-start-btn {
    background: linear-gradient(135deg, #6A1B9A 0%, #4A148C 100%);
    box-shadow: 0 4px 15px rgba(106, 27, 154, 0.3);
}

.quiz-enhanced.authority .quiz-start-btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(106, 27, 154, 0.4);
    background: linear-gradient(135deg, #4A148C 0%, #6A1B9A 100%);
}

.quiz-enhanced.authority .quiz-completion-message {
    background: linear-gradient(135deg, #6A1B9A 0%, #4A148C 100%);
    box-shadow: 0 8px 30px rgba(106, 27, 154, 0.3);
}

/* ✅ GURU THEME (Enhanced Orange with Special Effects) */
.quiz-enhanced.guru {
    background: linear-gradient(135deg, rgba(230, 81, 0, 0.1) 0%, rgba(191, 54, 12, 0.1) 100%);
    border-color: rgba(230, 81, 0, 0.3);
    box-shadow: 0 4px 20px rgba(230, 81, 0, 0.1);
}

.quiz-enhanced.guru:hover {
    box-shadow: 0 12px 35px rgba(230, 81, 0, 0.3);
    border-color: #E65100;
}

.quiz-enhanced.guru .game-header {
    background: linear-gradient(135deg, #E65100 0%, #BF360C 100%) !important;
    position: relative;
    overflow: hidden;
}

.quiz-enhanced.guru .game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.quiz-enhanced.guru .quiz-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.quiz-enhanced.guru .quiz-level {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.quiz-enhanced.guru .feature {
    background: linear-gradient(135deg, rgba(230, 81, 0, 0.1) 0%, rgba(255, 138, 101, 0.1) 100%);
    color: #E65100;
    border: 1px solid rgba(230, 81, 0, 0.2);
}

.quiz-enhanced.guru .quiz-stats {
    background: linear-gradient(135deg, rgba(230, 81, 0, 0.05) 0%, rgba(255, 138, 101, 0.05) 100%);
    border: 1px solid rgba(230, 81, 0, 0.1);
}

.quiz-enhanced.guru .stat-value {
    color: #E65100;
}

.quiz-enhanced.guru .stat-value.completed {
    color: #E65100;
    text-shadow: 0 0 10px rgba(230, 81, 0, 0.3);
}

.quiz-enhanced.guru .stat-value.in-progress {
    color: #FF6F00;
}

.quiz-enhanced.guru .quiz-start-btn {
    background: linear-gradient(135deg, #E65100 0%, #BF360C 100%);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.quiz-enhanced.guru .quiz-start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.quiz-enhanced.guru .quiz-start-btn:hover:not(:disabled)::before {
    left: 100%;
}

.quiz-enhanced.guru .quiz-start-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 81, 0, 0.5);
    background: linear-gradient(135deg, #BF360C 0%, #E65100 100%);
}

.quiz-enhanced.guru .quiz-close-btn {
    z-index: 1;
    position: relative;
}

.quiz-enhanced.guru .quiz-completion-message {
    background: linear-gradient(135deg, #E65100 0%, #BF360C 100%);
    box-shadow: 0 12px 40px rgba(230, 81, 0, 0.4);
    animation: guruSlideIn 0.8s ease;
    border: 2px solid #FF8A65;
    max-width: 350px;
    padding: 20px 28px;
}

.quiz-enhanced.guru .completion-content h3 {
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 12px;
}

.quiz-enhanced.guru .completion-content p {
    font-size: 15px;
    margin: 6px 0;
}

.guru-celebration {
    margin-top: 12px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    animation: pulse 2s infinite;
}

/* ✅ ANIMATIONS */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes guruSlideIn {
    0% {
        transform: translateX(100%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateX(-10px) scale(1.05);
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.02);
        background: rgba(255, 255, 255, 0.2);
    }
}

/* ✅ RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .quiz-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quiz-features {
        justify-content: center;
    }
    
    .feature {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .quiz-enhanced.guru .quiz-completion-message {
        max-width: 300px;
        right: 10px;
        top: 10px;
    }
}