/* ========================================================
   escape.labs ❖ Master Stylesheet (v0.0.2)
   ======================================================== */

:root {
    --accent: #e50914;
    --accent-glow: rgba(229, 9, 20, 0.35);
    --bg-outer: #09090b;
    --bg-inner: #131317;
    --text-color: #f4f4f7;
    --text-muted: #8b8b96;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(19, 19, 23, 0.97);
    --font-size: 16px;
}

html { 
    font-size: var(--font-size); 
}

body.light-mode {
    --bg-outer: #f0f2f5;
    --bg-inner: #ffffff;
    --text-color: #121215;
    --text-muted: #6c6c77;
    --border: rgba(0, 0, 0, 0.08);
    --glass: rgba(255, 255, 255, 0.98);
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'All Round Gothic', 'Allround Gothic', 'Comfortaa', 'Poppins', sans-serif;
    background-color: var(--bg-outer);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

/* ================= SPLASH SCREEN ================= */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #050507; display: flex; flex-direction: column;
    align-items: center; justify-content: center; z-index: 99999;
    transition: opacity 0.8s ease, transform 0.8s ease;
}
#splash-screen.fade-out { 
    opacity: 0; 
    transform: scale(1.05); 
    pointer-events: none; 
}
.splash-logo {
    font-size: 2.3rem; font-weight: 700; letter-spacing: 2px; color: #fff;
    text-transform: lowercase; margin-bottom: 6px;
}
.splash-logo span { color: var(--accent); }
.splash-tag { 
    font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; 
    color: var(--text-muted); font-weight: 600; 
}

/* ================= HEADER ================= */
header {
    position: sticky; top: 0; z-index: 50;
    padding: 10px 14px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-inner); border-bottom: 1px solid var(--border);
}

.header-left { display: flex; align-items: center; }

.brand-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    text-align: center;
}
.brand-title span { color: var(--accent); }

@media (max-width: 420px) {
    .brand-title {
        position: static;
        transform: none;
        flex: 1;
        text-align: center;
        font-size: 1.15rem;
        padding-left: 6px;
    }
}

.icon-btn {
    cursor: pointer; padding: 7px; border-radius: 50%; transition: 0.2s;
    font-size: 23px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-color); background: transparent; border: none;
}
.icon-btn:hover { background: rgba(128,128,128,0.12); color: var(--accent); }

/* ================= VIEWPORT ================= */
main {
    flex: 1; display: flex; justify-content: center; align-items: flex-start;
    padding: 16px 12px 20px 12px;
}
body.in-game main { padding-bottom: 80px; }

.view-section { display: none; width: 100%; max-width: 520px; animation: fadeIn 0.25s ease; }
@media (min-width: 768px) {
    .view-section { max-width: 620px; }
    main { padding: 24px 20px; }
}
.view-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ================= GLAS-KARTEN & UI ================= */
.glass-card {
    background-color: var(--bg-inner); border: 1px solid var(--border);
    border-radius: 22px; padding: 22px 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 16px; position: relative;
}
.badge {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    color: var(--accent); display: inline-block; margin-bottom: 6px;
}

.hub-tabs {
    display: flex; gap: 8px; margin-bottom: 16px; background: rgba(128,128,128,0.06);
    padding: 4px; border-radius: 14px; border: 1px solid var(--border);
}
.hub-tab-btn {
    flex: 1; padding: 10px; border-radius: 10px; border: none; background: transparent;
    color: var(--text-muted); font-size: 0.85rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit;
}
.hub-tab-btn.active {
    background: var(--accent); color: #fff; box-shadow: 0 2px 10px var(--accent-glow);
}

/* ================= SEITEN-PANELS ================= */
.side-panel {
    position: fixed; top: 0; width: 100%; max-width: 320px; height: 100%;
    background: var(--glass); backdrop-filter: blur(25px); z-index: 1000;
    transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1); padding: 24px 20px;
    overflow-y: auto; color: var(--text-color);
}
#menu-panel { left: -100%; border-right: 1px solid var(--border); }
#settings-panel { right: -100%; border-left: 1px solid var(--border); }
#menu-panel.active { left: 0; box-shadow: 10px 0 40px rgba(0,0,0,0.4); }
#settings-panel.active { right: 0; box-shadow: -10px 0 40px rgba(0,0,0,0.4); }

.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.panel-header h2 { font-size: 0.95rem; letter-spacing: 1px; font-weight: 700; }
.menu-link {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: 14px; cursor: pointer; transition: 0.2s; margin-bottom: 6px;
    font-weight: 600; font-size: 0.9rem; color: var(--text-color); text-decoration: none;
}
.menu-link:hover { background: rgba(128, 128, 128, 0.1); color: var(--accent); }
.menu-divider {
    font-size: 0.7rem; font-weight: 700; color: var(--text-muted);
    letter-spacing: 1px; text-transform: uppercase; margin: 18px 0 8px 10px;
}

