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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    font-weight: 300;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.quest-welcome-card, .question-card, .results-card, .leaderboard-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* Quest Welcome Screen Styles */
.quest-welcome-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-section {
    margin-bottom: 40px;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-section h2 {
    color: #1e293b;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-tagline {
    color: #64748b;
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 0;
}

.quest-preview {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 15px;
    border: 1px solid #cbd5e0;
}

.journey-path {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.path-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.path-step.completed {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 2px solid #10b981;
}

.path-step.locked {
    background: #f1f5f9;
    border: 2px solid #cbd5e0;
    opacity: 0.6;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.step-info h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.step-info p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.path-arrow {
    font-size: 1.5rem;
    color: #94a3b8;
    font-weight: bold;
}

.path-dots {
    font-size: 1.5rem;
    color: #cbd5e0;
    font-weight: bold;
}

.quest-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, #fef7ff, #fae8ff);
    border-radius: 15px;
    border: 1px solid #d8b4fe;
}

.feature-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.feature-highlight:hover {
    transform: translateX(5px);
}

.feature-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.feature-text {
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
}

.quest-start-section {
    margin-top: 40px;
}

.quest-start-section h3 {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.quest-start-section p {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 30px;
}

.start-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-quest-large {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    min-height: 50px;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.btn-quest-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

@media (max-width: 768px) {
    .quest-welcome-card {
        padding: 25px;
        margin: 10px;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1.1rem;
    }
    
    .journey-path {
        flex-direction: column;
        gap: 10px;
    }
    
    .path-arrow {
        transform: rotate(90deg);
    }
    
    .path-step {
        min-width: 200px;
    }
    
    .quest-features {
        padding: 20px;
    }
    
    .start-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .start-actions .btn {
        width: 250px;
    }
}

/* Legacy welcome card styles removed - now using quest-welcome-card */

.btn {
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    min-height: 44px; /* Touch-friendly minimum height */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b4513;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 182, 159, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.4);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.player-section {
    margin: 30px 0;
    text-align: center;
}

.player-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

#player-name {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

#player-name:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.player-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#welcome-message {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

.player-result {
    text-align: center;
    margin-bottom: 20px;
}

.player-name-display {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 15px;
}

#result-player-name {
    font-weight: 600;
    color: #667eea;
}

.position-display {
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 20px;
    font-weight: 600;
    color: #8b4513;
    display: inline-block;
}

.difficulty-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
}

.tab-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #5a67d8;
    color: white;
}

.leaderboard-content {
    min-height: 300px;
    margin-bottom: 30px;
}

.leaderboard-list {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
}

.no-scores {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 40px 20px;
}

.score-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.score-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.score-entry.current-player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.score-rank {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 40px;
}

.score-rank.first {
    color: #ffd700;
}

.score-rank.second {
    color: #c0c0c0;
}

.score-rank.third {
    color: #cd7f32;
}

.score-info {
    flex-grow: 1;
    text-align: left;
    margin-left: 15px;
}

.score-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.score-details {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 2px;
}

.score-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.leaderboard-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Classic quiz difficulty selection removed - now integrated into quest progression */

/* Classic quiz start button removed */

.progress-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.difficulty-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: #8b4513;
}

.difficulty-indicator span {
    font-size: 0.9rem;
}

.progress-bar {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.question-counter {
    text-align: center;
    font-weight: 600;
    color: #4a5568;
}

#question-text {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 30px;
    line-height: 1.4;
}

.answers-container {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.answer-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px 20px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

.answer-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateX(5px);
}

.answer-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #5a67d8;
}

.answer-btn.correct {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #38a169;
}

.answer-btn.incorrect {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border-color: #e53e3e;
}

.quiz-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.score-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
}

.hint-box, .feedback-box {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.hint-box.hidden, .feedback-box.hidden {
    display: none;
}

.hint-content, .feedback-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
}

.close-btn:hover {
    color: #4a5568;
}

.fun-fact {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 600;
    color: #8b4513;
}

.results-card {
    text-align: center;
}

#results-title {
    color: #2d3748;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.final-score {
    margin-bottom: 30px;
}

.score-circle {
    display: inline-block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    margin: 0 auto;
}

.score-circle small {
    font-size: 1rem;
    margin-top: -10px;
}

.achievements {
    margin-bottom: 30px;
}

