/* --- Cyberpunk/Sci-Fi Theme Farbvariablen --- */
:root {
    --bg-dark: #020610;
    --panel-bg: #050c1e;
    --border-blue: #102a45;
    --neon-blue: #009df4;
    --neon-cyan: #38bdf8;
    --text-gray: #8fa0c0;
    --rarity-covert: #eb4b4b;
    --rarity-classified: #d32ce6;
    --rarity-restricted: #8847ff;
    --rarity-mil-spec: #4b69ff;
    --rarity-gold: #e4ae39;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; }
body {
    background-color: var(--bg-dark); color: #ffffff;
    font-family: 'Segoe UI', sans-serif; display: flex; flex-direction: column;
    height: 100vh; padding: 12px; overflow: hidden;
}

.logout-btn {
    background: rgba(235, 75, 75, 0.1);
    border: 1px solid #eb4b4b;
    color: #ff6b6b;
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background: #eb4b4b !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(235, 75, 75, 0.4);
}

/* --- TOPBAR --- */
.topbar { display: flex; justify-content: space-between; align-items: center; height: 50px; margin-bottom: 12px; }
.lvl-container { background: rgba(5, 12, 30, 0.6); border: 2px solid var(--border-blue); border-radius: 6px; padding: 6px 15px; display: flex; align-items: center; gap: 10px; font-weight: bold; }
.lvl-bar-mini { width: 80px; height: 6px; background: #030a18; border-radius: 3px; overflow: hidden; border: 1px solid #112d4e; }
.lvl-bar-mini-fill { width: 0%; height: 100%; background: var(--neon-blue); box-shadow: 0 0 8px var(--neon-blue); transition: width 0.3s ease; }
.coins-container { background: rgba(5, 12, 30, 0.6); border: 2px solid var(--border-blue); border-radius: 6px; padding: 6px 20px; display: flex; align-items: center; gap: 15px; font-weight: bold; font-size: 1.1rem; }
.coin-icon { width: 20px; height: 20px; border: 2px solid var(--neon-blue); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.6rem; color: var(--neon-blue); }

/* --- NAVBAR TABS --- */
.navbar {
    display: flex;
    justify-content: space-around;

    /* Leicht transparenter Hintergrund mit Blur-Effekt (iOS liebt das) */
    background: rgba(2, 8, 19, 0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);

    border: 1px solid #1a2f4c;
    border-radius: 20px; /* Löst das iPhone-Ecken-Problem komplett! */

    position: fixed;

    /* Wir heben die Leiste an: 15px Luft + den iOS-Wischbalken */
    bottom: calc(15px + env(safe-area-inset-bottom));
    left: 15px;
    width: calc(100% - 30px); /* 15px Abstand links und rechts */

    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    overflow: hidden; /* Hält den Hover-Effekt der Buttons in den runden Ecken */

    -webkit-user-select: none;
    user-select: none;
}

.tab-btn {
    /* 1. iOS DAS DESIGN VERBIETEN */
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;

    /* 2. EIGENES DESIGN AUFZWINGEN */
    flex: 1;
    background: transparent !important; /* Zwingt das Apple-Grau weg */
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b; /* var(--text-gray) */
    padding: 15px 5px;
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;

    /* 3. KLICKS AUF iOS ERZWINGEN */
    cursor: pointer;
    touch-action: manipulation !important; /* Tötet den 300ms Safari-Delay */
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important; /* Verhindert das blaue Blinken */
    outline: none !important;
}

/* --- AKTIVER TAB --- */
.tab-btn.active {
    color: #00ffcc !important; /* var(--neon-cyan) */
    border-bottom: 2px solid #00ffcc !important;
    background: rgba(0, 255, 204, 0.05) !important; /* Leichtes Neon-Leuchten */
}

/* --- MAIN PANEL --- */
.main-panel {
    flex: 1; background: var(--panel-bg); border: 2px solid var(--border-blue);
    border-radius: 0 8px 8px 8px; margin-top: -2px; padding: 16px;
    display: flex; flex-direction: column; overflow: hidden;
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* --- SPA SEITEN SYSTEM --- */
.view-page { display: none; width: 100%; height: 100%; }
.view-page.active { display: flex; flex-direction: column; }
.page-title { font-size: 1.1rem; font-weight: bold; margin-bottom: 12px; color: var(--neon-cyan); letter-spacing: 1px; }

/* --- LOGIN OVERLAY --- */
#login-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: var(--bg-dark); z-index: 999; display: flex; align-items: center; justify-content: center; }
.login-box { background: var(--panel-bg); border: 2px solid var(--border-blue); border-radius: 8px; padding: 30px; width: 90%; max-width: 350px; text-align: center; }
.login-input { width: 100%; padding: 12px; background: #030a18; border: 1px solid var(--border-blue); color: white; border-radius: 4px; margin-bottom: 12px; font-size: 1rem; }
.login-btn { width: 100%; padding: 12px; background: var(--neon-blue); border: none; color: white; font-weight: bold; border-radius: 4px; cursor: pointer; }

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 10px 4px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

.skin-card {
    background: #030918;
    border: 1px solid var(--border-blue);
    border-bottom: 3px solid var(--rarity-color, #fff); /* Untere Kante leuchtet in Raritätsfarbe */
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
    min-height: 160px;
}

.skin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 12px var(--rarity-color, rgba(0, 157, 244, 0.2));
    border-color: var(--rarity-color);
}

.skin-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 4px;
    border-radius: 0 0 6px 6px;
    background: var(--rarity-color, var(--text-gray));
    box-shadow: 0 -2px 6px var(--rarity-color);
}

/* Eck-Badge für die Menge x1, x10 */
.item-qty-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(3, 10, 28, 0.85);
    border: 1px solid var(--border-blue);
    color: var(--neon-cyan);
    font-family: monospace;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.skin-image-container {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 10px;
}

.skin-image-container img.skin-img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6));
}

