/* Wortmaumau Abenteuer - Premium Game Styles */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    /* Brand Colors */
    --primary: #2B5F9B;
    --primary-dark: #1A3A5C;
    --primary-light: #4A85C9;

    --accent: #FFB347;
    /* Brighter Orange/Gold */
    --accent-dark: #E09220;
    --accent-light: #FFD285;

    --success: #58CC02;
    /* Duolingo-ish Green */
    --success-dark: #46a302;

    --error: #FF4B4B;
    --error-dark: #D43535;

    /* UI Colors */
    --white: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.85);
    /* Deeper, richer glass */
    --surface-glass-border: rgba(255, 255, 255, 0.6);
    --shadow-deep: 0 20px 40px rgba(0, 0, 0, 0.2);

    --text-main: #2c3e50;
    --text-light: #ffffff;
    --text-muted: #64748b;

    /* Dimensions */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --header-height: 80px;
}

/* Global Vignette */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
    z-index: 1000;
    /* On top of everything */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: #1a4b8c;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
}

/* ============================================
   LAYOUT
   ============================================ */

#game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    /* Level 10 Background: Rich Scene */
    background: url('../assets/bg-day.png') no-repeat center center;
    background-size: cover;
    touch-action: none;
}

/* Semi-dark overlay for better game visibility */
#game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 95, 155, 0.4);
    z-index: 0;
    pointer-events: none;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    /* STRICTLY above background */
    touch-action: none;
    pointer-events: auto;
    /* Ensure canvas receives clicks */
}

.hidden {
    display: none !important;
}

/* Voice Caption Display */
.voice-caption {
    position: fixed;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    z-index: 100;
    pointer-events: none;
    text-align: center;
    max-width: 80%;
    animation: captionFadeIn 0.3s ease;
}

.voice-caption.fade-out {
    animation: captionFadeOut 0.5s ease forwards;
}

@keyframes captionFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes captionFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ============================================
   UI OVERLAY WRAPPER
   ============================================ */

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 20;
    /* Highest priority */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

/* Header Area */
.ui-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

/* ============================================
   BRANDING & HUD
   ============================================ */

.brand-logo {
    pointer-events: auto;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Dark pill so white MAUMAU text is visible */
    background: var(--primary);
    padding: 8px 24px;
    border-radius: 40px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);

    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    top: max(1.5rem, env(safe-area-inset-top));
    left: max(1.5rem, env(safe-area-inset-left));
    z-index: 50;

    /* Ensure no color filters mess up the SVG */
    filter: none;
}

.brand-logo:active {
    transform: scale(0.95);
}

.brand-img {
    height: 48px;
    /* Slightly smaller to fit in pill nicely */
    width: auto;
    /* Remove drop-shadow from image itself as container has shadow now */
    filter: none;
    /* Idle animation */
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@media (max-width: 600px) {
    .brand-logo {
        padding: 6px 16px;
        /* Don't constrain width - logo needs to show fully */
    }

    .brand-img {
        height: 36px;
    }

    .brand-text {
        display: none;
    }
}

.brand-text {
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 16px;
    letter-spacing: -0.5px;
}

/* Game HUD - Centered Top with overlap prevention */
#game-hud {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: max(1rem, env(safe-area-inset-top));
    z-index: 40;
    /* Prevent overlap with logo and sound button */
    max-width: calc(100% - 320px);
    justify-content: center;
}

@media (max-width: 600px) {
    #game-hud {
        /* On mobile: fixed position below logo to avoid overlap with background elements */
        top: 80px;
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
        justify-content: center;
        gap: 8px;
    }

    .brand-logo {
        /* Make logo smaller on mobile */
        transform: scale(0.9);
        transform-origin: top left;
        left: 1rem;
        top: 1rem;
    }
}


/* Sound Toggle - Top Right */
#btn-sound {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 50;
}

