/**
 * M999 Web App Stylesheet
 * 1:1 Pixel-Perfect Visual Fidelity to Native Android XML Resources:
 * - bg_liquid_light_screen.xml (Radial pastel orbs on linear canvas)
 * - bg_liquid_3d_glass_card.xml & bg_liquid_3d_glass_chip.xml
 * - bg_liquid_3d_glass_dock.xml & bg_liquid_dock_indicator.xml
 * - activity_home.xml, dialog_tournament_details.xml, activity_auth.xml
 */

:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --accent-emerald: #10B981;
    --accent-gold: #D97706;
    --danger: #EF4444;
    
    --obsidian: #0F172A;
    --slate: #64748B;
    --slate-light: #94A3B8;
    --border-subtle: rgba(226, 232, 240, 0.8);
    
    /* 3D Liquid Glass Specifications */
    --card-glass: rgba(255, 255, 255, 0.78);
    --border-glass: rgba(255, 255, 255, 0.95);
    --shadow-card: 0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
    --shadow-chip: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-dock: 0 16px 36px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(99, 102, 241, 0.10);
    
    --radius-card: 20px;
    --radius-pill: 9999px;
    --radius-dock: 26px;
    
    --font-main: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

input, button, textarea {
    font-family: inherit;
    user-select: auto;
    -webkit-user-select: auto;
}

body {
    background-color: #0b0f19;
    font-family: var(--font-main);
    color: var(--obsidian);
    line-height: 1.4;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* ==========================================================================
   BASE MOBILE FRAME & NATIVE LIQUID BACKGROUND (@drawable/bg_liquid_light_screen)
   ========================================================================== */
.mobile-frame {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    
    /* 1:1 with bg_liquid_light_screen.xml */
    background: 
        radial-gradient(circle at 88% 10%, rgba(129, 140, 248, 0.25) 0%, rgba(129, 140, 248, 0.08) 40%, transparent 65%),
        radial-gradient(circle at 8% 42%, rgba(167, 139, 250, 0.20) 0%, rgba(167, 139, 250, 0.06) 45%, transparent 65%),
        radial-gradient(circle at 85% 82%, rgba(244, 63, 94, 0.18) 0%, rgba(244, 63, 94, 0.05) 50%, transparent 70%),
        linear-gradient(180deg, #F8FAFC 0%, #EDE9FE 50%, #FAF5FF 100%);
    background-attachment: fixed;
}

/* ==========================================================================
   TOP STICKY HEADER (CardView topBar in activity_home.xml)
   ========================================================================== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.90);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.user-info-section {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.avatar-frame {
    width: 40dp;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(255, 255, 255, 1);
    box-shadow: var(--shadow-chip);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: transform 0.15s ease;
}

.avatar-frame:active {
    transform: scale(0.92);
}

.app-logo-icon {
    width: 22px;
    height: 22px;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-welcome {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
}

.user-uid {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-top: 1px;
}

/* Balance Chip (btnRefreshBalance in activity_home.xml) */
.balance-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(255, 255, 255, 1);
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-chip);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.balance-chip:active {
    transform: scale(0.94);
}

.balance-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance-lbl {
    font-size: 9px;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 0.1em;
}

.balance-val {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.1;
}

.refresh-icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
    transition: transform 0.5s ease;
}

.refresh-icon.spinning {
    animation: spin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   SCROLLABLE CONTENT AREA
   ========================================================================== */
.content-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px 115px;
    -webkit-overflow-scrolling: touch;
}

.tab-view {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.tab-view.active {
    display: block;
}

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

/* ==========================================================================
   TAB 0: GAMES / HOME (viewTabHome in activity_home.xml)
   ========================================================================== */
.hero-featured-card {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    margin-bottom: 16px;
}

.hero-thumbnail-box {
    position: relative;
    width: 100%;
    height: 180px;
}

.hero-preset-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.40);
}