.skin-image-stub {
    width: 80%;
    height: 80%;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(16, 42, 69, 0.5);
    border-radius: 4px;
}

.skin-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.sell-action-btn {
    width: 100%;
    background: #020712;
    border: 1px solid var(--border-blue);
    color: var(--text-gray);
    font-family: monospace;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sell-action-btn:hover {
    background: rgba(235, 75, 75, 0.1);
    border-color: #eb4b4b;
    color: #ff6b6b;
    box-shadow: 0 0 6px rgba(235, 75, 75, 0.2);
}

.shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px 4px;
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

.shop-card {
    background: #040b1a;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 180px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
.shop-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 157, 244, 0.3);
    transform: translateY(-1px);
}

.shop-img-box {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shop-img-box img {
    max-width: 85%;
    max-height: 100%;
    object-fit: contain;
}

.shop-item-title {
    font-size: 0.7rem;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.buy-btn {
    width: 100%;
    background: rgba(0, 157, 244, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-cyan);
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 6px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.buy-btn:hover {
    background: var(--neon-blue);
    color: #fff;
    box-shadow: 0 0 8px var(--neon-blue);
}

.clicker-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.case-title {
    font-size: 1.3rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #ffffff;
}

.case-image-wrapper {
    margin-bottom: 30px;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

#active-case-img {
    width: 200px;
    height: auto;
    display: none;
    filter: drop-shadow(0 0 15px rgba(0, 157, 244, 0.2));
    transition: transform 0.05s ease-out;
}

#active-case-img:active {
    transform: scale(0.92) rotate(1deg);
}

.case-placeholder {
    width: 180px;
    height: 140px;
    background: #ff66a3;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 102, 163, 0.3);
}

.click-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.click-stats {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.click-label { color: var(--text-gray); }
.click-count { color: var(--neon-cyan); }

.click-action-container {
    position: relative;
    width: 100%;
    height: 60px;
    background: #030a18;
    border: 2px solid var(--border-blue);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.click-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #092545 0%, #16437a 100%);
    border-right: 2px solid var(--neon-blue);
    transition: width 0.08s ease;
}

.click-trigger-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.footer-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
}

.sub-btn {
    flex: 1;
    background: #040b1a;
    border: 2px solid var(--border-blue);
    border-radius: 6px;
    color: #ffffff;
    padding: 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.sub-btn:hover { border-color: var(--neon-blue); }

.floating-text {
    position: absolute;
    color: var(--neon-cyan);
    font-weight: bold;
    font-size: 1.5rem;
    pointer-events: none;
    animation: floatUp 0.6s ease-out forwards;
    text-shadow: 0 0 8px var(--neon-blue);
    z-index: 10;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.8);
    }
}

.col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 10px 4px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.col-card {
    background: #050c1e;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.col-card.complete:not(.claimed) {
    border-color: var(--rarity-gold) !important;
    box-shadow: 0 0 12px rgba(228, 174, 57, 0.15);
}

.col-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 4px;
}