/* Back Button - Bottom Left (Fix Overlap) */
/* IMPORTANT: We need to target the back button specifically if it exists, or just move the .brand-logo to top-left (done above).
   If there is a distinct "Back" button for the game, we should style it.
   Assuming the "Hub" button is the back button during game.
*/
/* Removed empty rule for buttons */


/* Score Pill - Deep Glass */
#score-display,
#timer-display {
    background: rgba(255, 255, 255, 0.85);
    /* More opacity for legibility */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 800;
    color: var(--primary-dark);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    min-width: 90px;
    justify-content: center;
}

#timer-display {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.4);
}

#lives-display {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 75, 75, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    min-width: 70px;
    justify-content: center;
}

#timer-display.warning {
    background: var(--error);
    animation: pulse-red 0.8s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 75, 75, 0.7);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(255, 75, 75, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 75, 75, 0);
    }
}

/* Action Buttons (Round) */
.ui-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--primary);
    /* Removed hard bottom shadow (0 4px 0) which looked like a double button */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.15s;
    font-size: 24px;
}

.ui-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ui-btn.ui-btn-small {
    width: 40px;
    height: 40px;
    font-size: 20px;
    box-shadow: 0 3px 0 #dbe4f0, 0 6px 15px rgba(0, 0, 0, 0.1);
}

.ui-btn.ui-btn-small:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 #dbe4f0;
}

/* ============================================
   SCREENS & MODALS
   ============================================ */

/* ============================================
   RICH MODALS (Level 11)
   ============================================ */

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Hub screen: no blur to show background clearly */
#hub-screen {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.modal-content {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 40px;
    text-align: center;
    max-width: 90%;
    width: 480px;

    /* Deep 3D Shadow */
    box-shadow:
        0 20px 50px -12px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);

    border: 1px solid rgba(255, 255, 255, 0.6);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Shine effect */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0) 40%);
    z-index: 0;
    pointer-events: none;
}

.screen.visible .modal-content {
    transform: translateY(0);
}

.modal-content h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(43, 95, 155, 0.2));
    position: relative;
    /* z-index fix */
    z-index: 1;
}

.modal-content p {
    font-size: 1.2rem;
    color: var(--dark);
    opacity: 0.8;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

/* Glass Card Containers (Content Wrappers) */
.hub-content,
.intro-content,
.complete-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 32px;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
    text-align: center;
    max-width: 480px;
    width: 100%;
    position: relative;
    border: 4px solid white;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Headlines */
h1,
h2 {
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 0.5em;
    line-height: 1.1;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
}

h2 {
    font-size: 2rem;
}

h1 span {
    color: var(--accent);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* ============================================
   HUB (MODE SELECTION)
   ============================================ */

.mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.mode-card {
    background: white;
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.mode-card:active {
    transform: scale(0.98);
}

.mode-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.mode-info h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.mode-info p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
}

.mode-difficulty {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--success);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
}

/* Locked State */
.mode-card.locked {
    background: #f1f5f9;
    opacity: 0.7;
    cursor: default;
    filter: grayscale(1);
}

.mode-card.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.mode-lock {
    position: absolute;
    font-size: 2rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

/* Stats in Hub */
.hub-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 24px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
}

/* Funnel Link */
.hub-funnel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(26, 75, 140, 0.3);
    transition: transform 0.2s;
}

.hub-funnel:hover {
    transform: scale(1.05);
}

/* ============================================
   INTRO & COMPLETE SCREENS
   ============================================ */

.intro-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Toggle Switch */
.intro-options {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 24px;
}

