:root {
    --bg-main: #0b1118;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-cyan: #00d4ff;
    --accent-orange: #ff4d00;
    --accent-purple: #be00ff;
    --text-dim: #64748b;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0b1118;
    color: #fff;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(11, 17, 24, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    background: #fee140;
    color: #000;
    padding: 4px;
    border-radius: 8px;
    font-size: 18px;
}

.logo-text {
    font-weight: 800;
    font-size: 14px;
    display: flex;
    flex-direction: column;
}

.logo-text small {
    font-size: 8px;
    color: #4ade80;
}

.header-balance {
    background: #131b26;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--glass-border);
}

.balance-val {
    font-weight: 700;
    font-size: 14px;
}

.balance-add {
    background: #4ade80;
    color: #000;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

/* LIVE WINS TICKER */
.live-wins {
    padding: 10px 20px;
}

.live-title {
    font-size: 12px;
    font-weight: 700;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 5px #4ade80;
}

.win-item {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.win-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.win-game-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win-user {
    display: flex;
    flex-direction: column;
}

.win-user b {
    font-size: 13px;
}

.win-user span {
    font-size: 11px;
    color: var(--text-dim);
}

.win-amount {
    text-align: right;
}

.win-val {
    color: #fee140;
    font-weight: 800;
    font-size: 14px;
}

.win-mult {
    color: #4ade80;
    font-size: 11px;
}

/* PROMO BANNER */
.promo-banner {
    margin: 15px 20px;
    background: linear-gradient(135deg, #be00ff 0%, #7000ff 100%);
    border-radius: 24px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.promo-content h2 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.promo-content p {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.claim-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

/* SEARCH */
.search-container {
    padding: 10px 20px;
}

.search-bar {
    background: #131b26;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-bar i {
    color: var(--text-dim);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    width: 100%;
    font-size: 14px;
}

/* GAME GRID */
.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px;
}

.game-card {
    border-radius: 24px;
    padding: 25px 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-card:active {
    transform: scale(0.96);
}

.game-card.aviator {
    background: linear-gradient(180deg, #ff4c8b 0%, #8000ff 100%);
}

.game-card.crash {
    background: linear-gradient(180deg, #ff8c00 0%, #ff4c00 100%);
}

.game-card.mines {
    background: linear-gradient(180deg, #00d4ff 0%, #005aff 100%);
}

.game-card.plinko {
    background: linear-gradient(180deg, #ff00ff 0%, #8000ff 100%);
}

.game-card.roulette {
    background: linear-gradient(180deg, #00b894 0%, #006341 100%);
}

.game-card.coinflip {
    background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
}

.game-card.dice {
    background: linear-gradient(180deg, #00ff8c 0%, #0080ff 100%);
}

.game-card.coinflipp {
    background: linear-gradient(180deg, #ffd700 0%, #ff8c00 100%);
}

.game-icon {
    font-size: 50px;
    position: absolute;
    top: 15px;
    right: 15px;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.3));
}

.game-name {
    font-weight: 900;
    font-size: 16px;
    margin-bottom: 2px;
}

.game-rtp {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.game-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4d00;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* BOTTOM NAV */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(11, 17, 24, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 25px 0;
    border-top: 1px solid var(--glass-border);
    z-index: 200;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
    text-decoration: none;
    cursor: pointer;
}

.nav-item.active {
    color: #fff;
}

.nav-item i {
    font-size: 20px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 600;
}

/* UTILS */
.hidden {
    display: none !important;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Fairness Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content.fairness-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    width: 100%;
    max-width: 350px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.fair-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.4;
}

.seed-group {
    margin-bottom: 15px;
}

.seed-group label {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.seed-input-group {
    display: flex;
    gap: 8px;
}

.seed-input-group input,
.seed-group input {
    width: 100%;
    background: #0b111a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 8px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 11px;
}

.seed-input-group button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 35px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.short-input {
    width: 80px !important;
    text-align: center;
}

.pf-actions {
    margin-top: 25px;
}

.pf-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

.rotate-btn {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.pf-info-link {
    margin-top: 15px;
    text-align: center;
}

.pf-info-link a {
    color: #64748b;
    font-size: 12px;
    text-decoration: underline;
}