/* style.css - Styles von Tag & Nacht (aufgeteilt aus index.html am 15.08.2026). */

:root {
            --card-w-hand: 90px;
            --card-h-hand: 135px;
            --card-w-table: 100px; 
            --card-h-table: 150px;

            /* ACHIEVEMENT COLORS */
            --rank-kupfer: #b87333;
            --rank-bronze: #cd7f32;
            --rank-silber: #e0e0e0;
            --rank-gold: #ffca28;
            --rank-platin: #00e5ff;
            --rank-diamant: #b9f2ff;

            /* STATISTIK-DASHBOARD (dataviz-Skill: validierte kategoriale Palette, dunkle Slots) */
            --series-day: #d95926;
            --series-night: #3987e5;
            --text-secondary: #c3c2b7;
        }

        * { box-sizing: border-box; }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-image: url('ui_bg.jpg'); 
            background-repeat: repeat; 
            background-size: auto;    
            color: white;
            margin: 0;
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden; 
            user-select: none;
            -webkit-user-select: none; 
            touch-action: none; 
        }

        /* --- LOADING SCREEN --- */
        #loading-screen {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: #1a1a1a;
            z-index: 9999;
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            transition: opacity 0.5s;
        }
        #loading-logo { max-width: 150px; margin-bottom: 30px; animation: pulse 2s infinite; }
        @keyframes pulse { 0% { opacity: 0.8; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0.8; transform: scale(0.95); } }
        .loader-bar-container { width: 80%; max-width: 300px; height: 10px; background: #333; border-radius: 5px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.5); }
        .loader-bar { height: 100%; width: 0%; background: linear-gradient(to right, #ff5722, #ffca28); transition: width 0.2s; }
        #loading-text { margin-top: 10px; color: #888; font-size: 0.9em; font-family: monospace; }

        /* --- ACHIEVEMENT POPUP (TOAST) --- */
        #achievement-container {
            position: fixed; top: -150px; left: 50%; transform: translateX(-50%);
            z-index: 10000; transition: top 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            pointer-events: none;
        }
        #achievement-container.visible { top: 20px; }
        .achievement-toast {
            background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(5px);
            border: 2px solid white; border-radius: 50px; padding: 10px 25px 10px 15px;
            display: flex; align-items: center; gap: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
            min-width: 280px; max-width: 90%;
        }
        .ach-icon-wrapper {
            width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1);
            display: flex; justify-content: center; align-items: center; border: 2px solid currentColor; flex-shrink: 0;
        }
        .ach-icon-svg { width: 30px; height: 30px; fill: currentColor; filter: drop-shadow(0 0 5px currentColor); }
        .ach-text { display: flex; flex-direction: column; }
        .ach-title { font-weight: bold; font-size: 1.1em; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 1px; }
        .ach-desc { font-size: 0.8em; color: #ccc; }

        /* RANKS COLORS */
        .rank-kupfer { border-color: var(--rank-kupfer); color: var(--rank-kupfer); }
        .rank-bronze { border-color: var(--rank-bronze); color: var(--rank-bronze); }
        .rank-silber { border-color: var(--rank-silber); color: var(--rank-silber); }
        .rank-gold   { border-color: var(--rank-gold); color: var(--rank-gold); box-shadow: 0 0 20px rgba(255, 202, 40, 0.4); }
        .rank-platin { border-color: var(--rank-platin); color: var(--rank-platin); box-shadow: 0 0 25px rgba(0, 229, 255, 0.5); }
        .rank-diamant{ border-color: var(--rank-diamant); color: var(--rank-diamant); box-shadow: 0 0 30px rgba(185, 242, 255, 0.6); border-width: 3px; }

        /* --- Layout --- */
        #game-board {
            flex: 1; display: grid; grid-template-rows: 25% 1fr 30%; grid-template-columns: 1fr;
            padding: 10px; position: relative; opacity: 0; transition: opacity 1s ease-in;
        }

        #cpu-area { display: flex; justify-content: space-around; align-items: center; z-index: 10; width: 100%; }
        .cpu-player { display: flex; flex-direction: column; align-items: center; padding: 5px; width: 100px; flex-shrink: 0; position: relative; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); }
        .cpu-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; }
        .cpu-portrait { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 255, 255, 0.2); box-shadow: 0 5px 15px rgba(0,0,0,0.6); margin-bottom: 5px; background-color: #444; transition: transform 0.3s; }
        .cpu-player.active .cpu-portrait { border-color: #00e676; transform: scale(1.1); box-shadow: 0 0 25px #00e676; }
        .cpu-hand-visual { display: flex; height: 60px; margin-top: 5px; justify-content: center; padding-left: 20px; position: relative; }
        .mini-card-back { width: 40px; height: 60px; background-image: url('cardback.png'); background-size: cover; background-position: center; border-radius: 6px; margin-left: -30px; box-shadow: -2px 0 5px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.3); }
        .mini-card-back:first-child { margin-left: 0; }
        .cpu-excess-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: rgba(0, 0, 0, 0.85); color: #00e676; border: 2px solid white; border-radius: 50%; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 0.9em; box-shadow: 0 0 10px black; z-index: 20; pointer-events: none; }

        #table-area { background-image: url('table-felt.jpg'); background-repeat: repeat; background-position: center; border-radius: 20px; position: relative; box-shadow: inset 0 0 50px rgba(0,0,0,0.9); border: 3px solid rgba(0,0,0,0.3); margin: 0 10px; display: flex; justify-content: center; align-items: center; overflow: hidden; min-height: 0; }
        #stack-container { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; align-content: center; align-items: center; width: 100%; height: 100%; padding: 10px; }
        .stack-slot { width: var(--card-w-table); height: var(--card-h-table); border: 4px dashed rgba(255,255,255,0.3); border-radius: 12px; display: flex; justify-content: center; align-items: center; position: relative; transition: transform 0.2s; transform-origin: center; flex-shrink: 0; }
        .stack-slot.highlight { border-color: #00e676; transform: scale(1.05); background-color: rgba(0, 230, 118, 0.2); }

        #draw-pile { position: absolute; left: 10px; top: 85%; transform: translateY(-50%); width: calc(var(--card-w-table) * 0.5); height: calc(var(--card-h-table) * 0.5); background-image: url('cardback.png'); background-size: cover; border-radius: 8px; display: flex; justify-content: center; align-items: center; cursor: default; z-index: 5; transition: box-shadow 0.2s; }
        #draw-pile::after { content: ''; position: absolute; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.5); border-radius: 8px; }
        #draw-pile-text { position: relative; z-index: 2; text-align:center; color:white; font-size:0.8em; font-weight:bold; text-shadow: 1px 1px 3px black; }

        #bottom-gradient { position: fixed; bottom: 0; left: 0; width: 100%; height: 35%; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%); pointer-events: none; z-index: 5; }
        #player-area { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 10px; z-index: 10; }
        #player-hand { display: flex; justify-content: center; align-items: flex-end; height: 100%; width: 100%; padding-bottom: 20px; overflow: visible; }
        #controls { margin-bottom: 5px; display: flex; align-items: center; gap: 20px; z-index: 200; }
        
        button, select, input[type="text"] { padding: 10px 25px; font-size: 16px; font-weight: bold; border: none; border-radius: 30px; cursor: pointer; box-shadow: 0 4px 0 #bf360c, 0 5px 10px rgba(0,0,0,0.5); transition: transform 0.1s; }
        .btn-start { font-size: 2em; padding: 15px 40px; background: linear-gradient(to bottom, #ff5722, #e64a19); color: white; }
        .btn-start:active { box-shadow: 0 0 0 #bf360c; transform: translateY(4px); }
        .btn-settings { font-size: 1.2em; padding: 12px 0; width: 100%; background: linear-gradient(to bottom, #0288d1, #01579b); color: white; box-shadow: 0 4px 0 #014377, 0 5px 10px rgba(0,0,0,0.5); margin-top: 15px; }
        .btn-settings:active { box-shadow: 0 0 0 #014377; transform: translateY(4px); }
        .btn-achievements { font-size: 1.2em; padding: 12px 0; width: 100%; background: linear-gradient(to bottom, #ab47bc, #7b1fa2); color: white; box-shadow: 0 4px 0 #4a148c, 0 5px 10px rgba(0,0,0,0.5); margin-top: 15px; }
        .btn-achievements:active { box-shadow: 0 0 0 #4a148c; transform: translateY(4px); }

        #btn-ingame-audio, #btn-quit-game { position: absolute; top: 10px; width: 45px; height: 45px; border-radius: 50%; font-size: 1.5em; padding: 0; display: flex; justify-content: center; align-items: center; z-index: 100; background: rgba(0,0,0,0.6); border: 2px solid rgba(255,255,255,0.3); color: #ddd; transition: background 0.2s, transform 0.1s; box-shadow: none !important; }
        #btn-ingame-audio { right: 10px; }
        #btn-quit-game { left: 10px; }
        #btn-ingame-audio:hover, #btn-quit-game:hover { background: rgba(255, 87, 34, 0.8); transform: scale(1.1); color: white; }
        
        .btn-confirm-choice { width: 80px; height: 80px; border-radius: 50%; font-size: 2.5em; border: 3px solid rgba(255,255,255,0.3); box-shadow: 0 5px 15px rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; color: white; cursor: pointer; }
        .btn-confirm-choice:hover { transform: scale(1.1); filter: brightness(1.2); }

        button:not(.btn-start):not(.btn-settings):not(.btn-achievements):not(.small-btn):not(#btn-close-settings):not(#btn-close-audio):not(#btn-ingame-audio):not(#btn-quit-game):not(.btn-confirm-choice):not(.reset-btn) { background: linear-gradient(to bottom, #ff5722, #e64a19); color: white; }
        button:disabled { background: #78909c !important; box-shadow: none; cursor: not-allowed; color: #ccc; }
        input[type="text"] { background: white; color: #333; box-shadow: 0 4px 0 #999; text-align: center; width: 200px; margin-bottom: 15px; }
        select { background: #37474f; color: white; box-shadow: 0 4px 0 #263238, 0 5px 10px rgba(0,0,0,0.5); text-align: center; padding: 10px 20px; border-radius: 20px; font-size: 1em; width: 100%; margin-bottom: 15px; cursor: pointer; }
        /* Style for disabled options */
        option:disabled { color: #888; font-style: italic; background-color: #263238; }

        #score-display { font-size: 1.0em; font-weight: bold; color: #ffca28; text-shadow: 2px 2px 4px black; background: rgba(0,0,0,0.6); padding: 5px 15px; border-radius: 20px; border: 1px solid #ffca28; }

        .menu-wrapper { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 350px; }
        .btn-start { width: 100%; }
        #sub-menu { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 15px; width: 100%; }
        .small-btn { font-size: 1.1em; padding: 10px 0; flex: 1; min-width: 80px; background: linear-gradient(to bottom, #546e7a, #37474f); box-shadow: 0 4px 0 #263238, 0 5px 10px rgba(0,0,0,0.5); color: white; }

        .overlay-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 5000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
        .overlay-bg.visible { opacity: 1; pointer-events: all; }
        .settings-box { background-color: rgba(0, 0, 0, 0.85); background-blend-mode: multiply; padding: 30px; border-radius: 20px; border: 2px solid rgba(255,255,255,0.2); width: 90%; max-width: 400px; box-shadow: 0 0 40px rgba(0,0,0,0.8); position: relative; }
        /* Larger box for achievements */
        .settings-box.large { max-width: 800px; max-height: 85vh; overflow-y: auto; width: 95%; padding: 20px; }
        
        .close-x { position: absolute; top: 15px; right: 20px; font-size: 1.5em; color: #aaa; cursor: pointer; font-weight: bold; transition: color 0.2s; z-index: 10; }
        .settings-group { margin-bottom: 20px; }
        .settings-label { display: block; margin-bottom: 5px; color: #ccc; font-size: 1em; font-weight: bold; }
        input[type=range] { width: 100%; accent-color: #ff5722; cursor: pointer; height: 10px; border-radius: 5px; margin-bottom: 10px; }

        .card { width: var(--card-w-hand); height: var(--card-h-hand); border-radius: 12px; box-shadow: 3px 3px 10px rgba(0,0,0,0.5); position: relative; background-color: transparent; background-size: cover; background-position: center; background-repeat: no-repeat; will-change: transform, left, top; transform: none; flex-shrink: 0; }
        @keyframes glowFade { 0% { box-shadow: 0 0 20px 5px gold; border: 2px solid gold; } 100% { box-shadow: 3px 3px 10px rgba(0,0,0,0.5); border: none; } }
        .new-card-glow { animation: glowFade 3s ease-out forwards; }
        .stack-slot .card, .flying-card .card { width: var(--card-w-table); height: var(--card-h-table); border-radius: 16px; box-shadow: 5px 5px 15px rgba(0,0,0,0.6); }
        .card.back { background-image: url('cardback.png'); }
        .card span { display: none; }
        #player-hand .card { cursor: grab; z-index: 10; transition: transform 0.2s, margin 0.2s, z-index 0s, box-shadow 0.2s; box-shadow: 0 -2px 10px rgba(0,0,0,0.5); }
        #player-hand .card:hover { transform: translateY(-50px) scale(1.1) rotate(0deg) !important; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
        #player-hand .card.is-dragging { opacity: 0; }
        .flying-card { position: fixed; z-index: 9999; pointer-events: none; transition: top 0.6s cubic-bezier(0.25, 1, 0.5, 1), left 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.6s, width 0.3s, height 0.3s; box-shadow: 20px 20px 40px rgba(0,0,0,0.7); }

        #message-log { position: absolute; top: 70px; right: 10px; width: 300px; pointer-events: none; z-index: 2000; }
        .toast { background: rgba(0,0,0,0.8); color: white; padding: 10px 15px; margin-bottom: 5px; border-radius: 8px; font-size: 1em; animation: fadeIn 0.3s forwards; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        @keyframes fadeIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

        #overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 1000; background-blend-mode: multiply; background-color: rgba(0,0,0,0.8); opacity: 0; pointer-events: none; transition: opacity 0.5s; }
        #overlay.visible { opacity: 1; pointer-events: all; }
        #game-logo { max-width: 80%; max-height: 250px; margin-bottom: 10px; filter: drop-shadow(0 0 15px rgba(0,0,0,0.8)); animation: floatLogo 4s ease-in-out infinite; cursor: pointer; }
        @keyframes floatLogo { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }
        #games-played-display { font-size: 1.2em; color: #ddd; margin-bottom: 20px; font-style: italic; }
        #credits { position: absolute; bottom: 20px; width: 100%; text-align: center; font-size: 0.8em; color: rgba(255,255,255,0.7); text-shadow: 1px 1px 2px black; pointer-events: none; }
        #company-logo { position: absolute; bottom: 20px; right: 20px; max-width: 80px; max-height: 60px; opacity: 0.7; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }

        #game-over-screen { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.5s; }
        #game-over-screen.visible { opacity: 1; pointer-events: all; }
        .go-content-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; width: 90%; max-width: 400px; }
        .close-highscore-x { position: absolute; top: -40px; right: 0; font-size: 2em; color: rgba(255,255,255,0.5); cursor: pointer; transition: color 0.2s; display: none; }
        .close-highscore-x:hover { color: white; }
        #go-title { font-size: 3em; margin: 0; text-shadow: 0 0 20px gold; }
        #go-subtitle { font-size: 1.5em; margin: 10px 0 30px 0; color: #ddd; }
        #go-score { font-size: 2.5em; color: #ffca28; margin-bottom: 20px; text-shadow: 0 0 10px rgba(255, 202, 40, 0.5); display: none; }
        #go-input-area { display: none; flex-direction: column; align-items: center; z-index: 2005; width: 100%; }
        #go-image { max-width: 80%; max-height: 300px; margin-bottom: 20px; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        @keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
        
        .confetti { position: absolute; width: 10px; height: 10px; background-color: #f00; animation: confetti-fall 3s linear forwards; }
        @keyframes confetti-fall { 0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }
        .rain-drop { position: absolute; width: 2px; height: 15px; background: rgba(174, 194, 224, 0.6); animation: rain-fall 0.7s linear infinite; }
        @keyframes rain-fall { 0% { transform: translateY(-10vh); } 100% { transform: translateY(110vh); } }
        .grayscale-filter { filter: grayscale(0.8) contrast(1.2); transition: filter 2s; }
        .hidden { display: none !important; }

        /* --- INTEGRATED ACHIEVEMENT STYLES --- */
        .category-row {
            background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 15px; margin-bottom: 20px; padding: 15px;
            display: flex; flex-direction: column; gap: 15px;
        }
        .cat-header {
            display: flex; justify-content: space-between; align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px;
            margin-bottom: 5px; color: #eee; font-size: 1.1em; font-weight: bold;
        }
        .cat-content { display: flex; align-items: center; gap: 20px; }
        .current-badge {
            width: 80px; height: 80px; flex-shrink: 0; display: flex; flex-direction: column;
            align-items: center; justify-content: center; background: rgba(0,0,0,0.3);
            border-radius: 50%; border: 3px solid #555; transition: all 0.3s; position: relative;
        }
        .current-badge.locked { opacity: 0.6; filter: grayscale(1); }
        .current-badge svg { width: 40px; height: 40px; fill: currentColor; filter: drop-shadow(0 0 3px black); }
        .badge-rank-name {
            position: absolute; bottom: -25px; font-size: 0.8em; white-space: nowrap;
            font-weight: bold; text-transform: uppercase; text-shadow: 1px 1px 2px black;
        }
        .current-badge.rank-kupfer { border-color: var(--rank-kupfer); color: var(--rank-kupfer); }
        .current-badge.rank-bronze { border-color: var(--rank-bronze); color: var(--rank-bronze); }
        .current-badge.rank-silber { border-color: var(--rank-silber); color: var(--rank-silber); }
        .current-badge.rank-gold   { border-color: var(--rank-gold);   color: var(--rank-gold); box-shadow: 0 0 15px rgba(255, 202, 40, 0.3); }
        .current-badge.rank-platin { border-color: var(--rank-platin); color: var(--rank-platin); box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); }
        .current-badge.rank-diamant{ border-color: var(--rank-diamant); color: var(--rank-diamant); box-shadow: 0 0 25px rgba(185, 242, 255, 0.5); }

        .progress-area { flex: 1; display: flex; flex-direction: column; gap: 8px; }
        .progress-bar-container { display: flex; height: 12px; width: 100%; gap: 4px; background: rgba(0,0,0,0.5); padding: 2px; border-radius: 8px; }
        .p-segment { flex: 1; background: #333; border-radius: 4px; transition: background 0.5s; position: relative; }
        .p-segment.filled-kupfer { background: var(--rank-kupfer) !important; box-shadow: 0 0 5px var(--rank-kupfer); }
        .p-segment.filled-bronze { background: var(--rank-bronze) !important; box-shadow: 0 0 5px var(--rank-bronze); }
        .p-segment.filled-silber { background: var(--rank-silber) !important; box-shadow: 0 0 5px var(--rank-silber); }
        .p-segment.filled-gold   { background: var(--rank-gold) !important;   box-shadow: 0 0 8px var(--rank-gold); }
        .p-segment.filled-platin { background: var(--rank-platin) !important; box-shadow: 0 0 10px var(--rank-platin); }
        .p-segment.filled-diamant{ background: var(--rank-diamant) !important;box-shadow: 0 0 12px var(--rank-diamant); }
        .next-goal { font-size: 0.9em; color: #aaa; font-style: italic; margin-top: 5px; }
        .next-goal strong { color: #fff; }

        .secret-section { margin-top: 40px; border-top: 2px dashed rgba(255,255,255,0.2); padding-top: 20px; }
        .secret-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; margin-top: 15px; }
        .secret-card { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 10px; display: flex; align-items: center; gap: 10px; }
        .secret-card.rank-kupfer { border-color: var(--rank-kupfer); }
        .secret-card.rank-bronze { border-color: var(--rank-bronze); }
        .secret-card.rank-silber { border-color: var(--rank-silber); }
        .secret-card.rank-gold   { border-color: var(--rank-gold);   }
        .secret-card.rank-platin { border-color: var(--rank-platin); }
        .secret-card.rank-diamant{ border-color: var(--rank-diamant); }

        .reset-btn { background: linear-gradient(to bottom, #546e7a, #37474f) !important; color: #ffcdd2 !important; box-shadow: 0 4px 0 #263238 !important; font-size: 0.9em; padding: 10px 20px; margin-top: 20px; }

        @media (max-width: 600px) {
            .cat-content { flex-direction: row; }
            .current-badge { width: 60px; height: 60px; }
            .current-badge svg { width: 30px; height: 30px; }
            .badge-rank-name { font-size: 0.7em; bottom: -20px; }
        }

        /* --- NEUE BUTTONS (Statistik / Taegliche Herausforderung) --- */
        /* Schatten bewusst gleiches Rot wie .btn-start (#bf360c), nicht die eigene (gruene) Akzentfarbe -
           auf Wunsch des Nutzers, damit der "gedrueckt"-Effekt optisch zum Hauptbutton passt. */
        .btn-stats { font-size: 1.2em; padding: 12px 0; width: 100%; background: linear-gradient(to bottom, #26a69a, #00695c); color: white; box-shadow: 0 4px 0 #bf360c, 0 5px 10px rgba(0,0,0,0.5); margin-top: 15px; }
        .btn-stats:active { box-shadow: 0 0 0 #bf360c; transform: translateY(4px); }

        /* Taegliche Herausforderung: soll sich bewusst vom Rest abheben - eigene Farbe (Gold/Amber)
           plus ein langsam rotierender, regenbogenfarbener Ring hinter dem Button. Die Rotation wird
           ueber den Gradient-Winkel selbst animiert (nicht per transform:rotate auf das Element) -
           sonst wuerde die laengliche Pill-Form beim Drehen weit ueber den Button hinausschwingen. */
        @property --daily-ring-angle {
            syntax: '<angle>';
            inherits: false;
            initial-value: 0deg;
        }
        .btn-daily {
            /* Kein eigenes z-index hier (nur position:relative) - sonst wuerde .btn-daily eine eigene
               Stacking-Context bilden, in der ein negativer z-index-Nachfahre VOR (statt hinter) dem
               eigenen Hintergrund gemalt wird und die ganze Flaeche einfaerbt statt nur den Rand. */
            position: relative;
            font-size: 1.2em; padding: 12px 0; width: 100%;
            background: linear-gradient(to bottom, #ffca28, #ff8f00);
            color: #2b1600;
            box-shadow: 0 4px 0 #b26a00, 0 5px 10px rgba(0,0,0,0.5);
            margin-top: 15px;
        }
        .btn-daily:active { box-shadow: 0 0 0 #b26a00; transform: translateY(4px); }
        .btn-daily::before {
            content: "";
            position: absolute;
            inset: -4px;
            border-radius: 34px;
            background: conic-gradient(from var(--daily-ring-angle), #ff1744, #ff9100, #ffea00, #00e676, #00b0ff, #d500f9, #ff1744);
            z-index: -1;
            animation: daily-ring-spin 4s linear infinite;
        }
        @keyframes daily-ring-spin { from { --daily-ring-angle: 0deg; } to { --daily-ring-angle: 360deg; } }
        @media (prefers-reduced-motion: reduce) { .btn-daily::before { animation: none; } }

        /* --- STATISTIK-DASHBOARD --- */
        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 25px; }
        .stat-tile { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 15px; text-align: center; }
        .stat-value { font-size: 1.8em; font-weight: bold; color: #ffca28; text-shadow: 1px 1px 3px black; line-height: 1.2; }
        .stat-label { font-size: 0.85em; color: var(--text-secondary); margin-top: 5px; }
        .stats-section-title { color: #00e676; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; margin-top: 25px; margin-bottom: 15px; }
        .compare-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
        .compare-label { width: 90px; flex-shrink: 0; font-size: 0.9em; color: var(--text-secondary); text-align: right; }
        .compare-track { flex: 1; background: rgba(0,0,0,0.4); border-radius: 6px; height: 22px; overflow: hidden; }
        .compare-fill { height: 100%; border-radius: 6px 0 0 6px; display: flex; align-items: center; padding-left: 8px; font-size: 0.8em; font-weight: bold; color: white; text-shadow: 1px 1px 2px black; white-space: nowrap; transition: width 0.6s ease; }
        .compare-fill.day { background: var(--series-day); }
        .compare-fill.night { background: var(--series-night); }
        .compare-legend { display: flex; gap: 20px; justify-content: center; margin-top: 10px; font-size: 0.85em; color: var(--text-secondary); }
        .compare-legend span { display: inline-flex; align-items: center; gap: 6px; }
        .legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
        .legend-dot.day { background: var(--series-day); }
        .legend-dot.night { background: var(--series-night); }

        /* --- MODE BADGE (Uebungsmodus / Taegliche Herausforderung im Spiel) --- */
        #mode-badge { font-size: 0.85em; font-weight: bold; padding: 4px 12px; border-radius: 20px; text-shadow: 1px 1px 2px black; }
        #mode-badge.practice { background: rgba(120,144,156,0.8); border: 1px solid #cfd8dc; }
        #mode-badge.daily { background: rgba(255,143,0,0.85); border: 1px solid #ffca28; }

        /* --- DAILY CHALLENGE LEADERBOARD --- */
        .daily-lb-row { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 0.95em; }
        .daily-lb-row:nth-child(1) { color: gold; font-weight: bold; }
        .daily-lb-row:nth-child(2) { color: silver; }
        .daily-lb-row:nth-child(3) { color: #cd7f32; }