.option-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-slider {
    width: 52px;
    height: 32px;
    background: #cbd5e1;
    border-radius: 20px;
    position: relative;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 4px;
    left: 4px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.toggle-slider {
    background: var(--success);
}

input:checked+.toggle-slider::after {
    transform: translateX(20px);
}

/* ============================================
   BIG BUTTONS (3D Style)
   ============================================ */

.btn-adventure {
    background: var(--accent);
    /* Fallback */
    background: linear-gradient(to bottom, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 16px 48px;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow:
        0 6px 0 #b36b00,
        0 12px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s, box-shadow 0.1s;
    width: 100%;
    max-width: 300px;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.btn-adventure:active {
    transform: translateY(6px);
    box-shadow:
        0 0 0 #b36b00,
        0 0 0 rgba(0, 0, 0, 0);
}

.btn-adventure:hover {
    filter: brightness(1.1);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 16px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s;
}

.btn-text:hover {
    text-decoration-color: var(--text-muted);
}

.btn-secondary {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--text-main);
    padding: 12px 32px;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ============================================
   RESULTS
   ============================================ */

.stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.star {
    font-size: 4rem;
    color: #cbd5e1;
    /* Empty star color (slate) */
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.1));
}

.star.filled {
    color: var(--accent);
    animation: starPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes starPop {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    70% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Complete Screen Layout */
#complete-screen .modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#complete-screen .btn-adventure {
    margin-top: 1rem;
}

#complete-screen .btn-secondary {
    margin-top: 0.5rem;
}

.result-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.result-stats .stat {
    text-align: center;
}

.result-stats .stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.result-stats .stat-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.complete-message {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Complete Screen Funnel CTA */
.funnel-msg {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.funnel-msg p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.funnel-msg a {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.funnel-msg a:hover {
    background: rgba(43, 95, 155, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .modal-content {
        padding: 1.5rem;
        max-width: 92%;
        width: auto;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 24px;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .modal-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .stars .star {
        font-size: 2.5rem;
    }

    .result-stats {
        gap: 1.5rem;
        margin: 0.5rem 0;
    }

    .result-stats .stat-num {
        font-size: 1.2rem;
    }

    .funnel-msg {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .funnel-msg p {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    #complete-screen .btn-adventure {
        padding: 12px 28px;
        font-size: 1.1rem;
        margin-top: 0.5rem;
    }

    #complete-screen .btn-secondary {
        padding: 10px 24px;
        font-size: 0.95rem;
    }

    .intro-icon {
        font-size: 3.5rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {

    .hub-content,
    .intro-content,
    .complete-content {
        padding: 24px;
        max-width: 90%;
    }

    h1 {
        font-size: 2rem;
    }

    .mode-icon {
        font-size: 2.5rem;
    }

    .btn-adventure {
        padding: 14px 32px;
        font-size: 1.2rem;
    }
}

/* ============================================
   SEO CONTENT (visible for crawlers, scrollable)
   ============================================ */

.seo-article {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4f8 100%);
    padding: 2rem 5%;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Nunito', system-ui, sans-serif;
    line-height: 1.7;
    color: var(--text-main);
}

.seo-article h1 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.seo-article h2 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.seo-article p {
    margin-bottom: 1rem;
}

.seo-article ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.seo-article li {
    margin-bottom: 0.5rem;
}

.seo-article a {
    color: var(--primary);
    text-decoration: underline;
}

.seo-article a:hover {
    color: var(--accent-dark);
}

/* ============================================
   LEVEL 10 PARALLAX BACKGROUND
   ============================================ */
.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    /* Fallback gradient if images fail or have transparency issues */
    background: linear-gradient(180deg,
        #87CEEB 0%,      /* Himmelblau oben */
        #5BA3D9 40%,     /* Mittleres Blau */
        #3D8C5A 70%,     /* Grüner Horizont */
        #2D6B45 100%     /* Dunkleres Waldgrün unten */
    );
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* Sky: Voller Hintergrund, keine Lücken */
.layer-sky {
    background-image: url('../assets/layer_1_sky.png');
    z-index: 1;
    background-size: cover;
    background-position: center center;
}

/* Hills: Nur untere 40% des Screens, nach unten verschoben */
.layer-hills {
    background-image: url('../assets/layer_2_hills.png');
    z-index: 2;
    transform: scale(1.1);
    animation: pan-slow 60s ease-in-out infinite alternate;
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: no-repeat;
    top: auto;
    bottom: -10%;
    height: 50%;
}

/* Trees: Horizontal wiederholen für nahtlose Abdeckung */
.layer-trees {
    background-image: url('../assets/layer_3_trees.png');
    z-index: 3;
    animation: pan-mid 45s ease-in-out infinite alternate;
    background-size: auto 100%;
    background-position: center bottom;
    background-repeat: repeat-x;
}

/* Foreground: Horizontal wiederholen */
.layer-foreground {
    background-image: url('../assets/layer_4_foreground.png');
    z-index: 10;
    background-size: auto 100%;
    background-position: center bottom;
    background-repeat: repeat-x;
    pointer-events: none;
}


/* World Elements (Monsters) */
.world-element {
    position: absolute;
    pointer-events: none;
}

/* Monster 1: Links unten, schaut hinter den Bäumen hervor */
.monster-1-container {
    z-index: 4;
    /* Hinter dem Vordergrund */
    bottom: 8%;
    left: 5%;
    animation: float 6s ease-in-out infinite;
    transform: scale(0.7);
}

/* Monster 2: Rechts unten, prominent im Vordergrund */
.monster-2-container {
    z-index: 12;
    /* Ganz vorne */
    bottom: 2%;
    right: 3%;
    animation: bounce-gentle 4s ease-in-out infinite;
    transform: scale(0.65);
}

/* Monster 3: Mitte-rechts, lugt hervor */
.monster-3-container {
    z-index: 11;
    bottom: 0%;
    left: 65%;
    animation: peek 8s ease-in-out infinite;
    transform: scale(0.6);
}

.monster-1 {
    width: 140px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.monster-2 {
    width: 100px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.monster-3 {
    width: 110px;
}

/* Remove old Monster animations */
@keyframes pan-slow {
    0% {
        transform: scale(1.1) translateX(-2%);
    }

    100% {
        transform: scale(1.1) translateX(2%);
    }
}

@keyframes pan-mid {
    0% {
        transform: translateX(-3%);
    }

    100% {
        transform: translateX(3%);
    }
}

@keyframes bounce-gentle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes peek {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@media (max-width: 600px) {
    .monster-1 {
        width: 90px;
    }

    .monster-2 {
        width: 70px;
    }

    .monster-3 {
        width: 80px;
    }
}

/* Disable old bg settings */
#game-container {
    background: #000;
    /* Reset to black, parallax covers it */
}

#game-container::before {
    display: none;
}

/* Remove milky overlay */


/* Letters */
.letter {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
    z-index: -1;
}

.letter-A {
    top: 10%;
    left: 5%;
    animation: float 8s ease-in-out infinite;
}

.letter-B {
    top: 40%;
    right: 5%;
    font-size: 12rem;
    animation: float 10s ease-in-out infinite reverse;
}

.letter-C {
    bottom: 10%;
    left: 30%;
    font-size: 6rem;
    animation: float 7s ease-in-out infinite 2s;
}

.letter-E {
    top: 15%;
    right: 35%;
    font-size: 5rem;
    animation: float 9s ease-in-out infinite 1s;
}

/* Card Shapes */
.card-shape {
    width: 80px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transform: rotate(-15deg);
}

.card-1 {
    top: 60%;
    left: 20%;
    animation: float 6s ease-in-out infinite, rotate-slow 20s linear infinite;
}

.card-2 {
    top: 20%;
    right: 40%;
    animation: float 8s ease-in-out infinite reverse, rotate-slow 25s linear infinite reverse;
}

/* Animations */
@keyframes drift-h {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(30px);
    }
}

@keyframes rotate-slow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 600px) {

    /* Smaller monsters on mobile so they don't cover game elements */
    .monster-1 {
        width: 80px;
        bottom: 10%;
    }

    .monster-2 {
        width: 60px;
        top: 20%;
        right: 5%;
    }

    .monster-3 {
        width: 70px;
        bottom: 20%;
        left: 80%;
    }

    .letter {
        font-size: 4rem;
        opacity: 0.05;
    }

    /* Fade letters more on mobile */
}