:root {
    --gold: #FFD700;
    --gold-glow: rgba(255, 215, 0, 0.3);
    --midnight: #020617;
    --glass: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #6366f1;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--midnight);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.1) 0%, transparent 40%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Classes */
.glass-header,
.glass-footer,
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

/* Layout */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Registration Overlay */
.registration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--midnight);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at center, #1e1b4b 0%, var(--midnight) 100%);
}

.registration-card {
    background: var(--glass);
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    backdrop-filter: blur(20px);
}

.gold-border {
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px var(--gold-glow);
}

.large-icon {
    width: 80px;
    height: 80px;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.registration-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.registration-card p {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.input-group {
    text-align: left;
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    outline: none;
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.button-group .btn-primary,
.button-group .btn-secondary {
    width: auto;
    min-width: 120px;
}

/* Status Bar */
.status-bar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.sb-left,
.sb-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    /* For floating animations */
}

.sb-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.sb-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-right: 0.5rem;
    font-weight: 600;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

.gold-text {
    color: var(--gold);
}

.icon-accent {
    color: var(--accent);
}

.logo-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.registration-overlay.hidden {
    display: none !important;
}

/* Floating Balance Animations */
.balance-change {
    position: absolute;
    right: 0;
    font-weight: 800;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.neg-change {
    color: #ef4444;
    animation: fall-away 1s ease-out forwards;
}

.pos-change {
    color: #10b981;
    animation: stamp-reveal 1s ease-out forwards;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

@keyframes fall-away {
    0% {
        transform: scale(1.2);
        opacity: 1;
    }

    30% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(50px) rotate(10deg);
        opacity: 0;
    }
}

@keyframes stamp-reveal {
    0% {
        transform: scale(3);
        opacity: 0;
    }

    20% {
        transform: scale(1);
        opacity: 1;
    }

    80% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* Local Win/Loss Indicator in Game Area */
.local-indicator {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    margin-top: 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    min-height: 42px;
    /* Reserved space */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.local-indicator.hidden {
    opacity: 0;
    visibility: hidden;
}

.win-text {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.loss-text {
    color: #ef4444;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.game-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.game-card.premium {
    border-color: rgba(255, 215, 0, 0.3);
}

.card-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.game-icon {
    width: 60px;
    height: 60px;
    color: white;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.card-content p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.btn-play {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-play:hover {
    opacity: 0.9;
}

/* Backgrounds for Cards */
.slots-bg {
    background-image: linear-gradient(45deg, #1e1b4b, #312e81);
}

.blackjack-bg {
    background-image: linear-gradient(45deg, #064e3b, #065f46);
}

.craps-bg {
    background-image: linear-gradient(45deg, #7c2d12, #9a3412);
}

.roulette-bg {
    background-image: linear-gradient(45deg, #4c1d95, #5b21b6);
}

/* Locked State */
.game-card.locked {
    opacity: 0.7;
    filter: grayscale(0.5);
}

/* Wishlist Section */
.wishlist-section {
    padding: 2rem;
    border-radius: 20px;
}

.wishlist-list {
    list-style: none;
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.wishlist-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dim);
}

.icon-green {
    color: #10b981;
}

.icon-dim {
    color: #475569;
}

/* Game View */
.view.hidden {
    display: none;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-back,
.btn-settings {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Settings Drawer */
.settings-drawer {
    position: fixed;
    right: 20px;
    top: 80px;
    width: 300px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.setting-group {
    margin: 1.5rem 0;
}

.setting-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

input[type="range"] {
    width: 100%;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--gold);
    color: black;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px var(--gold-glow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gold-glow);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}