@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
    --bg-base: #0D0E12;
    --bg-elevated: #14161D;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.07);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.12);
    --text-primary: #F3F5F9;
    --text-secondary: #8C93A4;
    --gold: #E8B85C;
    --gold-soft: rgba(232, 184, 92, 0.14);
    --gold-border: rgba(232, 184, 92, 0.36);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

.font-mono-num {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-variant-numeric: tabular-nums;
}

/* Ambient dark studio glow */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(65% 45% at 15% 10%, rgba(140, 165, 210, 0.08) 0%, transparent 70%),
        radial-gradient(55% 40% at 85% 22%, rgba(232, 184, 92, 0.05) 0%, transparent 72%),
        radial-gradient(60% 50% at 50% 95%, rgba(90, 105, 135, 0.07) 0%, transparent 75%),
        linear-gradient(180deg, #0D0E12 0%, #14161D 100%);
    pointer-events: none;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 12px 32px rgba(0, 0, 0, 0.35);
}

.glass-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.025) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 10px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease;
}

.glass-card:active {
    transform: scale(0.97);
}

.glass-card-legendary {
    background: linear-gradient(155deg, rgba(232, 184, 92, 0.11) 0%, rgba(255, 255, 255, 0.03) 65%);
    border: 1px solid var(--gold-border);
    box-shadow:
        inset 0 1px 0 rgba(232, 184, 92, 0.28),
        0 12px 34px rgba(232, 184, 92, 0.08);
}

.btn-primary-glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(218, 224, 234, 0.92) 100%);
    color: #0D0E12;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 24px rgba(255, 255, 255, 0.12);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-primary-glass:active {
    transform: scale(0.97);
}

.btn-primary-glass:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.btn-gold-glass {
    background: linear-gradient(135deg, #F0C975 0%, #D99B38 100%);
    color: #0D0E12;
    font-weight: 700;
    border: 1px solid rgba(255, 232, 180, 0.55);
    box-shadow: 0 8px 24px rgba(232, 184, 92, 0.24);
}

/* Ticker marquee */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-track {
    display: inline-flex;
    gap: 24px;
    animation: tickerMove 24s linear infinite;
}

@keyframes tickerMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Roulette tape */
.roulette-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(10, 11, 15, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.65);
}

.roulette-viewport::before,
.roulette-viewport::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 10;
    pointer-events: none;
}

.roulette-viewport::before {
    left: 0;
    background: linear-gradient(90deg, #0D0E12 0%, transparent 100%);
}

.roulette-viewport::after {
    right: 0;
    background: linear-gradient(270deg, #0D0E12 0%, transparent 100%);
}

.roulette-pointer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.35) 50%, #FFFFFF 100%);
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.roulette-pointer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid #FFFFFF;
}

.roulette-pointer::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 9px solid #FFFFFF;
}

.roulette-track {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 0;
    will-change: transform;
}

.roulette-cell {
    flex: 0 0 122px;
    height: 112px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    position: relative;
}

.cell-empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cell-common {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(220, 228, 240, 0.22);
}

.cell-rare {
    background: linear-gradient(160deg, rgba(200, 218, 245, 0.14) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(215, 230, 255, 0.38);
}

.cell-legendary {
    background: linear-gradient(160deg, rgba(232, 184, 92, 0.22) 0%, rgba(180, 125, 35, 0.08) 100%);
    border: 1px solid rgba(232, 184, 92, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 230, 165, 0.35);
}

/* Animated emoji micro-motion for 🤡 & 🤬 */
@keyframes emojiBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-6deg); }
    75% { transform: scale(1.08) rotate(6deg); }
}

@keyframes emojiShake {
    0%, 100% { transform: translate(0, 0) scale(1); }
    20% { transform: translate(-2px, 1px) scale(1.08); }
    40% { transform: translate(2px, -1px) scale(1.12); }
    60% { transform: translate(-2px, -1px) scale(1.08); }
    80% { transform: translate(2px, 1px) scale(1.05); }
}

.emoji-clown-anim {
    display: inline-block;
    animation: emojiBounce 2.2s ease-in-out infinite;
}

.emoji-rage-anim {
    display: inline-block;
    animation: emojiShake 1.4s ease-in-out infinite;
}

.tab-bar {
    background: rgba(18, 20, 27, 0.84);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tab-btn {
    color: var(--text-secondary);
    transition: color 0.18s ease, transform 0.15s ease;
}

.tab-btn.active {
    color: #FFFFFF;
}

/* Custom scrollbar hidden */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}
