/* ============================================
   CyberJack – Cyberpunk Stylesheet
   ============================================ */

/* === CSS VARIABLES === */
:root {
    /* Colors */
    --bg-dark: #0a0a0f;
    --bg-panel: #12121f;
    --bg-card: #1a1a2e;
    --bg-input: #0f0f1a;
    
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00aa;
    --neon-yellow: #f0e000;
    --neon-green: #00ff6a;
    --neon-red: #ff003c;
    --neon-orange: #ff6600;
    
    --text-primary: #e0e0e8;
    --text-secondary: #888899;
    --text-dim: #555566;
    
    /* Glows */
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 30px rgba(0, 240, 255, 0.2);
    --glow-magenta: 0 0 10px rgba(255, 0, 170, 0.5), 0 0 30px rgba(255, 0, 170, 0.2);
    --glow-yellow: 0 0 10px rgba(240, 224, 0, 0.5), 0 0 30px rgba(240, 224, 0, 0.2);
    --glow-green: 0 0 10px rgba(0, 255, 106, 0.5), 0 0 30px rgba(0, 255, 106, 0.2);
    --glow-red: 0 0 10px rgba(255, 0, 60, 0.5), 0 0 30px rgba(255, 0, 60, 0.2);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-size-base: 18px;
    
    /* Layout */
    --header-h: 52px;
    --nav-h: 62px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    
    /* Borders */
    --border-subtle: 1px solid rgba(0, 240, 255, 0.15);
    --border-glow: 1px solid rgba(0, 240, 255, 0.4);
}

/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
    touch-action: manipulation;
}

/* Scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* === SCREENS === */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    z-index: 10;
}

.screen.active {
    display: flex;
}

/* === LOADING SCREEN === */
#loading-screen {
    background: var(--bg-dark);
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
}

.logo-cyber {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.logo-jack {
    color: var(--neon-magenta);
    text-shadow: var(--glow-magenta);
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
    border-radius: 2px;
    animation: loadingFill 1.8s ease-out forwards;
}

@keyframes loadingFill {
    0% { width: 0%; }
    60% { width: 70%; }
    100% { width: 100%; }
}

.loading-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* === AUTH SCREEN === */
#auth-screen {
    background: var(--bg-dark);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.auth-tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.2em;
    margin-top: 0.5rem;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeSlideUp 0.3s ease;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.cyber-input {
    width: 100%;
    height: 56px;
    background: var(--bg-input);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.cyber-input::placeholder {
    color: var(--text-dim);
}

.cyber-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan), inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.auth-error {
    color: var(--neon-red);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 0.75rem;
    min-height: 1.2rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.cyber-link {
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cyber-link:active {
    color: var(--neon-magenta);
}

/* === BUTTONS === */
.cyber-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    min-width: 60px;
    padding: 0 1.5rem;
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.06);
    color: var(--neon-cyan);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

.cyber-btn:active {
    transform: scale(0.96);
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.cyber-btn:active::before {
    left: 100%;
}

.cyber-btn-primary {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(255, 0, 170, 0.15));
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.cyber-btn-primary:active {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), 0 0 40px rgba(0, 240, 255, 0.3);
}

.cyber-btn-ghost {
    background: transparent;
    border-color: var(--text-dim);
    color: var(--text-secondary);
    box-shadow: none;
}

.cyber-btn-ghost:active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.btn-full {
    width: 100%;
}

.cyber-btn-sm {
    height: 48px;
    font-size: 0.9rem;
    padding: 0 1rem;
    border-width: 1px;
}

/* Game Action Buttons */
.cyber-btn-deal {
    width: 100%;
    height: 64px;
    font-size: 1.3rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 240, 255, 0.05));
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.cyber-btn-hit {
    flex: 1;
    height: 68px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 240, 255, 0.05));
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.cyber-btn-stand {
    flex: 1;
    height: 68px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, rgba(255, 0, 170, 0.15), rgba(255, 0, 170, 0.05));
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: var(--glow-magenta);
}

.cyber-btn-double {
    flex: 1;
    height: 68px;
    font-size: 1.05rem;
    background: linear-gradient(135deg, rgba(240, 224, 0, 0.15), rgba(240, 224, 0, 0.05));
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    box-shadow: var(--glow-yellow);
}

.cyber-btn-double:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.cyber-btn-reward {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, rgba(0, 255, 106, 0.2), rgba(0, 255, 106, 0.05));
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: var(--glow-green);
    flex-direction: column;
    gap: 2px;
    padding: 0.5rem;
}

.cyber-btn-reward:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.reward-btn-text {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
}

.reward-btn-amount {
    font-size: 1.1rem;
    font-weight: 800;
}

/* === TOP BAR === */
#top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 0.75rem;
    padding-top: var(--safe-top);
    background: linear-gradient(180deg, rgba(18, 18, 31, 0.95), rgba(10, 10, 15, 0.9));
    border-bottom: var(--border-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 20;
    flex-shrink: 0;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mini {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.level-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--neon-yellow);
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon-yellow);
}

.token-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.token-icon {
    color: var(--neon-cyan);
    font-size: 0.9rem;
}

