* { box-sizing: border-box; }

/* Basis Farb-Variablen (Standard) */
:root {
    --color-main: #ff9900;
    --color-accent: #5c85d6;
    --color-bg: #000000;
    --color-text: #888888;
    --color-panel: #0a0a0a;
    --color-modal: #111111;
}

/* Theme: Matrix */
body.theme-matrix {
    --color-main: #00ff00;
    --color-accent: #008800;
    --color-bg: #020502;
    --color-panel: #051105;
}

/* Theme: Ice */
body.theme-ice {
    --color-main: #00ffff;
    --color-accent: #ffffff;
    --color-bg: #000811;
    --color-panel: #020a14;
}

body, html {
    margin: 0; padding: 0;
    width: 100vw; height: 100vh;
    overflow: hidden; 
    background-color: var(--color-bg); color: var(--color-text);
    font-family: Arial, sans-serif;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: background-color 0.5s;
}

.hidden { display: none !important; }

/* Schnee-Geisterleinwand */
#snowCanvas {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none; /* Klicks gehen durch! */
    z-index: 1500;
}

/* Sprachschalter & Schneeschieber */
#langToggle {
    position: absolute; top: 20px; right: 20px;
    background-color: var(--color-modal); color: var(--color-accent);
    border: 1px solid var(--color-accent); padding: 8px 12px;
    border-radius: 4px; cursor: pointer;
    font-weight: bold; z-index: 1000;
}
#langToggle:hover { background-color: var(--color-accent); color: var(--color-bg); }

#btnSnowShovel {
    position: absolute; top: 65px; right: 20px;
    background-color: transparent; color: var(--color-text);
    border: 1px solid #333; padding: 4px 8px;
    border-radius: 4px; cursor: pointer;
    font-size: 11px; z-index: 1000;
}
#btnSnowShovel:hover { background-color: #ffffff; color: #000; border-color: #fff; }

/* Popups und Modals */
#cookieBanner, #dailyModal, #questsModal, #resetModal, #guideModal, #impressumModal {
    position: fixed; background-color: var(--color-modal);
    border: 1px solid var(--color-accent); border-radius: 8px;
    text-align: center; z-index: 2000;
}
#cookieBanner {
    bottom: 20px; padding: 20px; width: 90%; max-width: 600px;
    font-size: 14px; line-height: 1.4;
}
#dailyModal, #questsModal, #resetModal, #guideModal, #impressumModal {
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    padding: 30px; min-width: 320px; box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* Spezifisch für Modals mit Scrollbalken (Anleitung & Impressum) */
#guideModal, #impressumModal {
    width: 90%; max-width: 500px; max-height: 85vh;
    display: flex; flex-direction: column;
}
.scroll-container {
    overflow-y: auto; text-align: left; padding-right: 10px; margin-bottom: 15px;
}
/* Eigener Scrollbalken */
.scroll-container::-webkit-scrollbar { width: 6px; }
.scroll-container::-webkit-scrollbar-track { background: var(--color-panel); border-radius: 4px; }
.scroll-container::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 4px; }

.scroll-container h3 { color: var(--color-accent); font-size: 15px; margin-bottom: 5px; margin-top: 15px; }
.scroll-container h3:first-child { margin-top: 0; }
.scroll-container p { color: var(--color-text); font-size: 13px; line-height: 1.5; margin-top: 0; }
.scroll-container hr { border: 0; border-top: 1px solid #333; margin: 15px 0; }
.scroll-container a { color: var(--color-accent); text-decoration: none; }
.scroll-container a:hover { text-decoration: underline; }

.orange-val { color: var(--color-main); font-weight: bold; }

.quest-item {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #333;
    font-size: 14px; color: var(--color-text); text-align: left;
}

#dailyTitle { color: var(--color-main); margin-top: 0; }
#cookieBanner button, #dailyModal button, #questsModal button, #resetModal button, #guideModal button, #impressumModal button {
    background-color: var(--color-accent); color: var(--color-bg); border: none;
    padding: 10px 20px; margin-top: 15px; cursor: pointer;
    font-weight: bold; border-radius: 4px; transition: opacity 0.2s;
}
#cookieBanner button:hover, #dailyModal button:hover, #questsModal button:hover, #resetModal button:hover, #guideModal button:hover, #impressumModal button:hover { opacity: 0.8; }
#questsModal button:disabled { background-color: #444; color: #888; cursor: not-allowed; }

