:root {
    --ink: #eef0ff;
    --muted: #a9acc7;
    --bg: #0b0b19;
    --panel: rgba(29, 30, 56, .78);
    --line: rgba(255, 255, 255, .1);
    --lime: #d9ff59;
    --violet: #8a7dff;
    --coral: #ff727a;
    --shadow: 0 20px 45px rgba(0, 0, 0, .28)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    min-height: 100vh
}

button {
    font: inherit;
    color: inherit;
    border: 0;
    cursor: pointer
}

.aurora {
    position: fixed;
    border-radius: 999px;
    filter: blur(80px);
    opacity: .28;
    pointer-events: none
}

.a1 {
    height: 310px;
    width: 310px;
    background: #794cff;
    top: -120px;
    left: -130px
}

.a2 {
    height: 270px;
    width: 270px;
    background: #2cbdba;
    right: -100px;
    top: 240px
}

#app {
    max-width: 620px;
    margin: auto;
    position: relative;
    min-height: 100vh
}

.gate {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 28px
}

.logo-mark {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--lime), #69e6ab);
    color: #111321;
    width: 72px;
    height: 72px;
    border-radius: 24px;
    font-size: 34px;
    font-weight: 900;
    box-shadow: inset 0 2px #fff9, 0 15px 35px #a2f56a40;
    transform: rotate(-8deg)
}

.logo-mark.small {
    width: 38px;
    height: 38px;
    font-size: 19px;
    border-radius: 13px
}

.gate h1 {
    font-size: 35px;
    margin: 22px 0 5px
}

.gate p {
    color: var(--muted);
    margin: 0
}

.loader {
    margin-top: 24px;
    width: 25px;
    height: 25px;
    border: 3px solid #ffffff28;
    border-top-color: var(--lime);
    border-radius: 100%;
    animation: spin 1s linear infinite
}

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

[hidden] {
    display: none !important
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(18px + env(safe-area-inset-top)) 20px 16px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px
}

.brand strong {
    font-size: 18px;
    display: block;
    letter-spacing: -.6px
}

.brand small {
    color: var(--muted);
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px
}

.wallet-pill {
    background: #ffffff11;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 8px 10px;
    text-align: right
}

.wallet-pill span {
    color: var(--muted);
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px
}

.wallet-pill b {
    font-size: 13px;
    color: var(--lime)
}

.page {
    padding: 4px 20px calc(103px + env(safe-area-inset-bottom));
    display: none
}

.page.active {
    display: block;
    animation: enter .28s ease both
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.hero {
    overflow: hidden;
    min-height: 250px;
    padding: 26px 24px;
    background: linear-gradient(132deg, #332d72, #151832 62%, #1f5763);
    border: 1px solid #ffffff19;
    border-radius: 28px;
    position: relative;
    box-shadow: var(--shadow)
}

.hero:before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border: 28px solid #d7ff5730;
    border-radius: 50%;
    right: -120px;
    bottom: -125px
}

.hero h1 {
    font-size: 38px;
    line-height: .94;
    letter-spacing: -2.2px;
    margin: 7px 0 15px;
    position: relative
}

.hero h1 em {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--lime)
}

.hero p:not(.eyebrow) {
    color: #d0d1e4;
    max-width: 235px;
    font-size: 13px;
    line-height: 1.5;
    margin: 0
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.55px;
    font-weight: 750;
    color: var(--lime);
    margin: 0
}

.hero-bird {
    position: absolute;
    right: 21px;
    top: 49px;
    font-size: 73px;
    filter: drop-shadow(0 13px 5px #0005);
    transform: rotate(-16deg);
    animation: fly 3.3s ease-in-out infinite
}

@keyframes fly {
    50% {
        transform: translateY(-9px) rotate(-10deg)
    }
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 31px 3px 14px
}

.section-head h2 {
    margin: 4px 0 0;
    font-size: 23px;
    letter-spacing: -1px
}

.text-button {
    background: transparent;
    color: var(--lime);
    font-size: 12px;
    font-weight: 700
}

.game-list {
    display: grid;
    gap: 12px
}

.game-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 17px;
    position: relative;
    overflow: hidden
}

.game-card:after {
    content: "";
    position: absolute;
    background: #ffffff09;
    width: 130px;
    height: 130px;
    border-radius: 99px;
    right: -62px;
    bottom: -80px
}

.game-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1
}

.game-title {
    display: flex;
    align-items: center;
    gap: 11px
}

.bird-dot {
    width: 37px;
    height: 37px;
    border-radius: 13px;
    background: linear-gradient(145deg, #ffb44f, #f66a7e);
    display: grid;
    place-items: center;
    font-size: 19px
}

.game-title b {
    display: block;
    font-size: 15px
}

.game-title small {
    font-size: 11px;
    color: var(--muted)
}

.status {
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    padding: 5px 8px;
    background: #d9ff5920;
    color: var(--lime);
    text-transform: uppercase
}

.game-stats {
    display: flex;
    gap: 18px;
    margin: 17px 0 14px;
    position: relative;
    z-index: 1
}

.game-stats span {
    color: var(--muted);
    font-size: 10px;
    display: block
}

.game-stats b {
    font-size: 14px;
    display: block;
    margin-top: 2px
}

.game-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    position: relative;
    z-index: 1
}