.token-amount {
    transition: all 0.3s ease;
}

.token-amount.flash-green {
    color: var(--neon-green);
    text-shadow: 0 0 12px rgba(0, 255, 106, 0.6);
}

.token-amount.flash-red {
    color: var(--neon-red);
    text-shadow: 0 0 12px rgba(255, 0, 60, 0.6);
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
}

.icon-btn:active {
    background: rgba(0, 240, 255, 0.1);
}

.reward-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* === BOTTOM NAV === */
#bottom-nav {
    display: flex;
    height: var(--nav-h);
    padding-bottom: var(--safe-bottom);
    background: linear-gradient(0deg, rgba(18, 18, 31, 0.98), rgba(10, 10, 15, 0.95));
    border-top: var(--border-subtle);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 20;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item .nav-icon {
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.nav-item.active {
    color: var(--neon-cyan);
}

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.5));
}

.nav-item:active {
    transform: scale(0.92);
}

/* === TAB CONTENT === */
#tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

/* Game tab: NO scroll */
#tab-game {
    overflow: hidden;
}

/* Profile & Leaderboard: allow scroll */
#tab-profile, #tab-leaderboard {
    overflow-y: auto;
    padding-bottom: 1rem;
}

/* === GAME LAYOUT === */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.75rem;
    min-height: 0;
}

.dealer-area {
    flex: 0.9;
}

.player-area {
    flex: 0.9;
}

.hand-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.hand-score {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
    min-width: 1.5rem;
    text-align: center;
}

.card-hand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: -10px;
    min-height: 80px;
    flex-wrap: nowrap;
}

/* === CARDS === */
.card {
    width: 62px;
    height: 88px;
    background: var(--bg-card);
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    position: relative;
    margin: 0 -4px;
    animation: cardDeal 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

@keyframes cardDeal {
    0% {
        opacity: 0;
        transform: translateY(-60px) scale(0.72) rotateY(90deg);
        box-shadow: none;
    }
    58% {
        opacity: 1;
        transform: translateY(5px) scale(1.06) rotateY(0deg);
        box-shadow: 0 0 16px rgba(0, 240, 255, 0.55), 0 2px 10px rgba(0,0,0,0.4);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateY(0deg);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    }
}

.card-rank {
    font-size: 1.3rem;
    line-height: 1;
}

.card-suit {
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 2px;
}

.card.hearts, .card.diamonds {
    color: var(--neon-magenta);
    border-color: rgba(255, 0, 170, 0.3);
}

.card.clubs, .card.spades {
    color: var(--neon-cyan);
    border-color: rgba(0, 240, 255, 0.3);
}

.card.hidden-card {
    background: repeating-linear-gradient(
        45deg,
        var(--bg-card),
        var(--bg-card) 4px,
        rgba(0, 240, 255, 0.06) 4px,
        rgba(0, 240, 255, 0.06) 8px
    );
    border-color: rgba(0, 240, 255, 0.2);
    color: transparent;
}

.card.hidden-card::after {
    content: '?';
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: rgba(0, 240, 255, 0.2);
}

/* Card Glow for BlackJack */
.card.card-glow {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 15px rgba(240, 224, 0, 0.4), 0 0 30px rgba(240, 224, 0, 0.2);
    animation: cardGlow 1.5s infinite alternate;
}

@keyframes cardGlow {
    from { box-shadow: 0 0 10px rgba(240, 224, 0, 0.3); }
    to { box-shadow: 0 0 20px rgba(240, 224, 0, 0.6), 0 0 40px rgba(240, 224, 0, 0.2); }
}

/* === GAME INFO === */
.game-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 1rem;
    flex-shrink: 0;
    min-height: 40px;
}

.game-message {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.game-result {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    text-align: center;
    animation: resultPop 0.4s ease-out;
}

@keyframes resultPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.result-win {
    color: var(--neon-green);
    text-shadow: var(--glow-green);
}

.result-blackjack {
    color: var(--neon-yellow);
    text-shadow: var(--glow-yellow);
    font-size: 1.8rem;
}

.result-lose, .result-bust {
    color: var(--neon-red);
    text-shadow: var(--glow-red);
}

.result-push {
    color: var(--neon-orange);
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.result-payout {
    display: block;
    font-size: 1rem;
    margin-top: 0.2rem;
}

/* === CONTROLS AREA === */
.controls-area {
    padding: 0.5rem 0.75rem;
    flex-shrink: 0;
}

.bet-display {
    text-align: center;
    margin-bottom: 0.5rem;
}

.bet-display span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bet-amount {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.bet-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.bet-adjust {
    flex: 1;
    height: 44px;
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* 4-Button Layout wenn Split verfügbar: 2×2 Grid */
.action-buttons.has-split {
    flex-wrap: wrap;
}
.action-buttons.has-split .cyber-btn {
    flex: 1 1 calc(50% - 0.25rem);
    height: 60px;
    font-size: clamp(0.8rem, 3.5vw, 1.1rem);
    letter-spacing: 0.05em;
}

/* === PROFILE === */
.profile-container {
    padding: 0.75rem;
}

.profile-card {
    background: var(--bg-panel);
    border: var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.profile-header {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 2px solid var(--neon-cyan);
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 170, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-level {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.level-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-yellow);
}

.level-tag {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--bg-dark);
    background: var(--neon-yellow);
    padding: 2px 6px;
    border-radius: 4px;
}

.xp-bar {
    height: 4px;
    background: rgba(240, 224, 0, 0.15);
    border-radius: 2px;
    margin-top: 0.4rem;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-yellow), var(--neon-orange));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Reward Card */
.reward-card {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 255, 106, 0.2);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.reward-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.reward-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neon-green);
    letter-spacing: 0.05em;
}

.reward-streak {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-orange);
}

