/*!
 *      __  ____  
 *     / / |___ \ 
 *    / /    __) |
 *   < <    |_ Wetter-Pulse.de
 *    \ \   ___) |
 *     \_\ |____/ 
 *
 *  (c) 2025-2026 Daniel Frey | https://wetter-puls.de
 *  Author:  Daniel Frey <daniel@dan.jetzt>
 *  License: Proprietary & Confidential - All Rights Reserved
 *
 *  Wetterfrosch 3D Minigames: Summer Jump & Arcade Styling
 */

/* 1. Hub & Game Container */
.game-hub-hero {
    background: radial-gradient(circle at 50% 20%, rgba(30, 60, 114, 0.45) 0%, rgba(11, 15, 25, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.game-card {
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(12px);
}

.game-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 14px 30px rgba(0, 210, 255, 0.15);
}

/* 2. 3D Viewport & Canvas (Performance Fixed Resolution & Pixelated Fullscreen) */
.game-viewport-wrap {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 520px;
    max-height: 850px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.game-viewport-wrap:fullscreen,
.game-viewport-wrap:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#gameCanvas:active {
    cursor: grabbing;
}

/* 3. Retro CRT Scanline Overlay */
.scanlines-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.03),
        rgba(0, 255, 0, 0.01),
        rgba(0, 255, 0, 0.03)
    );
    background-size: 100% 4px, 6px 100%;
    z-index: 10;
    opacity: 0.5;
}

/* 4. Game HUD (Heads-Up-Display) */
.game-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 20px;
}

.hud-top-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hud-pill {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 9999px;
    font-family: 'K2D', sans-serif;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.hud-pill .score-num {
    font-family: monospace;
    font-size: 1.25rem;
    color: #ffe866;
    letter-spacing: 1px;
}

.hud-hearts {
    display: flex;
    gap: 4px;
    font-size: 1.2rem;
}

.hud-heart {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hud-heart.lost {
    opacity: 0.25;
    transform: scale(0.8);
    filter: grayscale(1);
}

/* Schwitz-o-Meter Gauge */
.heat-meter-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 100, 0, 0.3);
    padding: 4px 12px;
    border-radius: 9999px;
    box-shadow: 0 4px 15px rgba(255, 60, 0, 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.heat-meter-wrap.critical {
    border-color: #ff0055;
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.8);
    animation: heatPulse 0.6s infinite alternate;
}

@keyframes heatPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.heat-meter-bar {
    width: 90px;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.heat-meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00d2ff 0%, #ffaa00 50%, #ff0055 100%);
    border-radius: 5px;
    transition: width 0.15s ease-out;
}

/* Habanero Chili Boost Badge */
.chili-boost-badge {
    background: linear-gradient(90deg, #ff0055, #ff5500);
    color: #fff;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: chiliGlow 0.4s infinite alternate;
}

@keyframes chiliGlow {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.06); filter: brightness(1.3); }
}

/* Phase Announcement Banner */
.phase-banner {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 20px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 5. Modals & Overlays (Start / Pause / Game Over) */
.game-overlay-modal {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 24, 0.88);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 20px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.game-overlay-modal.d-none {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content-box {
    max-width: 540px;
    width: 100%;
    background: rgba(22, 27, 34, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 210, 255, 0.2);
    text-align: center;
    position: relative;
}

/* 6. Consent Checkbox Styling */
.consent-agreement-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    margin: 18px 0;
}

.consent-checkbox-label {
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* 7. Virtual Mobile Touch D-Pad */
.touch-controls-layer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    z-index: 25;
}

.touch-btn-group {
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.touch-arcade-btn {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    user-select: none;
    touch-action: manipulation;
    transition: transform 0.1s ease, background 0.1s ease;
}

.touch-arcade-btn:active {
    transform: scale(0.9);
    background: rgba(0, 210, 255, 0.4);
    border-color: #00d2ff;
}

/* 8. Replay Stream Banner */
.replay-live-banner {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ff0055, #ff5500);
    color: #fff;
    padding: 4px 16px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.5);
    z-index: 22;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulseGlow 1.8s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 10px rgba(255, 0, 85, 0.4); }
    100% { transform: translateX(-50%) scale(1.04); box-shadow: 0 0 25px rgba(255, 85, 0, 0.8); }
}

/* 9. Tornado Chase - Camera Flash & Polaroid Snapshot */
.photo-flash-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    opacity: 0.85;
    z-index: 25;
    pointer-events: none;
    transition: opacity 0.12s ease-out;
}

.polaroid-snapshot-card {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 240px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 10px 14px 10px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(168, 85, 247, 0.4);
    z-index: 26;
    transform: rotate(-3deg) scale(1);
    animation: polaroidPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    border: 3px solid #fff;
}

@keyframes polaroidPop {
    0% { transform: rotate(8deg) scale(0.6) translateY(40px); opacity: 0; }
    100% { transform: rotate(-3deg) scale(1) translateY(0); opacity: 1; }
}

.polaroid-viewfinder {
    height: 130px;
    background: radial-gradient(circle, #2d1045 0%, #0c0517 100%);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4a1d6d;
}

.polaroid-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.viewfinder-crosshair {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

.polaroid-badge {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.polaroid-footer {
    margin-top: 10px;
    text-align: center;
    color: #1e1b4b;
}

.polaroid-dist {
    font-size: 0.76rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
}

.polaroid-pts {
    font-size: 1.15rem;
    font-weight: 900;
    color: #9333ea;
    font-family: 'K2D', sans-serif;
    letter-spacing: 0.5px;
}

/* Hall of Fame - Polaroid Modal */
.polaroid-modal-box {
    background: #ffffff !important;
    max-width: 440px !important;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.polaroid-frame-large {
    background: #ffffff;
    padding: 12px 12px 18px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.polaroid-large-img-wrap {
    width: 100%;
    height: 240px;
    background: #000;
    overflow: hidden;
    border-radius: 4px;
}

.polaroid-large-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