/* ================= INPUTS & BUTTONS ================= */
.clean-input {
    width: 100%; padding: 14px; border-radius: 14px;
    border: 1px solid var(--border); background: rgba(128,128,128,0.06);
    color: var(--text-color); outline: none; font-size: 1rem; margin: 10px 0; font-family: inherit;
}
.clean-input:focus { border-color: var(--accent); }

.btn-main {
    width: 100%; background: var(--accent); color: #fff;
    border: none; padding: 14px; border-radius: 14px;
    font-weight: 700; font-size: 0.95rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 15px var(--accent-glow); font-family: inherit;
}
.btn-main:active { transform: scale(0.98); }
.btn-sub {
    width: 100%; background: rgba(128,128,128,0.08); color: var(--text-color);
    border: 1px solid var(--border); padding: 12px; border-radius: 14px;
    font-weight: 600; cursor: pointer; font-size: 0.85rem; margin-top: 6px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit;
}

.game-thumb-card {
    background: rgba(128,128,128,0.04); border: 1px solid var(--border);
    border-radius: 18px; padding: 18px; margin-bottom: 12px;
    cursor: pointer; transition: 0.2s;
}
.game-thumb-card:hover { border-color: var(--accent); }

.preview-image {
    width: 100%; height: 180px; object-fit: cover;
    border-radius: 14px; margin: 10px 0; border: 1px solid var(--border); background: #111;
}

.toast-banner {
    background: var(--accent-glow); border-left: 3px solid var(--accent);
    padding: 12px 14px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 14px;
}

/* ================= IN-GAME BOTTOM NAVIGATION ================= */
#game-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 65px;
    background: var(--bg-inner); border-top: 1px solid var(--border);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 100; max-width: 620px; margin: 0 auto; backdrop-filter: blur(10px);
}
.nav-btn {
    background: none; border: none; color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-family: inherit; font-size: 0.72rem; cursor: pointer; flex: 1;
}
.nav-btn.active { color: var(--accent); font-weight: 700; }
.nav-btn .material-symbols-rounded { font-size: 22px; }

#game-map {
    width: 100%; height: 350px; border-radius: 14px; border: 1px solid var(--border); margin: 12px 0;
}

/* ================= MODALS ================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
    z-index: 2000; display: none; align-items: center; justify-content: center; padding: 14px;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--bg-inner); border: 1px solid var(--border);
    border-radius: 20px; width: 100%; max-width: 480px; padding: 20px; max-height: 92vh; overflow-y: auto;
}

/* ================= CRYPTEX / ZAHLENSCHLOSS ================= */
.cryptex-container {
    display: flex; justify-content: center; gap: 10px; margin: 16px 0;
}
.cryptex-dial {
    display: flex; flex-direction: column; align-items: center;
    background: rgba(128,128,128,0.08); border: 1px solid var(--border);
    border-radius: 12px; padding: 6px; width: 55px;
}
.cryptex-val {
    font-size: 1.8rem; font-weight: 700; color: var(--accent);
    font-family: monospace; padding: 6px 0;
}

/* ================= SORTIER-LISTE (TIMELINE) ================= */
.sort-item {
    background: rgba(128,128,128,0.06); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 14px; margin-bottom: 6px;
    display: flex; justify-content: space-between; align-items: center;
}

/* ================= FAKE-ANRUF OVERLAY ================= */
#call-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000; z-index: 10000; display: none; flex-direction: column;
    justify-content: space-between; align-items: center; padding: 60px 20px 50px 20px;
}
#call-overlay.active { display: flex; }
.call-pulsar {
    width: 110px; height: 110px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 2px solid var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 45px; color: #fff; animation: callPulse 1.5s infinite;
}
@keyframes callPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 25px transparent; }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 transparent; }
}

/* ================= KONFETTI CANVAS ================= */
#confetti-canvas {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9999;
}

/* ================= SETTINGS CONTROLS ================= */
.round-icon-btn {
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--border); background: rgba(128,128,128,0.08);
    color: var(--text-color); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.round-icon-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

input[type="range"] {
    -webkit-appearance: none; width: 100%; height: 6px; background: rgba(128,128,128,0.2); border-radius: 3px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%;
    background: var(--accent); cursor: pointer; border: 2px solid var(--bg-inner);
}
input[type="color"] {
    -webkit-appearance: none; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; background: none;
}
input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 1px solid var(--border); }

/* ================= FOOTER ================= */
footer {
    padding: 22px 16px; text-align: center; font-size: 0.78rem;
    color: var(--text-muted); border-top: 1px solid var(--border); margin-top: auto; line-height: 1.6;
}
.footer-link { color: var(--text-color); text-decoration: none; font-weight: 600; }
.footer-link:hover { color: var(--accent); }

.hidden { display: none !important; }