.game-bottom small {
    color: var(--muted);
    font-size: 11px
}

.game-bottom small b {
    color: var(--ink)
}

.join {
    background: var(--lime);
    color: #1a1c26;
    border-radius: 11px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800
}

.join:disabled {
    opacity: .55
}

.page-title {
    padding: 11px 2px 21px
}

.page-title h1 {
    font-size: 33px;
    letter-spacing: -1.8px;
    margin: 6px 0
}

.page-title p:not(.eyebrow) {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.45
}

.balance-card {
    padding: 24px;
    background: linear-gradient(135deg, #3a3277, #202657);
    border: 1px solid #ffffff21;
    border-radius: 25px;
    box-shadow: var(--shadow)
}

.balance-card span {
    font-size: 10px;
    color: #cbcef0;
    letter-spacing: 1.3px
}

.balance-card strong {
    display: block;
    font-size: 37px;
    letter-spacing: -2px;
    margin: 8px 0 20px
}

.balance-card i {
    font-style: normal;
    font-size: 16px;
    color: var(--lime);
    letter-spacing: 0
}

.primary {
    width: 100%;
    padding: 13px 16px;
    border-radius: 13px;
    background: var(--lime);
    color: #161722;
    font-weight: 800;
    display: flex;
    justify-content: space-between
}

.split-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin-top: 13px
}

.info-card {
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    text-align: left
}

.info-card b,
.info-card small {
    display: block
}

.info-card b {
    font-size: 13px;
    margin: 11px 0 3px
}

.info-card small {
    font-size: 10px;
    color: var(--muted)
}

.circle-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #8a7dff2b;
    color: #aa9fff;
    display: grid;
    place-items: center
}

.circle-icon.gold {
    color: var(--lime);
    background: #d9ff591d
}

.fineprint {
    font-size: 10px;
    line-height: 1.5;
    color: var(--muted);
    margin: 18px 5px
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(620px, 100%);
    z-index: 4;
    padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, #0b0b19 30%);
    display: flex;
    justify-content: space-around
}

.nav-item {
    background: #17182b;
    color: #9093af;
    min-width: 76px;
    padding: 8px 11px;
    border-radius: 15px;
    font-size: 10px;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center
}

.nav-item span {
    font-size: 18px;
    line-height: 1
}

.nav-item.active {
    background: #d9ff5920;
    color: var(--lime)
}

.back {
    background: none;
    color: var(--muted);
    font-size: 12px;
    padding: 8px 0 18px
}

.game-room {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 25px;
    padding: 17px
}

.room-meta {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.room-meta h2 {
    font-size: 20px;
    margin: 5px 0
}

.room-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 11px
}

.waiting-box {
    margin: 20px 0;
    border-radius: 18px;
    padding: 26px;
    background: #ffffff08;
    text-align: center
}

.waiting-box .loader {
    margin: 0 auto 15px
}

.waiting-box b {
    display: block
}

.waiting-box small {
    color: var(--muted);
    font-size: 11px
}

/* Race status lives below the playfield: opponents are visible without ever covering the bird or pipes. */
.countdown-number {
    width: 92px;
    height: 92px;
    margin: 24px auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #171722;
    background: var(--lime);
    box-shadow: 0 0 0 10px #d9ff591c, 0 0 34px #d9ff5950;
    font-size: 45px;
    font-weight: 900;
    animation: countdownPulse .8s ease-in-out infinite alternate
}

@keyframes countdownPulse {
    to { transform: scale(1.08) }
}

.race-traffic {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px
}

.race-player {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 9px;
    background: #ffffff08;
    font-size: 10px
}