.reward-countdown {
    text-align: center;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
}

#reward-timer {
    color: var(--neon-cyan);
    font-family: var(--font-display);
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    background: var(--bg-panel);
    border: var(--border-subtle);
    border-radius: 10px;
    padding: 0.6rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    margin-top: 0.15rem;
    text-transform: uppercase;
}

/* === 7-DAY STATS CHART === */
.stats-chart {
    margin-top: 0.25rem;
}
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 68px;
}
.chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    height: 100%;
}
.chart-bar-outer {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}
.chart-bar-stack {
    width: 100%;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column-reverse; /* wins (last in DOM) appear at bottom */
    min-height: 2px;
}
.chart-bar-win {
    background: linear-gradient(to top, rgba(0, 240, 255, 0.85), rgba(0, 200, 255, 0.5));
}
.chart-bar-loss {
    background: linear-gradient(to bottom, rgba(255, 0, 60, 0.75), rgba(255, 60, 100, 0.45));
}
.chart-bar-push {
    background: rgba(255, 230, 0, 0.4);
}
.chart-day {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.chart-col.today .chart-day {
    color: var(--neon-cyan);
}
.chart-col.today .chart-bar-stack {
    box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}
.chart-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}
.chart-legend span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}
.legend-dot.win  { background: rgba(0, 240, 255, 0.8); }
.legend-dot.loss { background: rgba(255, 0, 60, 0.7); }

/* Section Card */
.section-card {
    background: var(--bg-panel);
    border: var(--border-subtle);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

/* Achievements Grid */
.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.achievement-item {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.2s ease;
}

.achievement-item.locked {
    opacity: 0.3;
    filter: grayscale(1);
}

.achievement-item.unlocked {
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px rgba(240, 224, 0, 0.2);
}

/* Settings */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cyber-toggle {
    height: 36px;
    padding: 0 1rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    border-radius: 6px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    cursor: pointer;
}

.cyber-toggle.off {
    border-color: var(--text-dim);
    color: var(--text-dim);
    background: transparent;
}

.cyber-select {
    height: 36px;
    padding: 0 0.75rem;
    background: var(--bg-input);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.cyber-select option {
    background: var(--bg-dark);
}

/* Legal (Profile Tab) */
.profile-legal {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 240, 255, 0.06);
    text-align: center;
}

.legal-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.legal-links a {
    color: var(--text-dim);
    font-size: 0.68rem;
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: color 0.15s;
}

.legal-links a:hover {
    color: var(--neon-cyan);
}

.legal-disclaimer {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
    padding-bottom: 1rem;
}

/* === LEADERBOARD === */
.leaderboard-container {
    padding: 0.75rem;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.lb-tab {
    flex: 1;
    height: 44px;
    background: var(--bg-panel);
    border: var(--border-subtle);
    border-radius: 8px;
    color: var(--text-dim);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-tab.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lb-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-panel);
    border: var(--border-subtle);
    border-radius: 8px;
}

.lb-entry.top-1 { border-color: var(--neon-yellow); }
.lb-entry.top-2 { border-color: var(--neon-cyan); }
.lb-entry.top-3 { border-color: var(--neon-magenta); }

.lb-rank {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dim);
    width: 2rem;
    text-align: center;
}

.top-1 .lb-rank { color: var(--neon-yellow); text-shadow: var(--glow-yellow); }
.top-2 .lb-rank { color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
.top-3 .lb-rank { color: var(--neon-magenta); text-shadow: var(--glow-magenta); }

.lb-name {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-level {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--neon-yellow);
    background: rgba(240, 224, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.lb-tokens {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-cyan);
    min-width: 4rem;
    text-align: right;
}

.leaderboard-empty {
    text-align: center;
    color: var(--text-dim);
    padding: 2rem;
    font-size: 0.85rem;
}

/* === TOAST NOTIFICATIONS === */
#toast-container {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: var(--glow-cyan), 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
}

.toast.success { border-color: var(--neon-green); box-shadow: var(--glow-green); }
.toast.error { border-color: var(--neon-red); box-shadow: var(--glow-red); }
.toast.warning { border-color: var(--neon-yellow); box-shadow: var(--glow-yellow); }

.toast.fade-out {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* === ACHIEVEMENT POPUP === */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 2px solid var(--neon-yellow);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 0 30px rgba(240, 224, 0, 0.3), 0 0 60px rgba(240, 224, 0, 0.1);
    z-index: 500;
    animation: achievementPop 0.5s ease-out;
}

.achievement-popup-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.achievement-popup .achievement-icon {
    font-size: 2.5rem;
}

.achievement-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--neon-yellow);
    letter-spacing: 0.15em;
    margin-bottom: 0.2rem;
}

