/* ========================================
   SECTION 1: RESET & VARIABLES
   ======================================== */

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

/* CSS Custom Properties */
:root {
    /* ========== Primary Colors ========== */
    --color-primary: #1a5276;
    --color-primary-gradient: linear-gradient(135deg, #1a5276 0%, #2c3e50 100%);

    /* ========== Secondary Colors ========== */
    --color-secondary: #3498db;
    --color-secondary-gradient: linear-gradient(135deg, #3498db 0%, #2980b9 100%);

    /* ========== Accent/Action Colors ========== */
    --color-accent: #e74c3c;
    --color-accent-gradient: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);

    /* ========== Theme-Specific Colors ========== */
    
    /* Croatia Theme - Ocean Blues with Golden Yellow */
    --color-croatia-bg: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #90e0ef 100%);
    --color-croatia-btn: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    --color-croatia-border: #f1c40f;

    /* Dutch Theme - Dutch Flag Colors with Orange Accent */
    --color-dutch-bg: linear-gradient(135deg, #ff4040 0%, #ffd1ad 50%, #0071ff 100%);
    --color-dutch-btn: linear-gradient(135deg, #ff9900 0%, #ff6600 100%);
    --color-dutch-border: #ff6600;
    --color-dutch-text: #21468b;

    /* Culture Theme - Warm Earth Tones */
    --color-culture-bg: linear-gradient(135deg, #8b4513 0%, #d2691e 50%, #cd853f 100%);
    --color-culture-btn: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    --color-culture-border: #ffd700;

    /* Friends Theme - Friendly Blue and Green */
    --color-friends-bg: linear-gradient(135deg, #4CAF50 0%, #2196F3 100%);
    --color-friends-btn: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    --color-friends-border: #4CAF50;

    /* ========== Neutral Colors ========== */
    --color-white: #ffffff;

    /* ========== Progress Bar Colors ========== */
    --color-progress-default: linear-gradient(90deg, #3498db, #2980b9);
    --color-progress-croatia: linear-gradient(90deg, #0077b6, #00b4d8);
    --color-progress-dutch: linear-gradient(90deg, #ff9900, #ff6600);
    --color-progress-culture: linear-gradient(90deg, #d2691e, #cd853f);
    --color-progress-friends: linear-gradient(90deg, #4CAF50, #2196F3);
    --color-white-variant: #f8f9fa;
    --color-gray-light: #f5f5f5;
    --color-gray-medium: #7f8c8d;
    --color-gray-dark: #2c3e50;
    --color-gray-border: #bdc3c7;
    --color-gray-subtle: #e0e0e0;

    /* ========== Status Colors ========== */
    --color-success: #27ae60;
    --color-success-bg: #e8f5e9;
    --color-success-gradient: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    --color-success-border: #4caf50;

    --color-error: #e74c3c;
    --color-error-bg: #fff5f5;
    --color-error-border: #e74c3c;

    /* ========== Shadow & Border Colors ========== */
    --shadow-sm: 0 2px 8px rgba(76, 175, 80, 0.3);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);

    /* ========== Spacing Variables ========== */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
    --spacing-xxl: 40px;

    /* ========== Typography Variables ========== */
    --font-size-sm: 0.95rem;
    --font-size-base: 1rem;
    --font-size-md: 1.2rem;
    --font-size-lg: 1.3rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2.5rem;
    --font-weight-bold: bold;
    --font-weight-semibold: 600;
    --font-weight-medium: 500;
}

/* ========================================
   SECTION 2: BASE LAYOUT
   ======================================== */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-primary-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
}

.container {
    background: var(--color-white);
    border-radius: 20px;
    padding: var(--spacing-xxl);
    max-width: 800px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

/* ========================================
   SECTION 3: TYPOGRAPHY
   ======================================== */

h1 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xxl);
}

.subtitle {
    color: var(--color-gray-medium);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-xl);
}

.question-number {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-md);
}

.question-text {
    font-size: var(--font-size-xl);
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.group-name {
    font-size: var(--font-size-lg);
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-bold);
}

/* ========================================
   SECTION 4: LAYOUT COMPONENTS
   ======================================== */

.page {
    display: none;
}

.page.active {
    display: block;
}

.progress {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.progress-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--color-gray-border);
    border: 2px solid var(--color-white);
}

.progress-dot.active {
    background: var(--color-accent);
}

.progress-dot.completed {
    background: var(--color-success);
}

.question-container {
    text-align: left;
    margin-bottom: var(--spacing-lg);
}

.question-image {
    max-width: 100%;
    max-height: 400px;
    margin: var(--spacing-lg) auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.question-image.show {
    display: block;
}

.answers-container {
    background: var(--color-white-variant);
    border-radius: 15px;
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    text-align: left;
}

.answers-grid {
    display: grid;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.answers-grid.two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.answers-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.answers-grid.four-columns {
    grid-template-columns: repeat(4, 1fr);
}

.answers-grid.one-column {
    grid-template-columns: 1fr;
    justify-items: center;
}

.answers-grid.five-plus-columns {
    grid-template-columns: repeat(5, 1fr);
}

/* ========================================
   SECTION 5: INTERACTIVE ELEMENTS
   ======================================== */

.btn {
    background: var(--color-accent-gradient);
    color: var(--color-white);
    border: none;
    padding: var(--spacing-lg) 40px;
    font-size: var(--font-size-md);
    border-radius: 50px;
    cursor: pointer;
    margin: var(--spacing-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: var(--font-weight-bold);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: var(--color-secondary-gradient);
}

.btn-secondary:hover {
     box-shadow: var(--shadow-md);
 }

 .btn-small {
     background: var(--color-accent-gradient);
     color: var(--color-white);
     border: none;
     padding: 6px 12px;
     font-size: 14px;
     border-radius: 50px;
     cursor: pointer;
     margin: 0;
     transition: transform 0.2s, box-shadow 0.2s;
     font-weight: var(--font-weight-bold);
 }

 .btn-small:hover {
     transform: scale(1.05);
     box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
 }

 .audio-mute-btn {
     background: var(--color-accent-gradient);
     color: var(--color-white);
     border: none;
     padding: 6px 12px;
     font-size: 14px;
     border-radius: 50px;
     cursor: pointer;
     margin: 0;
     transition: transform 0.2s, box-shadow 0.2s;
     font-weight: var(--font-weight-bold);
     display: flex;
     align-items: center;
     gap: 5px;
 }

 .audio-mute-btn:hover {
     transform: scale(1.05);
     box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
 }

 .answer-item {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-lg);
    background: var(--color-white);
    border-radius: 10px;
    border-left: 4px solid var(--color-accent);
}

.answer-label {
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-sm);
}

.answer-item.selected {
    background: var(--color-success-bg);
    border-left-color: var(--color-success-border);
    box-shadow: var(--shadow-sm);
}

.answer-item:hover {
    background: var(--color-gray-light);
}

.answer-text {
    color: var(--color-gray-medium);
}

/* ========================================
    SECTION 9: AUDIO PLAYER
    ======================================== */

#audio-player {
    background: var(--color-white-variant);
    border-radius: 12px;
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}



.answer-image {
    max-width: 100%;
    max-height: 200px;
    margin-top: var(--spacing-sm);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

/* ========================================
   SECTION 6: RECAP SECTION
   ======================================== */

.recap-item {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-xl);
    background: var(--color-white-variant);
    border-radius: 15px;
    text-align: left;
}

.recap-question {
    font-size: var(--font-size-md);
    color: var(--color-gray-dark);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-medium);
}

.recap-answers {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.recap-answer-item {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 8px;
}

.recap-answer-item.correct {
    background: var(--color-success-gradient);
    border-left: 4px solid var(--color-success-border);
    color: #155724;
}

.recap-answer-item.incorrect {
    background: var(--color-error-bg);
    border-left: 4px solid var(--color-error);
    color: var(--color-error);
}

.recap-answer-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
}

.recap-answer-text {
    font-size: var(--font-size-sm);
}

.recap-image {
    max-width: 100%;
    max-height: 150px;
    margin-top: var(--spacing-sm);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* ========================================
   SECTION 7: THEME CLASSES
   ======================================== */

/* --- Croatia Theme - Ocean Blues with Golden Yellow --- */
.croatia-theme {
    background: var(--color-croatia-bg);
}

.croatia-theme h1 {
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.croatia-theme .btn {
    background: var(--color-croatia-btn);
}

.croatia-theme .btn:hover {
    box-shadow: 0 10px 20px rgba(241, 196, 15, 0.4);
}

.croatia-theme .question-text {
    color: var(--color-primary);
}

.croatia-theme .answer-item {
    border-left-color: var(--color-croatia-border);
}

/* --- Dutch Theme - Dutch Flag Colors with Orange Accent --- */
.dutch-theme {
    background: var(--color-dutch-bg);
}

.dutch-theme h1 {
    color: var(--color-dutch-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.dutch-theme .btn {
    background: var(--color-dutch-btn);
}

.dutch-theme .btn:hover {
    box-shadow: 0 10px 20px rgba(255, 153, 0, 0.4);
}

.dutch-theme .question-text {
    color: #1a365d;
}

.dutch-theme .answer-item {
    border-left-color: var(--color-dutch-border);
}

/* --- Culture Theme - Warm Earth Tones --- */
.culture-theme {
    background: var(--color-culture-bg);
}

.culture-theme h1 {
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.culture-theme .btn {
    background: var(--color-culture-btn);
}

.culture-theme .btn:hover {
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.4);
}

.culture-theme .question-text {
    color: #2c1810;
}

.culture-theme .answer-item {
    border-left-color: var(--color-culture-border);
}

/* --- Friends Theme - Friendly Blue and Green --- */
.friends-theme {
    background: var(--color-friends-bg);
}

.friends-theme h1 {
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.friends-theme .btn {
    background: var(--color-friends-btn);
}

.friends-theme .btn:hover {
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.4);
}

.friends-theme .question-text {
    color: #1a2a3a;
}

.friends-theme .answer-item {
    border-left-color: var(--color-friends-border);
}

/* ========================================
   SECTION 7: PROGRESS BAR THEME COLORS
   ======================================== */

/* Croatia Theme Progress Bar */
.croatia-theme .audio-progress-bar {
    background: linear-gradient(90deg, #0077b6, #00b4d8);
}

/* Dutch Theme Progress Bar */
.dutch-theme .audio-progress-bar {
    background: linear-gradient(90deg, #ff9900, #ff6600);
}

/* Culture Theme Progress Bar */
.culture-theme .audio-progress-bar {
    background: linear-gradient(90deg, #d2691e, #cd853f);
}

/* Friends Theme Progress Bar */
.friends-theme .audio-progress-bar {
    background: linear-gradient(90deg, #4CAF50, #2196F3);
}

/* ========================================
   SECTION 8: RESPONSIVE DESIGN
   ======================================== */

/* Mobile-first approach: Base styles work on small screens
   Media queries extend for larger screens or specific adjustments */

/* Small screens (max-width: 600px) - Stack grid columns */
@media (max-width: 600px) {
    .answers-grid.two-columns,
    .answers-grid.three-columns,
    .answers-grid.four-columns {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    /* Container adjustments */
    .container {
        padding: var(--spacing-lg);
    }

    /* Typography adjustments */
    h1 {
        font-size: var(--font-size-lg);
    }

    .question-text {
        font-size: var(--font-size-md);
    }

    /* Button adjustments */
    .btn {
        padding: var(--spacing-md) 30px;
        font-size: var(--font-size-base);
    }
}