.race-player small { color: var(--muted) }
.race-player.playing { border-color: #d9ff5960; color: var(--lime) }
.race-player.lost { opacity: .52; text-decoration: line-through }
.race-player.winner { color: #ffe554; border-color: #ffe55466 }
.race-player.demo-bot { border-color: #9d8cff88; background: #9d8cff18; color: #ddd7ff }

/* Disclosure styling: bots are intentionally distinct from Telegram players everywhere they appear. */
.demo-notice {
    margin: 11px 0 0;
    padding: 8px 10px;
    border: 1px solid #9d8cff70;
    border-radius: 10px;
    color: #ded8ff;
    background: #8e7dff18;
    font-size: 10px;
    font-weight: 700
}

.demo-leader { border-left: 2px solid #a895ff; padding-left: 8px }

.canvas-wrap {
    border-radius: 24px;
    overflow: hidden;
    background: #171d48;
    width: min(100%, 455px);
    aspect-ratio: 7 / 8;
    height: auto;
    max-width: 455px;
    margin: 0 auto;
    position: relative;
    border: 1px solid #ffffff2a;
    box-shadow: 0 22px 55px #07081790, inset 0 1px #ffffff30
}

.canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    cursor: pointer
}

.tap-label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 5px;
    align-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 2px 10px #000a;
    pointer-events: none;
    letter-spacing: .08em;
    animation: tapGlow 1.1s ease-in-out infinite alternate
}

.tap-label small { color: #ffffffa6; font-size: 9px; font-weight: 600; letter-spacing: .04em }

@keyframes tapGlow { to { transform: scale(1.045); opacity: .72 } }

.flight-room .room-meta { margin-bottom: 10px }

.live-status { background: #d9ff5922; border-color: #d9ff5970; color: var(--lime) }

.flight-hud {
    position: absolute;
    z-index: 1;
    top: 15px;
    left: 15px;
    padding: 8px 12px;
    min-width: 75px;
    border: 1px solid #ffffff32;
    border-radius: 13px;
    background: #11152ab8;
    box-shadow: 0 8px 24px #0004;
    backdrop-filter: blur(8px)
}

.flight-hud span { display: block; color: #ffffffa6; font-size: 8px; font-weight: 800; letter-spacing: .09em }
.flight-hud b { display: block; color: white; font-size: 26px; line-height: 1.05 }

.leaderboard {
    margin-top: 14px
}

.leader {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 12px
}

.leader:last-child {
    border: 0
}

.leader .rank {
    color: var(--muted);
    width: 16px
}

.leader .name {
    flex: 1
}

.leader .score {
    color: var(--lime);
    font-weight: 800
}

.modal {
    position: fixed;
    z-index: 10;
    inset: 0;
    background: #000a;
    display: flex;
    align-items: end;
    justify-content: center
}

.modal-sheet {
    position: relative;
    width: min(620px, 100%);
    background: #20213c;
    border: 1px solid var(--line);
    border-radius: 26px 26px 0 0;
    padding: 28px 22px calc(28px + env(safe-area-inset-bottom));
    animation: sheet .2s ease both
}

@keyframes sheet {
    from {
        transform: translateY(30px);
        opacity: 0
    }
}

.close-modal {
    position: absolute;
    right: 16px;
    top: 12px;
    background: transparent;
    font-size: 27px;
    color: var(--muted)
}

.modal-sheet h2 {
    margin: 0 0 6px;
    font-size: 23px
}

.modal-sheet p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    margin: 0 0 18px
}

.field {
    margin: 13px 0
}

.field label {
    font-size: 11px;
    color: #caccde;
    display: block;
    margin: 0 0 6px
}

.field input,
.field select {
    width: 100%;
    background: #121325;
    border: 1px solid #ffffff16;
    border-radius: 11px;
    padding: 12px;
    color: var(--ink);
    outline: 0
}

.form-note {
    font-size: 10px;
    color: var(--muted);
    margin: 10px 2px
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 15px
}

.tab {
    border-radius: 10px;
    background: #ffffff0c;
    color: var(--muted);
    padding: 8px 12px;
    font-size: 12px
}

.tab.active {
    background: var(--violet);
    color: white
}

.admin-row {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px;
    margin: 9px 0
}

.admin-row h3 {
    font-size: 14px;
    margin: 0 0 4px
}

.admin-row p {
    color: var(--muted);
    font-size: 11px;
    margin: 0 0 10px
}

.admin-actions {
    display: flex;
    gap: 7px
}

.secondary,
.danger {
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    background: #ffffff11
}

.danger {
    color: #ff9aa1;
    background: #ff727a1d
}

#toast {
    position: fixed;
    z-index: 20;
    bottom: 90px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: #e9ebff;
    color: #191a29;
    padding: 10px 14px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    transition: .25s;
    pointer-events: none;
    max-width: 88%;
    text-align: center
}

#toast.show {
    opacity: 1;
    transform: translate(-50%, 0)
}

.empty {
    padding: 30px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    background: #ffffff08;
    border-radius: 17px
}

@media(min-width:621px) {
    body {
        background: #090914
    }

    .bottom-bar {
        border: 1px solid #ffffff12;
        border-bottom: 0;
        border-radius: 20px 20px 0 0
    }

    .page {
        padding-left: 26px;
        padding-right: 26px
    }
}
.profile-card{text-align:center}.profile-photo,.profile-avatar{width:76px;height:76px;border-radius:50%;object-fit:cover;display:grid;place-items:center;margin:0 auto 14px;background:linear-gradient(145deg,var(--violet),#31c3bb);font-size:34px;border:3px solid #ffffff25}.profile-card h2{margin:0 0 5px}.profile-card p{margin-bottom:18px}.profile-balance{border:1px solid var(--line);background:#ffffff09;border-radius:15px;padding:13px;margin:0 0 16px;text-align:left}.profile-balance span{display:block;font-size:9px;color:var(--muted);letter-spacing:1px}.profile-balance b{display:block;font-size:21px;margin-top:4px;color:var(--lime)}