.achievement-popup .achievement-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

@keyframes achievementPop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    60% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* === TUTORIAL === */
#tutorial-screen {
    background: var(--bg-dark);
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.tutorial-container {
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.tutorial-steps {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-step {
    display: none;
    animation: fadeSlideUp 0.4s ease;
}

.tutorial-step.active {
    display: block;
}

.tutorial-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tutorial-step h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 0.75rem;
}

.tutorial-step p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tutorial-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.tutorial-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.tutorial-actions .cyber-btn {
    min-width: 140px;
}

/* === AD SLOT === */
.ad-slot {
    padding: 0.25rem 0.75rem;
    text-align: center;
    flex-shrink: 0;
}

/* ============================================
   PHASE 5: GAMIFICATION & LEADERBOARD
   ============================================ */

/* === LEVEL UP OVERLAY === */
.levelup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(240, 224, 0, 0.15) 0%, rgba(0,0,0,0.85) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    animation: levelupFadeIn 0.3s ease;
}

@keyframes levelupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.levelup-content {
    text-align: center;
    position: relative;
}

.levelup-particles {
    position: absolute;
    top: 50%; left: 50%;
    width: 200px; height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 224, 0, 0.3) 0%, transparent 70%);
    animation: levelupPulse 1.5s ease-out infinite;
}

@keyframes levelupPulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.levelup-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    animation: levelupBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes levelupBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.levelup-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--neon-yellow);
    letter-spacing: 0.25em;
    text-shadow: var(--glow-yellow);
    margin-bottom: 0.25rem;
}

.levelup-number {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 30px rgba(240, 224, 0, 0.6), 0 0 60px rgba(240, 224, 0, 0.3);
    line-height: 1;
}

.levelup-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.5rem;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 1;
    animation: levelupSlide 0.5s ease 0.3s both;
}

@keyframes levelupSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === XP FLOATING INDICATOR === */
.xp-float {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 150;
    pointer-events: none;
    animation: xpFloatUp 1.2s ease-out forwards;
}

@keyframes xpFloatUp {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -70%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -150%) scale(0.9); }
}

.xp-float span {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--neon-yellow);
    text-shadow: var(--glow-yellow), 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.05em;
}

/* === STREAK DISPLAY === */
.streak-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 102, 0, 0.12);
    border: 1px solid rgba(255, 102, 0, 0.3);
    border-radius: 20px;
    padding: 0.15rem 0.5rem;
    animation: streakPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.streak-fire {
    font-size: 0.8rem;
    animation: streakFirePulse 1.5s infinite;
    line-height: 1;
}

@keyframes streakFirePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.streak-count {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--neon-orange);
    text-shadow: 0 0 6px rgba(255, 102, 0, 0.4);
    line-height: 1;
}

/* === ENHANCED ACHIEVEMENT POPUP === */
.achievement-popup {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    border: 2px solid var(--neon-yellow);
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 0 30px rgba(240, 224, 0, 0.3), 0 0 60px rgba(240, 224, 0, 0.1);
    z-index: 500;
    animation: achievementSlideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90%;
    width: 340px;
}

@keyframes achievementSlideDown {
    0% { transform: translateX(-50%) translateY(-30px) scale(0.8); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

.achievement-popup.fade-out {
    animation: achievementFadeOut 0.3s ease forwards;
}

@keyframes achievementFadeOut {
    to { transform: translateX(-50%) translateY(-20px); opacity: 0; }
}

.achievement-popup-glow {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 14px;
    background: linear-gradient(45deg, var(--neon-yellow), var(--neon-orange), var(--neon-yellow));
    opacity: 0.15;
    filter: blur(8px);
    z-index: -1;
}

.achievement-popup-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.achievement-popup .achievement-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.achievement-label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--neon-yellow);
    letter-spacing: 0.2em;
    margin-bottom: 0.15rem;
}

.achievement-popup .achievement-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.achievement-rewards {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
    margin-top: 0.1rem;
}

/* === ACHIEVEMENT ITEMS WITH PROGRESS === */
.achievement-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    transition: all 0.2s ease;
}

.achievement-item.locked {
    opacity: 0.45;
    border-style: dashed;
}

.achievement-item.unlocked {
    border-color: rgba(240, 224, 0, 0.28);
    background: rgba(240, 224, 0, 0.03);
}

.achievement-item .ach-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.achievement-item.locked .ach-icon {
    filter: grayscale(0.7);
}

.ach-info {
    flex: 1;
    min-width: 0;
}

.ach-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ach-desc {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}

.ach-progress-bar {
    height: 4px;
    background: rgba(0, 240, 255, 0.1);
    border-radius: 2px;
    margin-top: 0.3rem;
    overflow: hidden;
}