/* Hauptspielbereich */
#gameContainer {
    display: flex; flex-direction: column; align-items: center;
    width: 100%; max-width: 900px; padding: 10px 20px;
}

#gameTitle {
    color: var(--color-accent); font-size: 24px; letter-spacing: 2px;
    margin-bottom: 10px; font-weight: normal; transition: transform 0.1s;
}
#gameTitle:active { transform: scale(0.95); }

/* Die klickbare Hauptzahl */
#scoreDisplay {
    color: var(--color-main); font-size: 80px; font-weight: bold;
    line-height: 1; margin-bottom: 15px; text-align: center;
    border-top: 2px solid var(--color-accent); border-bottom: 2px solid var(--color-accent);
    padding: 15px 0; width: 100%; min-height: 110px;
    cursor: pointer; user-select: none; transition: transform 0.05s ease-in-out;
}
#scoreDisplay:active { transform: scale(0.97); }

#subText { font-size: 13px; margin-bottom: 15px; }
#subText a { color: var(--color-accent); text-decoration: none; font-weight: bold; }
#subText a:hover { text-decoration: underline; }

/* Action Buttons */
#actionButtons {
    display: flex; justify-content: center; gap: 8px; margin-bottom: 15px; flex-wrap: wrap;
}
#actionButtons button {
    background-color: transparent; color: var(--color-text); border: 1px solid #333333;
    padding: 8px 16px; border-radius: 4px; cursor: pointer;
    font-size: 13px; transition: all 0.2s ease-in-out;
}
#actionButtons button:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* Spezial-Styling für Zurücksetzen-Button in Dunkelrot (#cc0000) */
#btnReset {
    color: #cc0000 !important;
    border-color: #cc0000 !important;
}
#btnReset:hover {
    background-color: #cc0000 !important;
    color: var(--color-bg) !important;
}

/* Zweispaltige Statistik Tabelle */
#statisticsTable {
    width: 100%; border-collapse: collapse;
    font-size: 13px; background-color: var(--color-panel); border: 1px solid #333;
}
#statisticsTable td { padding: 6px 10px; border-bottom: 1px solid #222; height: 28px; }
#statisticsTable tr:last-child td { border-bottom: none; }
#statisticsTable td:nth-child(2) { border-right: 1px solid #333; }
#statisticsTable td.val { color: var(--color-main); font-weight: bold; text-align: right; white-space: nowrap; }

/* Münzen und Effekte */
.coin {
    position: absolute; width: 50px; height: 50px;
    background-color: #ffd700; color: #000; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 18px; cursor: pointer;
    user-select: none; border: 3px solid #b8860b;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); z-index: 500;
}
.coin:active { transform: scale(0.9); }
.coin.epic {
    background-color: var(--color-accent); border-color: #fff; color: var(--color-bg);
    box-shadow: 0 0 15px var(--color-accent);
}
.glow-effect { text-shadow: 0 0 20px var(--color-main), 0 0 40px var(--color-main), 0 0 60px var(--color-main); }

.floating-text {
    position: fixed; font-size: 22px; font-weight: bold;
    pointer-events: none; animation: floatUp 1s ease-out forwards; z-index: 1000;
}
@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}

.particle {
    position: fixed; width: 8px; height: 8px; border-radius: 50%;
    pointer-events: none; animation: explode 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards; z-index: 9999;
}
@keyframes explode {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}
