/* =========================================================
   SCREEN BASE
   ========================================================= */
.screen {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

/* =========================================================
   AUTH SCREEN
   ========================================================= */
#auth, #complete-profile {
    position: fixed;
    inset: 0;
    justify-content: center;
    overflow-y: auto;
    z-index: 200;
}

.auth-card {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 22px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.auth-logo  { font-size: 40px; text-align: center; margin-bottom: 4px; }
.brand-logo-wrap { display: flex; justify-content: center; }
.brand-logo { display: block; object-fit: contain; }
.brand-logo-auth { width: 112px; height: 112px; filter: drop-shadow(0 10px 22px rgba(255,190,0,.18)); }
.auth-title { font-size: 22px; font-weight: bold; color: gold; text-align: center; }
.auth-sub   { font-size: 13px; color: rgba(255,255,255,0.4); text-align: center; margin-bottom: 14px; }

.auth-error {
    background: rgba(200,30,30,0.15);
    border: 1px solid rgba(200,30,30,0.4);
    border-radius: 10px;
    color: #ff8888;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 14px;
    text-align: center;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 14px;
}

.google-btn:hover { background: rgba(255,255,255,0.12); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 14px;
    color: rgba(255,255,255,0.25);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.auth-tabs {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 12px;
}

/* Tighter inputs inside the auth card so register form fits at 100% zoom */
.auth-card .lobby-input {
    padding: 9px 14px;
    margin-top: 8px !important;
}
.auth-card .lobby-btn {
    margin-top: 10px !important;
}

.auth-tab {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* =========================================================
   DASHBOARD
   ========================================================= */
#dashboard {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    background-color: #090b10;
    background-image:
        linear-gradient(rgba(7,9,14,.94), rgba(7,9,14,.97)),
        url("../images/ludo-bg.jpg");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    align-items: stretch;
    padding: 0;
}

#dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    background: rgba(18,18,22,0.96);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
}

#dash-user { display: flex; align-items: center; gap: 12px; }

.dash-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a4fcc, #1a9a1a);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: bold; color: white;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.dash-name  { font-size: 16px; font-weight: bold; color: white; }
.dash-phone { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 2px; }

#dash-header-actions { display: flex; align-items: center; gap: 10px; }
.game-api-status { margin-top: 3px; font-size: 10px; color: rgba(255,255,255,.55); }
.game-api-status::before { content:""; display:inline-block; width:6px; height:6px; margin-right:5px; border-radius:50%; background:#f4b942; vertical-align:1px; }
.game-api-status[data-status="connected"] { color:#2be58b; }
.game-api-status[data-status="connected"]::before { background:#17d97d; box-shadow:0 0 8px rgba(23,217,125,.8); }
.game-api-status[data-status="offline"] { color:#ff9b72; }
.game-api-status[data-status="offline"]::before { background:#ff7043; }
#header-wallet { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 7px 6px 14px; border: 1px solid rgba(255,215,0,0.2); border-radius: 14px; background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,255,255,0.035)); }
.header-wallet-copy { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.header-wallet-copy span { color: rgba(255,255,255,0.45); font-size: 9px; letter-spacing: .7px; text-transform: uppercase; }
#dash-balance { margin-top: 4px; color: gold; font-size: 16px; font-weight: 800; white-space: nowrap; }
.add-funds-btn { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 10px; background: gold; color: #17130a; font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer; transition: transform .15s, filter .15s; }
.add-funds-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.add-funds-btn:active { transform: scale(.96); }
.signout-btn { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.68); font: inherit; font-size: 11px; cursor: pointer; }
.signout-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.signout-icon { font-size: 18px; }

/* Stats row */
#stats-row {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin: 0 18px 16px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
}

.stat-label { font-size: 11px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 18px; font-weight: bold; color: white; margin-top: 4px; }

/* Play options */
#play-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 18px 14px;
}

.play-card {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, background 0.2s;
}

.play-card:hover {
    border-color: gold;
    background: rgba(255,215,0,0.05);
    transform: translateY(-2px);
}

.play-card:active { transform: scale(0.97); }

.play-card-icon  { font-size: 30px; margin-bottom: 8px; }
.play-card-title { font-size: 15px; font-weight: bold; color: white; }
.play-card-sub   { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 4px; }

/* Join by code */
#join-code-row {
    display: flex;
    gap: 10px;
    margin: 0 18px 18px;
}

#join-code-row input {
    min-width: 0;
}

/* Recent games */
#recent-games { padding: 0 18px 30px; }
.section-title { font-size: 14px; font-weight: bold; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.loading-text  { font-size: 13px; color: rgba(255,255,255,0.3); text-align: center; padding: 20px; }

.quick-match-help {
    margin: -7px 0 10px;
    color: rgba(255,255,255,0.42);
    font-size: 11px;
    line-height: 1.4;
}

/* Keep the dashboard's most important actions in one natural reading flow. */
#dash-header { order: 0; }
#play-options, #dashboard-hero { order: 1; }
#stats-row { order: 2; }
#active-game-banner { order: 3; }
#live-rooms-section { order: 4; }
#private-room-panel { order: 5; }
#recent-games { order: 6; }

/* Game-first dashboard hero */
#dashboard-hero {
    position: relative;
    min-height: 310px;
    margin: 0 18px 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 22px;
    background-image:
        linear-gradient(90deg, rgba(4,7,12,.96) 0%, rgba(4,7,12,.82) 38%, rgba(4,7,12,.2) 75%, rgba(4,7,12,.08) 100%),
        url("../images/ludo-bg.jpg");
    background-position: center;
    background-size: cover;
    box-shadow: 0 20px 50px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.08);
}
.dashboard-hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; width: min(540px,70%); height: 100%; min-height: inherit; padding: 28px 32px; }
.dashboard-hero-kicker { color: #ffd700; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; text-transform: uppercase; }
.dashboard-hero-content h1 { max-width: 430px; margin: 7px 0 6px; color: #fff; font-size: clamp(24px,3vw,38px); line-height: 1.05; }
.dashboard-hero-content > p { max-width: 430px; margin: 0 0 19px; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.5; }
.dashboard-hero-actions { display: flex; gap: 10px; }
.hero-play-btn, .hero-private-btn { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 16px; border-radius: 13px; font: inherit; text-align: left; cursor: pointer; transition: transform .16s, filter .16s, border-color .16s; }
.hero-play-btn { min-width: 190px; border: 0; background: linear-gradient(135deg,#ffe13b,#ffb900); color: #17130a; box-shadow: 0 8px 25px rgba(255,190,0,.22); }
.hero-private-btn { min-width: 180px; border: 1px solid rgba(255,255,255,.2); background: rgba(12,17,28,.74); color: #fff; backdrop-filter: blur(8px); }
.hero-play-btn:hover, .hero-private-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.hero-play-btn > span:first-child, .hero-private-btn > span:first-child { font-size: 21px; }
.hero-play-btn > span:last-child, .hero-private-btn > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.hero-play-btn strong, .hero-private-btn strong { font-size: 13px; }
.hero-play-btn small, .hero-private-btn small { font-size: 9px; opacity: .65; }
.dashboard-hero-colours { position: absolute; right: 18px; bottom: 16px; display: flex; gap: 6px; }
.dashboard-hero-colours i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.dashboard-hero-colours i:nth-child(1) { background:#ef3340; color:#ef3340; }
.dashboard-hero-colours i:nth-child(2) { background:#1687ff; color:#1687ff; }
.dashboard-hero-colours i:nth-child(3) { background:#ffd400; color:#ffd400; }
.dashboard-hero-colours i:nth-child(4) { background:#16bf55; color:#16bf55; }

#dashboard-greeting-name { color: #ffd700; }

#private-room-panel {
    margin: 0 18px 18px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 15px;
    background: rgba(15,18,25,.9);
}
#private-room-panel .section-title { margin-bottom: 3px; }
.private-room-help { margin-bottom: 11px; color: rgba(255,255,255,.4); font-size: 10px; line-height: 1.4; }
.private-create-btn { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 40px; margin-bottom: 8px; border: 1px solid rgba(255,215,0,.25); border-radius: 10px; background: rgba(255,215,0,.07); color: #ffd700; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.private-create-btn span { font-size: 18px; }
.private-create-btn:hover { background: rgba(255,215,0,.13); }
#private-room-panel #join-code-row { margin: 0; gap: 7px; }
#private-room-panel #join-code-row .lobby-input,
#private-room-panel #join-code-row .lobby-btn { min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 11px; }

#mobile-dashboard-nav { display: none; }

@media (max-width: 600px) {
    #dashboard-hero { min-height: 360px; margin: 0 14px 14px; background-image: linear-gradient(0deg,rgba(4,7,12,.97) 0%,rgba(4,7,12,.68) 55%,rgba(4,7,12,.12) 100%), url("../images/ludo-bg.jpg"); background-position: 58% center; }
    .dashboard-hero-content { justify-content: flex-end; width: 100%; padding: 22px 18px; }
    .dashboard-hero-content h1 { font-size: 26px; }
    .dashboard-hero-actions { flex-direction: column; }
    .hero-play-btn, .hero-private-btn { width: 100%; min-width: 0; justify-content: center; }
    #private-room-panel { margin: 0 14px 14px; }
}
.quick-match-filters { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.quick-filter-select,
.quick-affordable-filter {
    min-height: 38px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: #181820;
    color: rgba(255,255,255,0.78);
    font: inherit;
    font-size: 12px;
}
.quick-filter-select { flex: 1; padding: 0 10px; }
.quick-affordable-filter { display: flex; align-items: center; gap: 7px; padding: 0 11px; white-space: nowrap; }
.quick-affordable-filter input { accent-color: gold; }
.quick-match-grid { display: grid; gap: 10px; max-height: 390px; overflow-y: auto; padding: 1px 3px 3px 1px; }
.quick-match-card {
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 15px;
    background: linear-gradient(145deg, #1b1b2e, #14141f);
    color: white;
}
.quick-match-card-top,
.quick-match-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quick-match-host { display: flex; align-items: center; min-width: 0; gap: 9px; }
.quick-match-avatar {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a4fcc, #6541c7);
    font-size: 13px; font-weight: 800;
}
.quick-match-host div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.quick-match-host strong { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.quick-match-host span:not(.quick-match-avatar) { color: rgba(255,255,255,0.38); font-size: 10px; }
.quick-match-badge { padding: 5px 8px; border-radius: 999px; background: rgba(55,200,90,0.12); color: #6ee78b; font-size: 10px; font-weight: 700; white-space: nowrap; }
.quick-match-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 12px 0; }
.quick-match-facts div { min-width: 0; padding: 8px; border-radius: 9px; background: rgba(255,255,255,0.045); }
.quick-match-facts span,
.quick-match-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-match-facts span { color: rgba(255,255,255,0.38); font-size: 9px; text-transform: uppercase; }
.quick-match-facts strong { margin-top: 3px; color: #fff; font-size: 11px; }
.quick-match-player-dots { display: flex; gap: 5px; }
.quick-match-player-dots span { width: 11px; height: 11px; border: 2px solid rgba(255,255,255,0.22); border-radius: 50%; }
.quick-match-join { min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: gold; color: #17130a; font-size: 11px; font-weight: 800; cursor: pointer; }
.quick-match-join:disabled { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.35); cursor: not-allowed; }
.quick-match-empty { display: flex; flex-direction: column; gap: 5px; padding: 24px 16px; border: 1px dashed rgba(255,255,255,0.12); border-radius: 14px; color: rgba(255,255,255,0.42); text-align: center; font-size: 12px; }
.quick-match-empty strong { color: rgba(255,255,255,0.75); font-size: 13px; }
.quick-modal-note { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,215,0,0.07); color: rgba(255,255,255,0.55); font-size: 11px; line-height: 1.45; }

/* Compact public match rows: five rows per page without stretching the dashboard. */
.quick-match-grid { max-height: none; overflow: visible; gap: 7px; }
.quick-match-card {
    display: grid;
    grid-template-columns: minmax(130px,1.35fr) minmax(150px,1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 10px;
    border-radius: 12px;
}
.quick-match-card-top { min-width: 0; }
.quick-match-avatar { width: 30px; height: 30px; font-size: 11px; }
.quick-match-host strong { font-size: 12px; }
.quick-match-badge { padding: 4px 7px; font-size: 9px; }
.quick-match-facts { grid-template-columns: repeat(3,minmax(58px,1fr)); gap: 0; margin: 0; }
.quick-match-facts div { padding: 2px 8px; border-left: 1px solid rgba(255,255,255,0.08); border-radius: 0; background: transparent; }
.quick-match-facts span { font-size: 8px; }
.quick-match-facts strong { margin-top: 2px; font-size: 10px; }
.quick-match-card-bottom { justify-content: flex-end; }
.quick-match-player-dots { display: none; }
.quick-match-join { min-height: 34px; padding: 0 11px; font-size: 10px; white-space: nowrap; }
.quick-match-pagination { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 34px; margin-top: 8px; }
.quick-match-pagination:empty { display: none; }
.quick-match-pagination span { min-width: 72px; color: rgba(255,255,255,0.48); font-size: 10px; text-align: center; }
.quick-match-pagination button { min-height: 30px; padding: 0 10px; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.75); font-size: 10px; cursor: pointer; }
.quick-match-pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 700px) {
    .quick-match-card { grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; }
    .quick-match-card-top { grid-column: 1; }
    .quick-match-facts { grid-column: 1; }
    .quick-match-card-bottom { grid-column: 2; grid-row: 1 / span 2; }
    .quick-match-badge { display: none; }
}

@media (max-width: 480px) {
    .quick-match-filters { align-items: stretch; }
    .quick-affordable-filter { justify-content: center; }
    .quick-match-card { min-height: 64px; padding: 7px 8px; }
    .quick-match-facts div { padding-left: 5px; padding-right: 5px; }
    .quick-match-facts div:nth-child(3) { display: none; }
    .quick-match-facts { grid-template-columns: repeat(2,minmax(54px,1fr)); }
    .quick-match-join { max-width: 82px; padding: 0 8px; white-space: normal; line-height: 1.1; }
}

.game-history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.history-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}

.history-icon.win  { background: rgba(255,215,0,0.15); }
.history-icon.loss { background: rgba(255,255,255,0.06); }

.history-info    { flex: 1; }
.history-result  { font-size: 13px; color: white; font-weight: 500; }
.history-date    { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 2px; }
.history-amount  { font-size: 13px; font-weight: bold; }
.history-amount.positive { color: gold; }
.history-amount.neutral  { color: rgba(255,255,255,0.4); }

/* Compact dashboard for short phone screens */
@media (max-height: 700px) and (max-width: 799px) {
    #dash-header { padding: 10px 14px; }
    .dash-avatar { width: 36px; height: 36px; font-size: 15px; }
    .dash-name  { font-size: 14px; }
    .dash-phone { font-size: 11px; }
    #stats-row { margin: 0 14px 10px; gap: 8px; }
    .stat-card { padding: 8px 6px; }
    .stat-label { font-size: 10px; }
    .stat-value { font-size: 15px; margin-top: 2px; }
    #play-options { gap: 8px; margin: 0 14px 10px; }
    .play-card { padding: 12px 10px; }
    .play-card-icon  { font-size: 22px; margin-bottom: 4px; }
    .play-card-title { font-size: 13px; }
    .play-card-sub   { font-size: 10px; margin-top: 2px; }
    #live-rooms-section { margin: 0 14px 10px; }
    #join-code-row { margin: 0 14px 12px; }
    #recent-games { padding: 0 14px 16px; }
    .section-title { margin-bottom: 8px; }
    #status-bar { padding: 3px 10px; min-height: 22px; font-size: 10px; }
    #fab-group { bottom: 48px; right: 10px; gap: 8px; }
    #emoji-fab { width: 38px; height: 38px; font-size: 19px; }
    .emoji-btn { width: 34px; height: 34px; font-size: 18px; }
    #chat-fab  { width: 38px; height: 38px; font-size: 19px; }
    .chat-msg-btn { font-size: 12px; padding: 5px 11px; }
    .chat-bubble { font-size: 11px; padding: 4px 9px; }
    #chat-feed { max-width: min(180px, 55%); }
    .panel-avatar { width: 22px; height: 22px; font-size: 9px; }
    .panel-name { font-size: 10px; }
    .panel-info { font-size: 9px; }
}

/* =========================================================
   ROOM PREVIEW SCREEN
   ========================================================= */
#room-preview { justify-content: center; }

.rp-info-box {
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 14px;
    color: white;
    line-height: 2;
}

/* =========================================================
   LOBBY / WAITING ROOM
   ========================================================= */

/* Matchmaking spinner */
.spinner {
    width: 48px; height: 48px;
    border: 4px solid rgba(255,215,0,0.2);
    border-top-color: gold;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

#mm-spinner    {
    text-align: center;
    padding: 30px 0 20px;
    margin: 0;
    font-size: inherit;
    animation: none;
    transform: none;
}
#mm-status     { font-size: 16px; color: white; font-weight: bold; }
#mm-timer      { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 4px; }
#mm-stake-display {
    text-align: center; padding: 12px;
    background: rgba(255,215,0,0.08);
    border-radius: 12px; margin-bottom: 6px;
    font-size: 15px; color: gold; font-weight: bold;
}

#mm-found-list { display: flex; flex-direction: column; gap: 8px; }

.mm-player-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px; font-size: 14px; color: white;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

@keyframes dc-pulse-danger {
    0%   { opacity: 1; }
    50%  { opacity: 0.5; }
    100% { opacity: 1; }
}

/* =========================================================
   MODALS
   ========================================================= */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #1a1a2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 24px 22px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
}

.room-preview-player {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 13px;
    color: white;
    box-sizing: border-box;
}

.room-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.room-join-message {
    min-height: 18px;
    margin: -8px 0 8px;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    color: rgba(255,255,255,0.55);
}

.room-join-message.error { color: #ff8888; }

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px; font-size: 17px; font-weight: bold; color: white;
}

.modal-close {
    background: rgba(255,255,255,0.1); border: none;
    color: white; width: 28px; height: 28px;
    border-radius: 50%; font-size: 13px; cursor: pointer;
}

.deposit-step { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.7; }
.deposit-number { font-size: 20px; font-weight: bold; color: gold; }

.platform-wallet-message {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(255,215,0,0.18);
    border-radius: 14px;
    background: rgba(255,215,0,0.06);
    color: white;
    font-size: 14px;
    line-height: 1.5;
}

.platform-wallet-message p {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.62);
    font-size: 13px;
}

.platform-wallet-icon { font-size: 28px; margin-bottom: 8px; }

/* =========================================================
   DASHBOARD TOAST
   ========================================================= */
#dash-toast {
    position: fixed;
    bottom: -80px; left: 50%;
    transform: translateX(-50%);
    background: rgba(20,20,20,0.95);
    color: white; font-size: 14px; font-weight: bold;
    padding: 12px 24px; border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    z-index: 999; transition: bottom 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    white-space: nowrap;
    pointer-events: none;
    max-width: calc(100vw - 32px);
    text-align: center;
}

#dash-toast.show { bottom: 36px; }

@media (max-width: 480px) {
    .screen { padding: 12px; }
    .auth-card { padding: 20px 18px; border-radius: 16px; }
    .modal-overlay { padding: 12px; align-items: flex-end; }
    .modal-box { padding: 20px 16px; border-radius: 18px 18px 12px 12px; }
    .modal-close { width: 44px; height: 44px; font-size: 16px; }
    #balance-actions { flex-wrap: wrap; }
    .balance-btn { min-height: 44px; }
    #dash-toast { white-space: normal; }
}