.ach-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.ach-progress-fill.complete {
    background: linear-gradient(90deg, var(--neon-yellow), var(--neon-orange));
}

.ach-progress-fill.partial {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-cyan));
}

.ach-progress-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    text-align: right;
    min-width: 3rem;
    flex-shrink: 0;
}

.unlocked .ach-progress-text {
    color: var(--neon-yellow);
}

/* Achievements grid becomes column layout */
.achievements-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.achievements-counter {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    float: right;
    margin-top: -1.5rem;
}

/* === LEADERBOARD SELF HIGHLIGHT === */
.lb-entry-self {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.08), rgba(255, 0, 170, 0.05)) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.05);
}

.lb-own-rank {
    position: sticky;
    bottom: 0;
    padding: 0.5rem 0.75rem 0.5rem;
    background: linear-gradient(0deg, var(--bg-dark) 60%, transparent);
}

.lb-own-rank .lb-entry {
    box-shadow: var(--glow-cyan);
}

/* === LEADERBOARD STATS ROW === */
.lb-stats-row {
    display: flex;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

.lb-stats-row span {
    background: rgba(0, 240, 255, 0.05);
    border-radius: 3px;
    padding: 1px 4px;
}

/* === GAME RESULT ENHANCED === */
.result-xp {
    display: block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--neon-yellow);
    margin-top: 0.1rem;
    letter-spacing: 0.05em;
}

.result-streak {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-orange);
    margin-top: 0.15rem;
}

/* === AUTH EXTRAS === */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.2rem 0;
    color: var(--text-dim);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.15), transparent);
}

.auth-guest-hint {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* === GUEST BANNER === */
.guest-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(90deg, rgba(240, 224, 0, 0.08), rgba(255, 102, 0, 0.08));
    border-bottom: 1px solid rgba(240, 224, 0, 0.2);
    flex-shrink: 0;
}

.guest-banner-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--neon-yellow);
    letter-spacing: 0.05em;
}

.guest-banner-btn {
    background: rgba(240, 224, 0, 0.15);
    border: 1px solid var(--neon-yellow);
    border-radius: 6px;
    color: var(--neon-yellow);
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.guest-banner-btn:active {
    background: rgba(240, 224, 0, 0.3);
}

/* === MODAL OVERLAY === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 200;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), var(--glow-cyan);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-form {
    text-align: left;
}

.modal-form .modal-title,
.modal-form .modal-text {
    text-align: center;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 0.5rem;
}

.modal-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-buttons .cyber-btn {
    flex: 1;
    height: 50px;
    font-size: 0.85rem;
}

/* === DANGER BUTTON === */
.cyber-btn-danger {
    background: linear-gradient(135deg, rgba(255, 0, 60, 0.15), rgba(255, 0, 60, 0.05));
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: var(--glow-red);
}

.cyber-btn-danger:active {
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.6);
}

/* === GAME HISTORY === */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.history-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 1rem;
}

.history-entry {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.08);
}

.history-result-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.history-result-icon.win { background: rgba(0, 255, 106, 0.15); }
.history-result-icon.lose, .history-result-icon.bust { background: rgba(255, 0, 60, 0.15); }
.history-result-icon.blackjack { background: rgba(240, 224, 0, 0.15); }
.history-result-icon.push { background: rgba(255, 102, 0, 0.15); }

.history-detail {
    flex: 1;
    min-width: 0;
}

.history-scores {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-time {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
}

.history-payout {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
    min-width: 3.5rem;
}

.history-payout.positive { color: var(--neon-green); }
.history-payout.negative { color: var(--neon-red); }
.history-payout.neutral { color: var(--neon-orange); }

/* === ACCOUNT MANAGEMENT === */
.account-action {
    margin-top: 0.5rem;
}

.account-form {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    animation: fadeSlideUp 0.3s ease;
}

.account-form .input-group {
    margin-bottom: 0.6rem;
}

.account-form .cyber-input {
    height: 48px;
    font-size: 0.9rem;
}

/* === RESPONSIVE: Larger Screens === */
@media (min-width: 600px) {
    .card {
        width: 75px;
        height: 105px;
    }
    
    .card-rank { font-size: 1.5rem; }
    .card-suit { font-size: 1.3rem; }
    
    .cyber-btn-hit, .cyber-btn-stand, .cyber-btn-double, .cyber-btn-split {
        height: 72px;
        font-size: 1.3rem;
    }
    .action-buttons.has-split .cyber-btn {
        height: 64px;
    }
    
    .bet-amount { font-size: 2.5rem; }
}

@media (min-width: 768px) {
    #app-screen {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid rgba(0, 240, 255, 0.08);
        border-right: 1px solid rgba(0, 240, 255, 0.08);
        box-shadow: 0 0 40px rgba(0, 240, 255, 0.03);
    }
    
    #auth-screen, #tutorial-screen {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    #tab-content {
        width: 100%;
    }
}