.hero-content {
    position: absolute;
    inset: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.hero-text-col {
    flex: 1;
    min-width: 0;
}

.hero-tag {
    font-size: 11px;
    font-weight: 700;
    color: #FDE047;
    letter-spacing: 0.08em;
}

.hero-headline {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    margin-top: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.hero-subtitle {
    font-size: 11px;
    color: #EDE9FE;
    margin-top: 4px;
    line-height: 1.3;
}

.hero-badge-logo {
    font-size: 32px;
    color: #FFFFFF;
    margin-left: 10px;
    flex-shrink: 0;
}

.btn-quick-play {
    width: 100%;
    height: 46px;
    min-height: 46px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.hero-featured-card.is-clickable-ad {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-featured-card.is-clickable-ad:active {
    transform: scale(0.98);
}

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

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: 0.08em;
}

.section-counter {
    font-size: 11px;
    font-weight: 700;
    color: var(--slate);
}

/* Almost Full Pulse Badge */
.badge-almost-full {
    background: rgba(239, 68, 68, 0.90);
    color: #FFFFFF;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

.badge-duration {
    background: rgba(15, 23, 42, 0.65);
    color: #E2E8F0;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

/* Tournaments Feed & Cards (item_tournament.xml) */
.tournaments-feed {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tournament-card {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 12px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.tournament-card:active {
    transform: scale(0.98);
}

.card-thumb-container {
    position: relative;
    width: 100%;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}

.card-thumb-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-thumb-scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
}

.card-thumb-top-row {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-split {
    background: rgba(254, 243, 199, 0.90);
    border: 1px solid rgba(245, 158, 11, 0.40);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #D97706;
    letter-spacing: 0.05em;
}

.badge-winner {
    background: rgba(238, 242, 255, 0.90);
    border: 1px solid rgba(99, 102, 241, 0.40);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #4F46E5;
    letter-spacing: 0.05em;
}

.badge-joined-live {
    background: rgba(15, 23, 42, 0.85);
    padding: 4px 9px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #34D399;
}

.card-thumb-tagline {
    position: absolute;
    bottom: 8px;
    left: 10px;
    right: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
}

.card-content-body {
    padding: 0 4px;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.card-game-icon {
    font-size: 24px;
}

.card-title-col {
    flex: 1;
}

.card-tier-name {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
}

.card-format-badge {
    font-size: 11px;
    color: var(--slate);
}

.card-hairline-divider {
    width: 100%;
    height: 1px;
    background: var(--border-subtle);
    margin-bottom: 10px;
}

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

.prizes-col {
    display: flex;
    flex-direction: column;
}

.prize-1st-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.val-1st {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
}

.lbl-place {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate);
}

.prize-2nd-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.val-2nd {
    font-size: 12px;
    font-weight: 700;
    color: var(--slate);
}

.entry-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.val-entry {
    font-size: 12px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
}

.btn-card-cta {
    background: var(--primary);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

/* Thumbnail Presets */
.preset-gold {
    background: linear-gradient(135deg, #B45309 0%, #D97706 50%, #78350F 100%);
}
.preset-neon {
    background: linear-gradient(135deg, #0F766E 0%, #06B6D4 50%, #083344 100%);
}
.preset-royal {
    background: linear-gradient(135deg, #4338CA 0%, #6366F1 50%, #1E1B4B 100%);
}
.preset-blitz {
    background: linear-gradient(135deg, #BE123C 0%, #F43F5E 50%, #4C0519 100%);
}
.preset-galaxy {
    background: linear-gradient(135deg, #1E1B4B 0%, #4338CA 50%, #701A75 100%);
}

.has-custom-banner {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: #0F172A !important;
}

/* ==========================================================================
   TAB 1: WALLET (viewTabWallet in activity_home.xml)
   ========================================================================== */
.subtab-container {
    position: relative;
    height: 50px;
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-chip);
}

.subtab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: #FFFFFF;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.subtab-nav {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}

.subtab-btn {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: #64748B;
    cursor: pointer;
    transition: color 0.2s ease;
}

.subtab-btn.active {
    color: #0F172A;
}

.wallet-section-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 3D Liquid Glass Card (bg_liquid_3d_glass_card.xml) */
.liquid-card {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--border-glass);
    border-radius: var(--radius-card);
    padding: 16px;
    box-shadow: var(--shadow-card);
    margin-bottom: 14px;
}

.card-section-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: 0.1em;
}

.status-badge-active {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #10B981;
    margin-top: 2px;
    margin-bottom: 12px;
}

/* Payment Number Copy Rows (rowBkashCopy, rowNagadCopy) */
.payment-number-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 12px;
    margin-top: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-chip);
    transition: transform 0.15s ease;
}

.payment-number-row:active {
    transform: scale(0.98);
}

.number-service-title {
    font-size: 12px;
    font-weight: 700;
}

.bkash-title {
    color: #E11D48;
}

.nagad-title {
    color: #D97706;
}

.number-display {
    flex: 1;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    margin-right: 8px;
}

.btn-copy-chip {
    background: rgba(238, 242, 255, 0.90);
    border: 1px solid rgba(99, 102, 241, 0.30);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
}

.guide-hint-text {
    font-size: 12px;
    color: #64748B;
    line-height: 1.4;
    margin-bottom: 10px;
}

.field-sublabel {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
    margin-bottom: 6px;
}

/* Method Selector Chips */
.method-chip-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.method-chip {
    flex: 1;
    height: 40px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #64748B;
    cursor: pointer;
}

.method-chip.active {
    background: #FFFFFF;
    border-color: var(--primary);
    color: #0F172A;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* Preset Amount Grid */
.preset-amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.amount-chip {
    height: 34px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0F172A;
    cursor: pointer;
}

.amount-chip:active {
    background: var(--primary);
    color: #FFFFFF;
}

/* Inputs & Paste Button */
.liquid-input {
    width: 100%;
    height: 48px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    padding: 0 14px;
    font-size: 14px;
    color: #0F172A;
    outline: none;
    margin-bottom: 12px;
}

.liquid-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-with-button-wrap {
    position: relative;
    width: 100%;
    height: 50px;
    margin-bottom: 16px;
}

.liquid-input-mono {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    padding: 0 84px 0 14px;
    font-size: 14px;
    font-family: monospace;
    color: #0F172A;
    outline: none;
}

.liquid-input-mono:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-paste-inside {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(238, 242, 255, 0.90);
    border: 1px solid rgba(99, 102, 241, 0.30);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.btn-eye-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

/* Material Buttons */
.btn-material-primary {
    width: 100%;
    height: 52px;
    background: var(--primary);
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease;
}

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

.btn-material-danger {
    width: 100%;
    height: 50px;
    background: var(--danger);
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.30);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btn-material-danger:active {
    transform: scale(0.97);
}

/* ==========================================================================
   TAB 2: PENDING & HISTORY (viewTabPending in activity_home.xml)
   ========================================================================= */
.pending-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pending-title-col {
    display: flex;
    flex-direction: column;
}

.section-badge-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: 0.1em;
}

.pending-main-title {
    font-size: 16px;
    font-weight: 700;
    color: #64748B;
    margin-top: 2px;
}

.btn-refresh-square {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid var(--border-glass);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-chip);
    cursor: pointer;
}

.pending-items-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* MaterialCardView cardView created in createTransactionCard() */
.native-tx-card {
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.90);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.tx-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tx-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
}

.tx-badge {
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
}

.tx-badge.approved {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.tx-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.tx-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.tx-bottom-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 6px;
}

.tx-sub-details {
    font-size: 11px;
    color: #64748B;
    line-height: 1.4;
}

.tx-amt-pos {
    font-size: 15px;
    font-weight: 700;
    color: #10B981;
}

.tx-amt-neg {
    font-size: 15px;
    font-weight: 700;
    color: #EF4444;
}

.empty-pending-box {
    text-align: center;
    padding: 40px 16px;
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

/* ==========================================================================
   TAB 3: SETTINGS (viewTabSettings in activity_home.xml)
   ========================================================================== */
#viewTabSettings {
    display: none;
    flex-direction: column;
    gap: 14px;
}

#viewTabSettings.active {
    display: flex;
}

.settings-headline {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    margin-top: 8px;
}

.settings-sub {
    font-size: 13px;
    color: #64748B;
    margin-top: 2px;
}

.settings-uid-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2px;
}

.pref-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.pref-label {
    font-size: 14px;
    color: #0F172A;
}

/* Switch Toggle (SwitchCompat) */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #CBD5E1;
    transition: 0.25s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.btn-text-link {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 0;
    cursor: pointer;
}

.app-version-label {
    display: block;
    font-size: 11px;
    color: #64748B;
    margin-top: 8px;
}

/* ==========================================================================
   FLOATING 3D LIQUID DOCK (bottomNavCard in activity_home.xml)
   ========================================================================== */
.bottom-dock {
    position: fixed;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 448px;
    height: 64px;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-dock);
    box-shadow: var(--shadow-dock);
    display: flex;
    align-items: center;
    z-index: 50;
    padding: 5px 4px;
}

.dock-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 4px;
    width: calc(25% - 2px);
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10), 0 1px 3px rgba(99, 102, 241, 0.12);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 1;
}

.dock-nav-items {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}

.dock-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748B;
    transition: color 0.2s ease;
}

.dock-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-label {
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
}

.dock-item.active {
    color: #0F172A;
}

.dock-item.active .dock-icon {
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* ==========================================================================
   DECISION BOTTOM SHEET (dialog_tournament_details.xml)
   ========================================================================== */
.sheet-scrim {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.sheet-scrim.visible {
    display: flex;
    animation: scrimFade 0.2s ease-out;
}

.bottom-sheet {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border-radius: 28px 28px 0 0;
    padding: 16px 20px 24px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    animation: sheetSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

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

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

.sheet-grabber-bar {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(100, 116, 139, 0.3);
    margin: 0 auto 14px;
}

.sheet-banner-box {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 14px;
}

.sheet-banner-bg {
    width: 100%;
    height: 100%;
}

.sheet-banner-scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.40);
}

.sheet-overlay-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-dialog-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.90);
    border: none;
    color: #0F172A;
    font-weight: 700;
    cursor: pointer;
}