.achievements h3 {
    color: #4a5568;
    margin-bottom: 20px;
}

.badges-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.badge {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .welcome-card, .question-card, .results-card, .leaderboard-card {
        padding: 25px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .difficulty-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .difficulty-btn {
        padding: 12px 8px;
    }
    
    .difficulty-icon {
        font-size: 1.5rem;
    }
    
    .difficulty-name {
        font-size: 0.9rem;
    }
    
    .difficulty-desc {
        font-size: 0.75rem;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .quiz-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .results-actions .btn {
        width: 200px;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .difficulty-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .tab-btn {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .score-entry {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .score-info {
        text-align: center;
        margin-left: 0;
    }
    
    .leaderboard-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .leaderboard-actions .btn {
        width: 200px;
    }
}

/* Region Preview Modal */
.region-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.region-preview-modal.hidden {
    display: none;
}

.region-preview-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.preview-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
    margin: 0;
}

.preview-description {
    color: #475569;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.preview-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.preview-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.95rem;
}

.stat-icon {
    font-size: 1.1rem;
}

.stat-text {
    color: #374151;
    font-weight: 500;
}

.sample-questions h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sample-questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    max-height: 200px;
    overflow-y: auto;
}

.sample-question {
    padding: 12px 15px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0c4a6e;
    font-weight: 500;
}

.preview-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    .region-preview-content {
        padding: 20px;
        margin: 10px;
    }
    
    .preview-stats {
        gap: 8px;
    }
    
    .preview-stat {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .preview-actions .btn {
        width: 200px;
    }
}

/* Quest System Styles */
/* Old game-mode-selection removed - now using quest-only interface */

.btn-quest {
    background: linear-gradient(135deg, #FF6B6B 0%, #4ECDC4 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-quest:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.quest-interface {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.quest-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.current-quest-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.quest-separator {
    opacity: 0.7;
}

.overall-progress {
    font-size: 1.1rem;
    font-weight: 600;
}

.quest-map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.continent-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.continent-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.continent-card.unlocked {
    border-color: #10b981;
    background: linear-gradient(to right, #ecfdf5, #ffffff);
}

.continent-card.locked {
    background: #f8fafc;
    opacity: 0.6;
}

.continent-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.continent-icon {
    font-size: 1.5rem;
}

.continent-name {
    flex: 1;
}

.continent-status {
    font-size: 1.2rem;
}

.regions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 20px;
}

.region-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 44px; /* Touch-friendly minimum height */
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.region-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.region-progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.region-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 3px;
    transition: width 0.8s ease;
    position: relative;
    overflow: hidden;
}

.region-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.region-completion {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.region-item.unlocked .region-completion {
    color: #059669;
}

.region-item.completed .region-progress-fill {
    background: linear-gradient(135deg, #10b981, #059669);
}

.region-item.completed .region-completion {
    color: #059669;
    font-weight: 600;
}

.region-item.unlocked {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    animation: unlockGlow 2s ease-in-out infinite alternate;
}

@keyframes unlockGlow {
    0% { box-shadow: 0 0 5px rgba(14, 165, 233, 0.3); }
    100% { box-shadow: 0 0 15px rgba(14, 165, 233, 0.6); }
}

.region-item.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    animation: activePulse 1.5s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.region-item.locked {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.region-name {
    font-weight: 500;
}

.quest-sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
    border: 2px solid #e2e8f0;
}

.current-quest-details {
    margin-bottom: 30px;
}

.current-quest-details h3 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

#quest-description {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.quest-requirements {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.requirement,
.quest-questions,
.unlock-info {
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #475569;
}

.unlock-info {
    background: #e0f2fe;
    color: #0369a1;
}

.region-progress {
    margin: 20px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.progress-header {
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.progress-bar-container {
    margin-bottom: 10px;
}

.quest-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.best-score {
    font-size: 0.9rem;
    color: #059669;
    font-weight: 600;
    padding: 5px 8px;
    background: #d1fae5;
    border-radius: 6px;
    display: inline-block;
}

/* Enhanced Quest Info Styles */
.quest-info-panel {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.difficulty-badge, .questions-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.difficulty-badge {
    background: linear-gradient(135deg, #e0f2fe, #b3e5fc);
    color: #01579b;
    border: 1px solid #0277bd;
}

.questions-count {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #4a148c;
    border: 1px solid #7b1fa2;
}

.badge-icon, .count-icon {
    font-size: 1rem;
}

.progression-info {
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #3b82f6;
}

.unlock-requirement, .next-unlock, .continent-progress {
    margin: 6px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.unlock-requirement {
    color: #059669;
}

.next-unlock {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    padding: 6px 8px;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
}

.continent-progress {
    color: #6b7280;
}

.player-quest-stats h4,
.achievements-panel h4 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.achievements-panel {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.no-achievements {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 20px;
    font-size: 0.9rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    font-size: 0.9rem;
    animation: achievementSlideIn 0.5s ease;
}

.achievement-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.achievement-text {
    flex: 1;
    font-weight: 600;
    color: #92400e;
}

.achievement-item.rare {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    border-left-color: #8b5cf6;
}

.achievement-item.rare .achievement-text {
    color: #5b21b6;
}

.achievement-item.legendary {
    background: linear-gradient(135deg, #fed7d7, #feb2b2);
    border-left-color: #ef4444;
}

.achievement-item.legendary .achievement-text {
    color: #991b1b;
}

@keyframes achievementSlideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.stat-label {
    color: #64748b;
    font-size: 0.9rem;
}

.quest-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Authentication Screens */
.signup-card, .login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.signup-card h2, .login-card h2 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 2rem;
}

.signup-card p, .login-card p {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.signup-form, .login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

.signup-actions, .login-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0 20px 0;
}

.back-option {
    margin-top: 20px;
}

.btn-link {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 10px;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #374151;
}

/* Quiz Header Updates */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.quiz-mode-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-controls-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quest-indicator {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #64748b;
}

.quest-indicator.hidden {
    display: none;
}

.quest-user, .quest-region {
    font-weight: 500;
}

.btn-exit {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-exit:hover {
    background: #dc2626;
}

/* Legacy classic quiz features panel removed */

/* Quest Responsive Layout */
@media (max-width: 768px) {
    .quest-interface {
        padding: 10px;
    }
    
    .quest-map-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quest-sidebar {
        order: -1; /* Move sidebar to top on mobile */
        padding: 20px;
    }
    
    .continent-list {
        gap: 10px;
    }
    
    .continent-card {
        padding: 15px;
    }
    
    .regions-list {
        padding-left: 10px;
        gap: 6px;
    }
    
    .region-item {
        padding: 12px 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .region-info {
        width: 100%;
    }
    
    .region-name {
        font-size: 0.9rem;
    }
    
    .region-completion {
        font-size: 0.8rem;
    }
    
    .quest-progress-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }
    
    .current-quest-info {
        font-size: 1rem;
    }
    
    .overall-progress {
        font-size: 1rem;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .quiz-controls-header {
        justify-content: space-between;
        width: 100%;
    }
    
    .signup-card, .login-card {
        padding: 25px;
        margin: 10px;
    }
    
    .achievements-list {
        max-height: 150px;
    }
    
    .achievement-item {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .quest-info-panel {
        flex-direction: column;
        gap: 8px;
    }
    
    .difficulty-badge, .questions-count {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .quest-interface {
        padding: 5px;
    }
    
    .quest-progress-header {
        padding: 10px;
    }
    
    .quest-sidebar {
        padding: 15px;
    }
    
    .continent-card {
        padding: 12px;
    }
    
    .continent-header {
        font-size: 1rem;
    }
    
    .region-item {
        padding: 10px 8px;
    }
    
    .current-quest-details h3 {
        font-size: 1.1rem;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .preview-actions {
        gap: 10px;
    }
    
    .preview-actions .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Quest Completion Styles */
.quest-completion, .quest-failure {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    margin: 15px 0;
}

.quest-completion {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 2px solid #10b981;
}

.quest-failure {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 2px solid #ef4444;
}

.quest-accuracy {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}

.quest-unlock {
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
    background: rgba(255,255,255,0.8);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 10px 0;
    animation: questUnlockPulse 2s infinite;
}

.quest-rewards {
    font-size: 1rem;
    color: #059669;
    margin-top: 8px;
}

.quest-requirement {
    font-size: 1rem;
    color: #dc2626;
    margin: 8px 0;
}

.quest-retry {
    font-size: 0.95rem;
    color: #6b7280;
    font-style: italic;
}

@keyframes questUnlockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}