/* === SMALL SCREENS (SE, etc) === */
@media (max-height: 640px) {
    :root {
        --font-size-base: 16px;
        --header-h: 44px;
        --nav-h: 52px;
    }
    
    .card {
        width: 52px;
        height: 74px;
    }
    
    .card-rank { font-size: 1.1rem; }
    .card-suit { font-size: 0.9rem; }
    
    .cyber-btn-hit, .cyber-btn-stand, .cyber-btn-double, .cyber-btn-split {
        height: 56px;
        font-size: clamp(0.75rem, 3.5vw, 1rem);
    }
    .action-buttons.has-split .cyber-btn {
        height: 50px;
    }
    
    .bet-amount { font-size: 1.6rem; }
    .game-result { font-size: 1.3rem; }
    .hand-label { font-size: 0.65rem; }
}

/* === DISABLE HOVER EFFECTS ON TOUCH === */
@media (hover: none) {
    .cyber-btn::before { display: none; }
}

/* ============================================
   PHASE 8-12: ANALYTICS, ADS, LEGAL, SHARE
   ============================================ */

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    background: var(--bg-panel);
    border-top: 2px solid var(--neon-cyan);
    box-shadow: 0 -4px 20px rgba(0, 240, 255, 0.15);
    animation: cookieSlideUp 0.4s ease;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1.2rem;
    text-align: center;
}

.cookie-text {
    margin-bottom: 0.75rem;
}

.cookie-text strong {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--neon-cyan);
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.25rem;
}

.cookie-text p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.cookie-btn {
    font-size: 0.7rem !important;
    padding: 0 0.8rem !important;
    height: 34px !important;
}

.cookie-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    text-decoration: underline;
}

/* === AD SLOTS === */
.ad-slot {
    background: rgba(0, 240, 255, 0.02);
    border: 1px dashed rgba(0, 240, 255, 0.08);
    border-radius: 8px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
    overflow: hidden;
}

.ad-slot.ad-active {
    border-color: rgba(0, 240, 255, 0.15);
}

.ad-interstitial-content {
    text-align: center;
    max-width: 340px;
}

.ad-interstitial-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.ad-interstitial-slot {
    min-height: 250px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.ad-placeholder {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.ad-close-btn {
    font-size: 0.75rem !important;
}

/* === SHARE BUTTON === */
.share-btn {
    width: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    flex-shrink: 0;
}

/* Adjust newgame-controls for share button */
#newgame-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

/* No extra bottom padding needed - legal footer is in profile tab only */

/* === COMEBACK BONUS POPUP (achievement style) === */
.comeback-popup {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    border: 2px solid var(--neon-green);
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    box-shadow: 0 0 30px rgba(0, 255, 106, 0.3), 0 0 60px rgba(0, 255, 106, 0.1);
    z-index: 500;
    animation: comebackSlideDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 90%;
    width: 340px;
}

@keyframes comebackSlideDown {
    0% { transform: translateX(-50%) translateY(-30px) scale(0.8); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

.comeback-popup.fade-out {
    animation: comebackFadeOut 0.3s ease forwards;
}

@keyframes comebackFadeOut {
    to { transform: translateX(-50%) translateY(-20px); opacity: 0; }
}

.comeback-popup-glow {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 14px;
    background: linear-gradient(45deg, var(--neon-green), var(--neon-cyan), var(--neon-green));
    opacity: 0.15;
    filter: blur(8px);
    z-index: -1;
}

.comeback-label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--neon-green);
    letter-spacing: 0.2em;
    margin-bottom: 0.15rem;
    text-transform: uppercase;
}

.comeback-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--neon-yellow);
    text-shadow: 0 0 8px rgba(240, 224, 0, 0.3);
}

.comeback-rewards {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* ============================================
   HERO SYSTEM
   ============================================ */

#tab-hero {
    overflow-y: auto;
    padding-bottom: 1rem;
}

.hero-container {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* section-card inside hero-container: gap handles spacing, not margin */
.hero-container .section-card { margin-bottom: 0; }

/* Hero Card (like profile-card) */
.hero-card {
    background: var(--bg-panel);
    border: var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

/* --- SVG Character --- */
.hero-svg-container {
    flex-shrink: 0;
    width: 150px;
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 80%, rgba(0,240,255,0.07) 0%, transparent 70%);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.3s;
}

@keyframes equipFlash {
    0%   { box-shadow: none; border-color: rgba(0,240,255,0.15); }
    30%  { box-shadow: 0 0 0 3px rgba(0,240,255,0.5), 0 0 24px rgba(0,240,255,0.4); border-color: var(--neon-cyan); }
    70%  { box-shadow: 0 0 0 1px rgba(0,240,255,0.3), 0 0 12px rgba(0,240,255,0.2); border-color: rgba(0,240,255,0.5); }
    100% { box-shadow: none; border-color: rgba(0,240,255,0.15); }
}
.hero-svg-container.equip-flash {
    animation: equipFlash 0.65s ease-out forwards;
}

.hero-svg-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0,240,255,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-bg-layer,
.hero-char-layer {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    overflow: hidden;
}
.hero-bg-layer  { z-index: 0; }
.hero-char-layer { z-index: 1; }

.hero-char-layer svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 6px rgba(0,240,255,0.35));
}