.sheet-headline-overlay {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
}

.sheet-title-text {
    font-size: 17px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 10px;
}

.dialog-slots-card {
    background: rgba(241, 245, 249, 0.70);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.slots-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.slots-joined-text {
    color: #059669;
}

.slots-remaining-text {
    color: #D97706;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-emerald {
    height: 100%;
    background: #10B981;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.dialog-desc-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
}

.dialog-desc-box {
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px;
    font-size: 12px;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 14px;
}

.prize-grid-row {
    display: flex;
    gap: 8px;
    background: rgba(241, 245, 249, 0.70);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px;
}

.prize-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #64748B;
}

.p-val {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
    margin-top: 2px;
}

.highlight-prize .p-val {
    color: #059669;
}

/* ==========================================================================
   AUTH BOTTOM SHEET (activity_auth.xml)
   ========================================================================== */
.auth-header-section {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo-badge {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(238, 242, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.auth-app-title {
    font-size: 36px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.auth-app-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.auth-tab-slider-wrap {
    position: relative;
    height: 44px;
    background: rgba(241, 245, 249, 0.80);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
}

.auth-tab-pill {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.auth-tab-buttons {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
}

.auth-pill-btn {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 700;
    color: #64748B;
    cursor: pointer;
}

.auth-pill-btn.active {
    color: #0F172A;
}

.phone-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 14px;
    padding: 0 14px;
    height: 48px;
    margin-bottom: 12px;
}

.phone-prefix {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate);
    margin-right: 8px;
}

.phone-input-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #0F172A;
    background: transparent;
}

.auth-error-alert {
    background: rgba(254, 226, 226, 0.90);
    border: 1px solid rgba(239, 68, 68, 0.30);
    color: #B91C1C;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.auth-footer-note {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: #64748B;
}

/* ==========================================================================
   RULES MODAL
   ========================================================================== */
.rules-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.rules-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
}

.rules-content-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rule-row {
    display: flex;
    gap: 10px;
}

.rule-index {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rule-text h4 {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
}

.rule-text p {
    font-size: 12px;
    color: #64748B;
    line-height: 1.4;
    margin-top: 2px;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 72px;
    left: 20px;
    right: 20px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.92);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    margin-bottom: 8px;
    animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.toast.toast-error {
    background: rgba(220, 38, 38, 0.95);
}

.toast.toast-success {
    background: rgba(16, 185, 129, 0.95);
}

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

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(99, 102, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 16px;
    font-size: 13px;
    color: #64748B;
    font-weight: 600;
}
