/* ═══════════════════════════════════════════════════
   PREMIUM GAMING — Screen Layouts
   ═══════════════════════════════════════════════════ */

/* ── Main Layout ── */
.app-main {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + var(--space-4));
    min-height: 100vh;
}

.screen {
    display: none;
    padding: var(--space-5);
}

.screen.active {
    display: block;
}

/* ═══════════════════════════════════════════
   1. HOME DASHBOARD
   ═══════════════════════════════════════════ */
.screen-home .greeting {
    margin-bottom: var(--space-5);
}

.screen-home .greeting__time {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: 2px;
}

.screen-home .greeting__name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.screen-home .section {
    margin-top: var(--space-8);
}

/* ── Account Status Row ── */
.account-status {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-success-bg);
    border-radius: var(--radius-md);
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--color-success);
    font-weight: var(--font-weight-medium);
}

.account-status svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Featured Games Scroll ── */
.featured-games-scroll {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
    margin: 0 calc(-1 * var(--space-5));
    padding-left: var(--space-5);
    padding-right: var(--space-5);
}

.featured-games-scroll::-webkit-scrollbar {
    display: none;
}

.featured-games-scroll .game-card {
    min-width: 260px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

/* ── Recent Activity ── */
.activity-list {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 0 var(--space-5);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--color-border-light);
}

/* ═══════════════════════════════════════════
   2. GAME LOBBY
   ═══════════════════════════════════════════ */
.screen-lobby .lobby-header {
    margin-bottom: var(--space-5);
}

.screen-lobby .lobby-header__title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-1);
}

.screen-lobby .lobby-header__subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.game-lobby-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* ── Filter Bar ── */
.filter-bar {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    margin-bottom: var(--space-5);
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-chip.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.filter-chip:hover:not(.active) {
    border-color: var(--color-primary-light);
    color: var(--color-primary);
}

/* ═══════════════════════════════════════════
   3. GAME DETAIL
   ═══════════════════════════════════════════ */
.screen-game-detail .game-detail-hero {
    position: relative;
    margin: calc(-1 * var(--space-5));
    margin-bottom: var(--space-5);
}

.screen-game-detail .game-detail-hero img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.screen-game-detail .game-detail-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-5);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: white;
}

.screen-game-detail .game-detail-hero__title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-1);
}

.screen-game-detail .game-detail-hero__subtitle {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.game-detail-tabs {
    margin-bottom: var(--space-5);
}

.game-detail-content {
    margin-bottom: var(--space-6);
}

.game-detail-content .tab-panel {
    display: none;
}

.game-detail-content .tab-panel.active {
    display: block;
}

/* ── Countdown Timer ── */
.countdown {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
    margin: var(--space-5) 0;
}

.countdown__unit {
    text-align: center;
}

.countdown__value {
    width: 52px;
    height: 52px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
    margin-bottom: 4px;
}

.countdown__label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.countdown__separator {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-tertiary);
    padding-top: var(--space-3);
}

/* ── Results History ── */
.results-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
}

.result-row__round {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
}

.result-row__values {
    display: flex;
    gap: var(--space-2);
}

.result-orb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: white;
}

.result-orb--coral {
    background: var(--color-accent-coral);
}

.result-orb--mint {
    background: var(--color-success);
}

.result-orb--sky {
    background: var(--color-info);
}

.result-orb--peach {
    background: var(--color-accent-peach);
    color: var(--color-text-primary);
}

/* ── Game Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.stat-card {
    padding: var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    text-align: center;
}

.stat-card__value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.stat-card__label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

/* ── Game Rules  ── */
.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    position: relative;
    padding: var(--space-3) 0 var(--space-3) var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    border-bottom: 1px solid var(--color-divider);
}

.rules-list li:last-child {
    border-bottom: none;
}

.rules-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: calc(var(--space-3) + 6px);
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* ── Back Button ── */
.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    padding: var(--space-2) 0;
    margin-bottom: var(--space-4);
    cursor: pointer;
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.back-btn:hover {
    color: var(--color-text-primary);
}

/* ═══════════════════════════════════════════
   4. WALLET
   ═══════════════════════════════════════════ */
.screen-wallet .wallet-balance {
    text-align: center;
    padding: var(--space-6) 0;
}

.screen-wallet .wallet-balance__label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.screen-wallet .wallet-balance__amount {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.screen-wallet .wallet-balance__amount span {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-right: var(--space-1);
}

.wallet-tabs {
    margin-bottom: var(--space-5);
}

.wallet-tab-content .tab-panel {
    display: none;
}

.wallet-tab-content .tab-panel.active {
    display: block;
}

.wallet-section-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
    margin-top: var(--space-5);
}

/* ═══════════════════════════════════════════
   5. PROFILE / ACCOUNT
   ═══════════════════════════════════════════ */
.screen-profile .profile-header {
    text-align: center;
    padding: var(--space-6) 0;
}

.screen-profile .profile-header .avatar {
    margin: 0 auto var(--space-3);
}

.screen-profile .profile-header__name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-1);
}

.screen-profile .profile-header__id {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-3);
}

.screen-profile .profile-header .vip-badge {
    margin: 0 auto;
}

.profile-section-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-5) 0 var(--space-3);
}

/* ═══════════════════════════════════════════
   6. SUPPORT
   ═══════════════════════════════════════════ */
.screen-support .support-header {
    margin-bottom: var(--space-5);
}

.screen-support .support-header__title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-1);
}

.screen-support .support-header__subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.support-section {
    margin-bottom: var(--space-6);
}

.support-section__title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-3);
}

/* ── Responsible Gaming Limits ── */
.limit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-3);
}

.limit-card__info {
    flex: 1;
}

.limit-card__label {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-base);
    margin-bottom: 2px;
}

.limit-card__value {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (min-width: 480px) {
    body {
        border-left: 1px solid var(--color-border-light);
        border-right: 1px solid var(--color-border-light);
    }

    .featured-games-scroll .game-card {
        min-width: 280px;
    }
}