/* --- Hero Name Row with inline edit --- */
.hero-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.hero-name-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    opacity: 0.45;
    padding: 0.1rem 0.2rem;
    line-height: 1;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.hero-name-edit-btn:hover { opacity: 1; }

/* --- Model Toggle (♂ / ♀) --- */
.hero-model-toggle {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-top: 0.4rem;
}
.model-btn {
    background: var(--bg-card);
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 6px;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.2rem 0.55rem;
    transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.model-btn:hover {
    border-color: rgba(0,240,255,0.5);
    color: var(--text-primary);
}
.model-btn.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0,240,255,0.3);
}

.hero-name-input {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid var(--neon-cyan);
    border-radius: 5px;
    padding: 0.1rem 0.45rem;
    width: 140px;
    outline: none;
    letter-spacing: 0.04em;
}

/* --- Hero Guest Teaser --- */
.hero-guest-teaser {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
}

.hero-guest-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: grayscale(0.3);
}

.hero-guest-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.hero-guest-text {
    color: var(--text-dim);
    font-size: 0.78rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* --- Hero Info --- */
.hero-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-align: center;
}

.hero-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0,240,255,0.45);
    letter-spacing: 0.08em;
}

.hero-bonuses-title {
    font-family: var(--font-display);
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.hero-bonus-line {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--neon-green);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.hero-no-bonus {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
}

/* --- Slot Bar (uses section-card pattern) --- */
.slots-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.slot-btn {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0.55rem 0.25rem;
    position: relative;
    aspect-ratio: 1;
}

.slot-btn:hover {
    background: rgba(0, 240, 255, 0.07);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

.slot-btn:active { transform: scale(0.95); }

.slot-btn.equipped {
    border-color: var(--neon-cyan);
    background: rgba(0,240,255,0.07);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.slot-icon {
    font-size: 1.45rem;
    line-height: 1;
}

.slot-label {
    font-family: var(--font-display);
    font-size: 0.48rem;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.slot-btn.equipped .slot-label { color: var(--neon-cyan); }

/* --- Shop Filter Chips --- */
.shop-filter-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.shop-chip {
    height: 28px;
    padding: 0 0.65rem;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: none;
    color: var(--text-dim);
    transition: all 0.15s;
}

.shop-chip:hover {
    border-color: rgba(0, 240, 255, 0.4);
    color: var(--text-secondary);
}

.shop-chip.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 6px rgba(0,240,255,0.15);
}

/* --- Shop Grid --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.shop-category-label {
    grid-column: 1 / -1;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    padding: 0.9rem 0 0.35rem;
    border-bottom: 1px solid rgba(0, 240, 255, 0.18);
    margin-bottom: 0.1rem;
}

.shop-category-label:first-child {
    padding-top: 0.15rem;
}

.shop-item {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 12px;
    padding: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
}

.shop-item:active { transform: scale(0.97); }

.shop-item:hover {
    border-color: rgba(0, 240, 255, 0.28);
    background: rgba(0, 240, 255, 0.03);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.shop-item.owned { border-color: rgba(0, 255, 106, 0.22); }

.shop-item.item-equipped {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.shop-item-header {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.shop-item-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.shop-item-name {
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.03em;
    line-height: 1.25;
    flex: 1;
}

/* Rarity Badges */
.rarity-badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rarity-common    { background: rgba(85,85,102,0.3);    color: var(--text-secondary); border: 1px solid rgba(85,85,102,0.35); }
.rarity-rare      { background: rgba(0,240,255,0.1);     color: var(--neon-cyan);      border: 1px solid rgba(0,240,255,0.25); }
.rarity-epic      { background: rgba(255,0,170,0.1);     color: var(--neon-magenta);   border: 1px solid rgba(255,0,170,0.25); }
.rarity-legendary { background: rgba(240,224,0,0.12);    color: var(--neon-yellow);    border: 1px solid rgba(240,224,0,0.3);  }

.shop-item-bonus {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--neon-green);
    min-height: 0.85rem;
}

.shop-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    margin-top: 0.1rem;
}

.shop-item-price {
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--neon-yellow);
    white-space: nowrap;
}

.shop-item-price.free { color: var(--neon-green); }

/* Zu teuer */
.shop-item-price.too-expensive {
    color: var(--text-dim);
}
.shop-item-price .deficit {
    color: var(--neon-red);
    font-size: 0.6rem;
    opacity: 0.85;
}
.shop-item.too-expensive {
    opacity: 0.6;
}
.shop-item.too-expensive .shop-item-icon {
    filter: grayscale(0.6);
}
.shop-btn-locked {
    opacity: 0.4 !important;
    cursor: default !important;
}
.shop-empty {
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-family: var(--font-mono);
}