.col-desc {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.col-progress-box {
    margin-bottom: 14px;
}

.col-bar-bg {
    width: 100%;
    height: 8px;
    background: #020610;
    border: 1px solid #1a2f4c;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.col-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #009df4, #00ffcc);
    width: 0%;
    transition: width 0.5s ease;
}

.col-card.complete .col-bar-fill {
    background: linear-gradient(90deg, var(--rarity-gold), #fff7c2);
}

.col-status-txt {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    font-family: monospace;
    color: var(--text-gray);
    margin-top: 4px;
}

.col-reward-badge {
    font-size: 0.65rem;
    color: #e4ae39;
    font-weight: bold;
    background: rgba(228, 174, 57, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(228, 174, 57, 0.3);
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.col-claim-btn {
    width: 100%;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid #1a2f4c;
    color: #4b5563;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 4px;
    cursor: not-allowed;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.col-card.complete:not(.claimed) .col-claim-btn {
    background: rgba(228, 174, 57, 0.1);
    border-color: var(--rarity-gold);
    color: #ffffff;
    cursor: pointer;
}

.col-card.complete:not(.claimed) .col-claim-btn:hover {
    background: var(--rarity-gold);
    color: #000000;
    box-shadow: 0 0 10px rgba(228, 174, 57, 0.4);
}

.col-card.claimed .col-claim-btn {
    background: #020610;
    border-color: #111827;
    color: #374151;
    cursor: not-allowed;
}

.col-skins-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 12px;
    background: rgba(2, 6, 16, 0.4);
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #132237;
}

.col-skin-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #020610;
    border: 1px solid #1e293b;
    border-radius: 4px;
    padding: 2px;
    transition: all 0.2s ease;
    position: relative;
}

.col-skin-icon.missing {
    opacity: 0.25;
    filter: grayscale(1) contrast(0.8);
    border-color: rgba(235, 75, 75, 0.2);
}

.col-skin-icon.owned {
    border-color: #00ffcc;
}

.hq-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 10px 4px;
}

.hq-dashboard {
    background: radial-gradient(circle at top left, #071530, #030a19);
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.hq-live-income {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00ffcc;
    font-family: monospace;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.hq-season-badge {
    background: rgba(228, 174, 57, 0.1);
    border: 1px solid var(--rarity-gold);
    color: var(--rarity-gold);
    font-size: 0.7rem;
    font-family: monospace;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.hq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.hq-card {
    background: #050c1e;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
    transition: border-color 0.2s ease;
}

.hq-card:hover { border-color: var(--neon-cyan); }

.hq-card-header { display: flex; gap: 12px; align-items: center; }

.hq-icon-box {
    width: 45px;
    height: 45px;
    background: #020610;
    border: 1px solid #1a2f4c;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.hq-card-title { font-size: 0.9rem; font-weight: bold; color: #fff; }
.hq-card-level { font-size: 0.7rem; color: var(--neon-cyan); font-family: monospace; font-weight: bold; }

.hq-upgrade-btn {
    width: 100%;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--neon-cyan);
    color: #fff;
    padding: 10px;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hq-upgrade-btn:hover:not(:disabled) {
    background: var(--neon-cyan);
    color: #000;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.hq-upgrade-btn:disabled {
    border-color: #1a2f4c;
    color: #4b5563;
    background: #020610;
    cursor: not-allowed;
}

.hq-trophy-wall { background: #030814; border: 1px solid #132237; border-radius: 6px; padding: 16px; }
.hq-trophy-title { font-size: 0.8rem; font-weight: bold; color: var(--text-gray); margin-bottom: 12px; text-transform: uppercase; }
.hq-trophy-container { display: flex; flex-wrap: wrap; gap: 10px; }

.hq-trophy-item {
    width: 50px; height: 50px; background: #050c1e; border: 1px solid #1a2f4c; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; filter: grayscale(1) opacity(0.3);
}
.hq-trophy-item.unlocked {
    filter: grayscale(0) opacity(1); border-color: var(--rarity-gold);
    box-shadow: 0 0 8px rgba(228, 174, 57, 0.2);
    background: radial-gradient(circle, rgba(228, 174, 57, 0.1), #050c1e);
}

.opening-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #020712;
    border-radius: 6px;
    padding: 20px;
    position: relative;
}

.sub-btn {
    flex: 1;
    background: #040b1a;
    border: 2px solid var(--border-blue);
    border-radius: 6px;
    color: #ffffff;
    padding: 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.roulette-viewport {
    width: 100%;
    max-width: 600px;
    height: 110px;
    background: #030a1c;
    border: 2px solid var(--border-blue);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    margin: 25px 0 15px 0;
}

.roulette-marker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #eb4b4b;
    box-shadow: 0 0 10px #eb4b4b;
    z-index: 10;
    pointer-events: none;
}

.roulette-track {
    display: flex;
    gap: 6px;
    position: absolute;
    top: 5px;
    left: 0;
    height: 100px;
    will-change: transform;
    transition: transform 6s cubic-bezier(0.1, 0.6, 0.1, 1);
}

.roulette-item {
    width: 100px;
    height: 95px;
    background: #040e26;
    border: 1px solid rgba(16, 42, 69, 0.5);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 6px 4px;
    flex-shrink: 0;
    position: relative;
}
.roulette-item::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: var(--rarity-color, #fff); border-radius: 0 0 4px 4px;
}

.roulette-img { max-width: 80%; max-height: 55px; object-fit: contain; }
.roulette-name { font-size: 0.55rem; color: #a1b0cc; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ⏩ SKIP BUTTON STYLE */
.skip-btn {
    background: rgba(0, 157, 244, 0.1);
    border: 1px solid var(--border-blue);
    color: var(--neon-cyan);
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin-bottom: 15px;
}
.skip-btn:hover {
    background: var(--neon-blue);
    color: #ffffff;
    box-shadow: 0 0 10px var(--neon-blue);
}

#winner-popup {
    display: none;
    text-align: center;
    animation: fadeIn 0.4s ease;
}
#winner-popup h3 { color: var(--neon-cyan); margin-bottom: 15px; font-size: 1.4rem; text-shadow: 0 0 10px var(--neon-blue); }

/* Reveal-Effekt für den finalen Drop-Kasten */
.winner-card-display {
    width: 140px;
    background: #030a1c;
    border: 2px solid var(--winner-color, var(--border-blue));
    border-radius: 6px;
    padding: 10px;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 20px var(--winner-color);
}

@keyframes fadeIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.quest-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 10px 4px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.quest-card {
    background: #050c1e;
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.quest-info {
    flex-grow: 1;
}

.quest-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 4px;
}

.quest-desc {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

/* Fortschrittsbalken */
.quest-bar-bg {
    width: 100%;
    max-width: 350px;
    height: 10px;
    background: #020610;
    border: 1px solid var(--border-blue);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.quest-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #009df4, #e4ae39);
    width: 0%;
    transition: width 0.4s ease;
}

.quest-counter-txt {
    position: absolute;
    right: 8px;
    top: -2px;
    font-size: 0.55rem;
    font-family: monospace;
    color: #fff;
    font-weight: bold;
}

.quest-claim-btn {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid var(--neon-cyan);
    color: #ffffff;
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quest-claim-btn:hover:not(:disabled) {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.quest-claim-btn:disabled {
    border-color: #1a2f4c;
    color: #4b5563;
    background: #030814;
    cursor: not-allowed;
}

/* =========================================
   ⚡ 2. OPTISCHER JUICE (Wackeln & Partikel)
   ========================================= */
@keyframes intenseShake {
    0% { transform: translate(1px, 1px) rotate(0deg) scale(1.05); }
    20% { transform: translate(-1px, -2px) rotate(-1deg) scale(1.05); }
    40% { transform: translate(-2px, 0px) rotate(1deg) scale(1.05); }
    60% { transform: translate(2px, 2px) rotate(0deg) scale(1.05); }
    80% { transform: translate(1px, -1px) rotate(1deg) scale(1.05); }
    100% { transform: translate(-1px, 1px) rotate(-1deg) scale(1.05); }
}

.case-almost-open {
    animation: intenseShake 0.4s infinite;
    filter: drop-shadow(0 0 25px rgba(0, 157, 244, 0.6)) !important;
}

/* Neue dynamische Partikel-Animation */
.floating-particle {
    position: absolute;
    color: var(--neon-cyan);
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    text-shadow: 0 0 8px var(--neon-blue);
    z-index: 10;
    animation: particleBurst 0.6s cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

@keyframes particleBurst {
    0% { opacity: 1; transform: translate(0, 0) scale(0.5); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1.2); }
}

/* 3D-Hover für Karten */
.skin-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.skin-card:hover { transform: translateY(-4px) scale(1.02); z-index: 2; }

.trend-up { color: #39ff14 !important; text-shadow: 0 0 5px rgba(57, 255, 20, 0.4); }
.trend-down { color: #ff3b3b !important; text-shadow: 0 0 5px rgba(255, 59, 59, 0.4); }
.trend-stable { color: var(--text-gray); }

/* ⚡ FAST OPEN BUTTON */
.fast-open-btn {
    width: 100%;
    background: rgba(228, 174, 57, 0.1);
    border: 1px solid var(--rarity-gold);
    color: var(--rarity-gold);
    border-radius: 4px;
    padding: 6px 0;
    font-size: 0.65rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}
.fast-open-btn:hover {
    background: var(--rarity-gold);
    color: #000;
    box-shadow: 0 0 10px rgba(228, 174, 57, 0.5);
}

.profile-canvas {
    background-color: #030814;
    background-image:
            linear-gradient(rgba(0, 157, 244, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0, 157, 244, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 2px solid var(--border-blue);
    border-radius: 8px;
    min-height: 500px;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 15px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    overflow: hidden;
}

/* Das Standard-Widget */
.profile-widget {
    background: rgba(5, 12, 30, 0.9);
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 157, 244, 0.2);
    border-color: rgba(0, 157, 244, 0.5);
}

.widget-header {
    background: #02060d;
    padding: 4px 10px;
    font-size: 0.6rem;
    color: var(--text-gray);
    font-family: monospace;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.widget-header::before {
    content: "|||";
    letter-spacing: -1px;
    color: rgba(255,255,255,0.2);
    margin-right: 8px;
}

.widget-content {
    padding: 15px;
}

.widget-note {
    background: #fff8dc !important;
    color: #333 !important;
    border: none !important;
    transform: rotate(-2deg);
    font-family: 'Comic Sans MS', cursive, sans-serif;
}
.widget-note .widget-header {
    background: rgba(0,0,0,0.1);
    border: none;
    color: #666;
}

.profile-canvas {
    background-color: #030814;
    background-image:
            linear-gradient(rgba(0, 157, 244, 0.05) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0, 157, 244, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 2px solid var(--border-blue);
    border-radius: 8px;
    height: calc(100vh - 200px);
    min-height: 600px;
    position: relative; /* 🌟 WICHTIG FÜR DRAG & DROP */
    box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
    overflow: hidden;
}

.profile-widget {
    background: rgba(5, 12, 30, 0.9);
    border: 1px solid var(--border-blue);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    position: absolute;
    transition: box-shadow 0.2s ease;
}

.profile-canvas.editing .profile-widget {
    border: 1px dashed var(--neon-cyan);
    animation: pulseBorder 1.5s infinite;
}

@keyframes pulseBorder {
    0% { box-shadow: 0 0 5px var(--neon-cyan); }
    50% { box-shadow: 0 0 15px var(--neon-cyan); }
    100% { box-shadow: 0 0 5px var(--neon-cyan); }
}

/* Edit Button Style */
#edit-mode-btn {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}
#edit-mode-btn.active {
    background: var(--neon-cyan);
    color: #000;
}

.shop-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-blue);
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.8rem;
    text-align: center;
}
.shop-item:hover { background: var(--neon-cyan); color: #000; }

#widget-shop {
    background: #0b1526;
    border: 1px solid #1a2f4c;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
}
#shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 15px;
}
.shop-item {
    background: #111d2e;
    border: 1px solid #2a4a75;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}
.shop-item:hover { transform: translateY(-5px); border-color: var(--neon-cyan); }

.profile-widget {
    background: #050c1e;
    border: 1px solid #1a2f4c;
    border-radius: 8px;
    position: absolute;
    min-width: 150px;
    overflow: hidden;
}
.widget-header {
    background: #111d2e;
    padding: 5px 10px;
    font-size: 0.7rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #1a2f4c;
    cursor: move;
}
.widget-content {
    padding: 10px;
    font-family: monospace;
}
.widget-stats { border-color: var(--neon-cyan); }

button {
    touch-action: manipulation;
}

button, input[type="button"], input[type="submit"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-border-radius: 0;
    outline: none !important;
    opacity: 1 !important;
}

@media (max-width: 600px) {
    /* 1. Topbar schmaler machen und Notch-Support hinzufügen */
    .topbar {
        padding: 5px 10px !important;
        /* Verhindert, dass die Kamera (Notch) die Topbar überdeckt! */
        padding-top: calc(5px + env(safe-area-inset-top)) !important;
        gap: 5px; /* Weniger Abstand zwischen den drei Hauptblöcken */
    }

    /* 2. XP-Bar massiv kürzen, damit rechts Platz für die Coins bleibt */
    .xp-bar-container {
        width: 70px !important;
        height: 12px !important;
    }
    #xp-stats-txt {
        font-size: 0.5rem !important;
        line-height: 12px !important;
    }

    /* 3. Textgrößen und Abstände bei Level & Coins anpassen */
    #lvl-txt {
        font-size: 0.75rem;
    }
    .coins-container {
        padding: 2px 5px !important;
        gap: 0 !important;
    }
    #coins-txt {
        font-size: 0.9rem; /* Minimal kleiner, damit große Zahlen passen */
    }

    /* 4. Mute- & Logout-Buttons zusammenschieben */
    .lang-switcher {
        padding: 0 2px !important;
        gap: 4px !important;
    }
    .logout-btn {
        padding: 4px 6px !important;
        font-size: 0.65rem !important;
        margin-right: 2px !important;
    }
}

/* Scrollbar Design */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-blue); border-radius: 3px; }

body.theme-season-2 {
    --bg-dark: #051005;
    --panel-bg: #091a09;
    --border-blue: #164016;
    --neon-blue: #39ff14; /* Bio-Grün */
    --neon-cyan: #bfff00; /* Toxic-Gelb */
}