/* Shop item action buttons – inherit from cyber-btn but smaller */
.shop-item .cyber-btn {
    height: 28px;
    min-width: unset;
    padding: 0 0.6rem;
    font-size: 0.56rem;
    border-width: 1px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* Owned checkmark badge */
.shop-owned-badge {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 16px;
    height: 16px;
    background: var(--neon-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #000;
    font-weight: 900;
    line-height: 1;
}

/* --- Shop Section Header (title + filter chips side by side) --- */
.shop-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.shop-section-header .section-title { margin-bottom: 0; }

.shop-filter-tabs {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

/* --- Shop Tab --- */
.shop-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
}

.shop-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--neon-cyan);
    letter-spacing: 0.08em;
    margin: 0;
}

.shop-token-display {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-yellow);
}

.shop-token-icon { font-size: 1rem; }

.shop-token-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-weight: 400;
}

/* --- Item Detail Modal --- */
#hero-item-modal .modal-icon { font-size: 3rem; }

.hero-modal-rarity-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.hero-modal-bonus {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--neon-green);
    background: rgba(0, 255, 106, 0.07);
    border: 1px solid rgba(0, 255, 106, 0.2);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    text-align: center;
    margin: 0.1rem 0 0.3rem;
}


/* Legendary shimmer on equipped slot */
@keyframes legendaryPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(240,224,0,0.3); }
    50%       { box-shadow: 0 0 14px rgba(240,224,0,0.6); }
}

.slot-btn.legendary { animation: legendaryPulse 2s infinite; }

/* ============================================
   PWA INSTALL BANNER
   ============================================ */
.pwa-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--bg-panel);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.pwa-banner-text { flex: 1; }
.pwa-banner-actions { display: flex; align-items: center; gap: 0.5rem; }
.pwa-dismiss {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 1rem; padding: 0.2rem 0.3rem;
}

/* ============================================
   SPLIT GAME UI
   ============================================ */
.split-second-hand {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 0, 170, 0.3);
}
.split-second-hand .hand-label {
    color: var(--neon-magenta);
    font-size: 0.7rem;
}
.split-hand-active {
    box-shadow: 0 0 0 2px var(--neon-cyan);
    border-radius: 8px;
}
.split-hand-done {
    opacity: 0.55;
}
.split-hand-indicator {
    text-align: center;
    margin-bottom: 0.3rem;
}
.split-hand-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 0.05em;
    background: rgba(0,240,255,0.08);
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 4px;
    padding: 0.15rem 0.6rem;
}
.split-result-detail {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}
/* Split button */
.cyber-btn-split {
    flex: 1;
    height: 68px;
    background: rgba(255, 0, 170, 0.12);
    border: 1px solid var(--neon-magenta);
    color: var(--neon-magenta);
    font-size: 1.05rem;
}
.cyber-btn-split:hover { background: rgba(255, 0, 170, 0.22); }

/* ============================================
   DECK DESIGNS (Kartenrücken)
   ============================================ */
/* Magenta Deck */
.deck-magenta .hidden-card {
    background: linear-gradient(135deg, #330022 0%, #220011 50%, #330022 100%);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 8px rgba(255, 0, 170, 0.4);
}
.deck-magenta .hidden-card::after {
    background: repeating-linear-gradient(
        45deg,
        rgba(255,0,170,0.08) 0px, rgba(255,0,170,0.08) 2px,
        transparent 2px, transparent 6px
    );
}
/* Shadow/Red Deck */
.deck-shadow .hidden-card {
    background: linear-gradient(135deg, #1a0008 0%, #0d0004 50%, #1a0008 100%);
    border-color: #cc0033;
    box-shadow: 0 0 8px rgba(200, 0, 50, 0.4);
}
.deck-shadow .hidden-card::after {
    background: repeating-linear-gradient(
        -45deg,
        rgba(200,0,50,0.08) 0px, rgba(200,0,50,0.08) 2px,
        transparent 2px, transparent 6px
    );
}
/* Gold Deck */
.deck-gold .hidden-card {
    background: linear-gradient(135deg, #1a1000 0%, #0d0a00 50%, #1a1000 100%);
    border-color: var(--neon-yellow);
    box-shadow: 0 0 8px rgba(240, 224, 0, 0.4);
}
.deck-gold .hidden-card::after {
    background: repeating-linear-gradient(
        45deg,
        rgba(240,224,0,0.08) 0px, rgba(240,224,0,0.08) 2px,
        transparent 2px, transparent 6px
    );
}

/* ============================================
   DAILY CHALLENGES
   ============================================ */
.challenges-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.challenge-item {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}
.challenge-item.completed {
    border-color: rgba(0, 255, 106, 0.3);
    background: rgba(0, 255, 106, 0.04);
}
.challenge-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
}
.challenge-label {
    font-size: 0.78rem;
    color: var(--text-primary);
}
.challenge-item.completed .challenge-label {
    color: var(--neon-green);
}
.challenge-reward {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-yellow);
}
.challenge-progress-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.challenge-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.challenge-progress-fill {
    height: 100%;
    background: var(--neon-cyan);
    border-radius: 2px;
    transition: width 0.4s ease;
}
.challenge-item.completed .challenge-progress-fill {
    background: var(--neon-green);
}
.challenge-progress-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    min-width: 2.5rem;
    text-align: right;
}
.challenge-item.completed .challenge-progress-text {
    color: var(--neon-green);
}
