:root {
    --bg-black: #080808;
    --panel-black: #121212;
    --gold: #d4af37;
    --red: #b90e1a;
    --text: #ece7d5;
    --muted: #b9b4a4;
    --border: #44381a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Rajdhani", sans-serif;
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
}

.home-page {
    background: #000;
}

.bg-glow {
    position: fixed;
    width: 30rem;
    height: 30rem;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
}

.glow-left {
    top: -8rem;
    left: -10rem;
    background: var(--gold);
}

.glow-right {
    bottom: -8rem;
    right: -8rem;
    background: var(--red);
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    flex-wrap: nowrap;
}

.container {
    position: relative;
    z-index: 0;
}

.main-area {
    margin-top: 7.5rem;
}

.topbar-left,
.topbar-center,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-left {
    justify-content: flex-start;
    flex-shrink: 0;
}

.topbar-center {
    justify-content: center;
    flex-shrink: 0;
}

.topbar-right {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.5rem;
    flex-shrink: 0;
}

.brand-title {
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.12em;
    font-size: 1.1rem;
    color: var(--gold);
    text-decoration: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
    border: 1px solid rgba(212, 175, 55, 0.12);
}

.brand-logo .brand-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.topbar h1 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.1em;
    font-size: 2rem;
    color: var(--gold);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.brand .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.1em;
    font-size: 2rem;
    color: var(--gold);
    text-decoration: none;
}

.auth-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.terms-accept-label {
    margin-top: 0.7rem;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.terms-accept-label input[type="checkbox"] {
    margin-top: 0.15rem;
    accent-color: var(--gold);
}

.terms-accept-label a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.4rem;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 0.55rem;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--gold);
    border-radius: 2px;
}

.menu-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.menu-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 0.75rem);
    min-width: 12rem;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(8, 8, 8, 0.98);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    padding: 0.45rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 1100;
}

.menu-dropdown.hidden {
    display: none;
}

.dropdown-item {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text);
    padding: 0.85rem 1rem;
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
}

.balance-pill {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    min-width: 220px;
    text-align: center;
}

.balance-pill strong {
    color: var(--gold);
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.balance-pill span {
    font-size: 1rem;
    font-weight: 600;
}

.header-promo {
    margin: 0;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
}

.header-promo strong {
    color: var(--gold);
}

/* Profile Section */
.profile-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.profile-icon {
    width: 32px;
    height: 32px;
    color: var(--gold);
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: right;
    font-size: 0.85rem;
}

.profile-email {
    display: none;
}

.profile-balance {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.withdraw-panel {
    position: fixed;
    top: 5.8rem;
    left: 0;
    right: 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(12px);
    z-index: 1001;
    display: grid;
    place-items: center;
}

.withdraw-panel.hidden {
    display: none;
}

.withdraw-card {
    width: min(620px, 95vw);
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.withdraw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.withdraw-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gold);
}

.withdraw-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.withdraw-card label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text);
    font-size: 0.95rem;
}

.withdraw-card input,
.withdraw-card select {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
}

.withdraw-card input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.withdraw-note {
    color: var(--muted);
    margin-bottom: 1rem;
}

.withdraw-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.withdraw-status {
    color: var(--gold);
    font-weight: 600;
}

@media (max-width: 720px) {
    .withdraw-grid {
        grid-template-columns: 1fr;
    }
}

.betslip-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    backdrop-filter: blur(8px);
}

.betslip-panel.hidden {
    display: none !important;
}

.betslip-card {
    background: rgba(8, 8, 8, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#myBetsPanel .betslip-card {
    padding-top: 0.6rem;
}

.betslip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.betslip-card-header h3 {
    color: var(--gold);
    margin: 0;
}

.betslip-list {
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.betslip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.betslip-item-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.betslip-item-info {
    flex: 1;
}

.betslip-item-match {
    font-weight: 600;
    color: var(--text);
}

.betslip-item-selection {
    color: var(--muted);
    font-size: 0.9rem;
}

.betslip-item-odds {
    color: var(--gold);
    font-weight: 600;
}

.betslip-item-remove {
    background: none;
    border: none;
    color: #ff5555;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.betslip-item-remove:hover {
    background: rgba(255, 85, 85, 0.1);
}

.betslip-summary {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.betslip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.betslip-row label {
    margin: 0;
}

.betslip-row input {
    width: 120px;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-align: right;
}

.betslip-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.betslip-status {
    color: var(--gold);
    font-weight: 600;
}

.betslip-booking {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 1rem;
    text-align: center;
}

.betslip-booking h4 {
    color: var(--gold);
    margin: 0 0 0.5rem;
}

.betslip-booking p {
    margin: 0 0 1rem;
    color: var(--text);
}

.betslip-booking-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.main-area {
    margin-top: 7.5rem;
    min-height: calc(100vh - 260px);
    padding-bottom: 120px;
}

.main-content-area {
    padding: 2rem 0;
}

.home-page-content {
    text-align: center;
    padding: 2rem;
}

.home-page-title {
    color: var(--gold);
    font-size: 2.5rem;
    margin: 0 0 1rem;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    padding: 0.8rem 0.75rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
}

.bottom-nav.show {
    display: grid;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--gold);
}

.nav-item.active {
    color: var(--gold);
}

.page-actions-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.page-tabs {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0 0;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 28px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.page-tab {
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #f9f5e1;
    min-width: 90px;
    text-align: center;
    padding: 0.85rem 1.35rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-tab:hover,
.page-tab:focus {
    background: rgba(255, 255, 255, 0.12);
}

.page-tab.active {
    background: var(--gold);
    color: #080808;
    border-color: var(--gold);
}

.bets-list {
    display: grid;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.bets-list-empty {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
}

.bet-card {
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bet-card-clickable {
    cursor: pointer;
}

.bet-card-clickable:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.bet-card-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.24s ease, opacity 0.24s ease, transform 0.24s ease;
}

.bet-card-expanded .bet-card-body {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
}

.bet-card-footer {
    display: flex;
    justify-content: flex-end;
    color: rgba(255,255,255,0.68);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.bet-card-clickable:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.bet-card.detail-active {
    background: rgba(24, 24, 24, 0.98);
}

.bet-detail-card {
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.bet-detail-section {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.bet-leg-odds {
    color: var(--gold);
    font-weight: 700;
}

.bet-leg-row.detail-row {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.04);
}

.mybets-sticky-container {
    position: sticky;
    top: 0;
    z-index: 102;
    background: rgba(0, 0, 0, 0.92);
    padding: 0 1rem 0.6rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px 24px 0 0;
}

#myBetsPanel .betslip-card {
    padding-top: 0;
}

.mybets-top-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(8, 8, 8, 0.98);
    padding: 0.4rem 0.85rem;
    border-radius: 24px 24px 0 0;
}

.mybets-title h3 {
    margin: 0;
    font-size: 1.1rem;
}

.mybets-sticky-container .page-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 28px;
}

.page-tab {
    min-width: 70px;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

.bet-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.bet-card-id,
.bet-card-amount {
    font-weight: 700;
    display: block;
}

.bet-card-amount {
    color: var(--gold);
}

.bet-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.72);
    margin-bottom: 0.75rem;
}

.bet-card-status {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    font-weight: 700;
    font-size: 0.9rem;
}

.bet-card-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.88);
    margin-bottom: 0.75rem;
}

.bet-leg-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.86);
    margin-bottom: 0.5rem;
}

.bet-leg-match,
.bet-leg-selection {
    display: block;
    width: 100%;
}

.page-header {
    padding: 1rem 1rem 0;
}

.page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.page-header-top h2 {
    margin-bottom: 0.25rem;
}

.page-header h2 {
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255,255,255,0.75);
    margin-bottom: 1rem;
}

.profile-card {
    max-width: 520px;
    margin: 0 auto;
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.profile-card h2 {
    margin-bottom: 1rem;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 1rem;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.nav-icon {
    width: 28px;
    height: 28px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-item.nav-center {
    position: relative;
}

.nav-center-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.nav-item.nav-center .nav-icon {
    width: 32px;
    height: 32px;
    color: #000;
}

.nav-icon-soccer {
    font-size: 1.4rem;
    line-height: 1;
}

.live-matches-list {
    display: grid;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.live-tabs {
    display: flex;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: sticky;
    top: 7.75rem;
    z-index: 900;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 12px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.live-tab {
    padding: 0.65rem 1.25rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.live-tab:hover {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.08);
}

.live-tab.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
}

.live-section-list {
    display: grid;
    gap: 0.85rem;
}

.live-match-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(16, 16, 16, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 18px;
}

.live-match-status {
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.live-status-live {
    background: #b90e1a;
    color: #fff;
}

.live-status-ft {
    background: #444;
    color: #fff;
}

.live-status-upcoming {
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
}

.live-match-teams {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.live-match-vs {
    color: var(--muted);
    font-size: 0.9rem;
}

.team {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.team-name {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-score {
    font-size: 1.1rem;
    color: var(--gold);
}

.live-match-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.live-match-extra {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 0.6rem;
}

.live-match-extra span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.final-score {
    color: var(--gold);
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge {
    font-size: 0.65rem;
    opacity: 0.8;
}

.main-area {
    min-height: calc(100vh - 260px);
}

.main-content-area {
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
    animation: riseIn 0.7s ease-out;
}

.hero .tagline {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--gold);
    font-weight: 700;
}

.hero h2 {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(2rem, 7vw, 5rem);
    margin: 0.5rem 0;
    letter-spacing: 0.04em;
}

.hero h2 span {
    color: var(--red);
}

.countdown {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--gold);
    border-radius: 10px;
    font-weight: 700;
    color: var(--gold);
    background: rgba(0, 0, 0, 0.45);
}

.hero-multiplier {
    margin: 0.9rem 0 0;
    font-size: 1.1rem;
    color: var(--text);
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.35;
    text-wrap: balance;
}

.hero-multiplier strong {
    color: var(--gold);
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.fighter-card {
    background: linear-gradient(160deg, rgba(31, 31, 31, 0.95), rgba(12, 12, 12, 0.95));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(10px);
    opacity: 0;
    animation: riseIn 0.6s ease-out forwards;
    position: relative;
}

.odds-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    background: var(--gold);
    color: #000;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.fighter-card:nth-child(2) {
    animation-delay: 0.12s;
}

.fighter-card.active {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px var(--gold), 0 12px 28px rgba(212, 175, 55, 0.2);
}

.fighter-card h3 {
    margin-top: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 2rem;
    letter-spacing: 0.03em;
}

.bet-panel {
    margin-top: 1.25rem;
    padding: 1.2rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(10, 10, 10, 0.85);
}

.form-grid,
.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--muted);
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid #3c3c3c;
    background: #090909;
    color: var(--text);
    padding: 0.7rem;
    border-radius: 10px;
    outline: none;
}

input:focus {
    border-color: var(--gold);
}

select {
    width: 100%;
    border: 1px solid #3c3c3c;
    background: #090909;
    color: var(--text);
    padding: 0.7rem;
    border-radius: 10px;
    outline: none;
}

select:focus {
    border-color: var(--gold);
}

.btn {
    border: 1px solid var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.12);
}

.btn.danger {
    background: rgba(185, 14, 26, 0.2);
    border-color: var(--red);
    color: #ffd8d8;
}

.btn.ghost {
    border: 1px solid var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    text-decoration: none;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.notice {
    min-height: 1.2rem;
    color: var(--gold);
    margin-top: 0.9rem;
}

.bet-actions-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.bets-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.bets-list.my-bets-list {
    grid-template-columns: 1fr;
}

.bet-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.85rem;
    line-height: 1.45;
}

.bet-status {
    margin-left: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.8rem;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.game-card {
    background: rgba(18, 18, 18, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 16px;
    padding: 1rem 1rem 1.15rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.28);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: center;
}

.game-card-left,
.game-card-right {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.game-card-left {
    min-width: 0;
}

.game-card-right {
    justify-content: center;
}

.game-markets-wrapper {
    grid-column: 1 / -1;
    margin-top: 1rem;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.game-markets {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.game-vs {
    color: var(--muted);
}

.game-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.game-subtitle {
    color: rgba(212, 175, 55, 0.9);
    font-size: 0.85rem;
}

.market-action {
    width: fit-content;
    border: 1px solid rgba(212, 175, 55, 0.4);
    background: transparent;
    color: var(--gold);
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.market-action:hover {
    background: rgba(212, 175, 55, 0.12);
}

.game-market {
    width: 100%;
}

.market-name {
    color: var(--gold);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.market-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 0.75rem;
}

.market-section {
    margin-bottom: 1.5rem;
}

.market-section h4 {
    color: var(--gold);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.market-selections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.bet-option {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 14px;
    padding: 0.9rem 0.85rem;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    min-height: 92px;
    min-width: 96px;
    text-transform: uppercase;
}

.bet-option span {
    font-size: 0.85rem;
    color: var(--muted);
}

.bet-option strong {
    color: var(--gold);
    font-size: 1.3rem;
}

.bet-option:hover {
    transform: translateY(-2px);
    background: rgba(212, 175, 55, 0.16);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.bet-option.selected {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.bet-option.selected strong {
    color: #000;
}

.game-no-market {
    color: var(--muted);
    font-style: italic;
    margin-top: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

.empty-state h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 3;
}

.modal.hidden,
.betdetails-panel.hidden {
    display: none !important;
}

.modal-content {
    width: min(720px, 96vw);
    background: #111;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

.betdetails-panel.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 1100;
}

.betdetails-card {
    width: min(720px, 96vw);
    max-height: min(90vh, 800px);
    overflow-y: auto;
    background: #111;
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 18px;
    padding: 1.25rem;
}

.betdetails-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.betdetails-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gold);
}

.modal-actions {
    margin-top: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auth-page-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-card {
    width: min(560px, 96vw);
    background: rgba(12, 12, 12, 0.92);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
}

.legal-doc {
    width: min(960px, 96vw);
}

.legal-doc h2 {
    margin: 0.4rem 0 0.8rem;
    color: var(--gold);
    font-size: 1.35rem;
}

.legal-doc h3 {
    margin: 0.9rem 0 0.4rem;
    color: var(--gold);
    font-size: 1.05rem;
}

.legal-doc p,
.legal-doc li {
    color: var(--muted);
    line-height: 1.55;
}

.legal-doc ul {
    margin: 0.35rem 0 0.7rem;
    padding-left: 1.1rem;
}

.auth-card h1 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.06em;
    font-size: 2.2rem;
}

.auth-subtext {
    color: var(--muted);
    margin-top: 0.35rem;
}

.auth-card label {
    margin-top: 0.7rem;
}

.auth-actions-row {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auth-switch {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.auth-switch a {
    color: var(--gold);
}

.site-footer {
    margin-top: 2rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.site-footer h4 {
    margin: 0 0 0.55rem;
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.04em;
    color: var(--gold);
    font-size: 1.4rem;
}

.site-footer p {
    margin: 0 0 0.45rem;
    color: var(--muted);
}

.footer-logo {
    width: 150px;
    max-width: 100%;
    margin: 0 0 0.7rem;
    border-radius: 6px;
}

.site-footer a {
    display: block;
    margin: 0 0 0.45rem;
    color: var(--text);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold);
}

.footer-note {
    margin: 0.8rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 0.95rem;
}

.terms-section {
    margin-top: 1.6rem;
    padding: 1.3rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.72);
}

.terms-section h3 {
    margin: 0 0 0.9rem;
    color: var(--gold);
    font-family: "Bebas Neue", sans-serif;
    letter-spacing: 0.04em;
    font-size: 2rem;
}

.terms-section h4 {
    margin: 1rem 0 0.45rem;
    color: var(--gold);
    font-size: 1.1rem;
}

.terms-section p,
.terms-section li {
    color: var(--muted);
    line-height: 1.5;
}

.terms-section ul {
    margin: 0.5rem 0 0.75rem;
    padding-left: 1.1rem;
}

@keyframes riseIn {
    from {
        transform: translateY(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 850px) {
    .cards,
    .form-grid,
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
        padding: 0.9rem 1rem;
    }

    .header-promo {
        white-space: normal;
        width: 100%;
        font-size: 0.92rem;
    }

    .auth-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.55rem;
    }

    .brand-title {
        font-size: 1.65rem;
    }

    .container {
        width: min(1080px, 94vw);
        margin: 1rem auto 2rem;
    }

    .hero .tagline {
        letter-spacing: 0.13em;
    }

    .hero-multiplier {
        font-size: 1rem;
        padding: 0 0.35rem;
    }

    .site-footer {
        padding: 1rem;
    }

    .terms-section {
        padding: 1rem;
    }

    .terms-section h3 {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .bets-list {
        grid-template-columns: 1fr;
    }

    .home-page {
        background-attachment: scroll;
    }

    /* Admin Dashboard Mobile Styles */
    .admin-nav {
        flex-direction: column;
        gap: 0.5rem !important;
        align-items: stretch;
    }

    .admin-nav .btn {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .admin-panel {
        padding: 1rem;
    }

    .admin-panel h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .markets-accordion {
        gap: 0.5rem !important;
    }

    .markets-accordion .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .edit-markets-panel {
        padding: 1rem !important;
    }

    .edit-markets-panel h3 {
        font-size: 1.2rem;
    }

    /* User-side mobile styles */
    .game-markets-wrapper {
        max-height: 300px !important; /* Reduce height on mobile */
    }

    .market-buttons {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on mobile */
        gap: 0.5rem !important;
    }

    .bet-option {
        min-height: 80px !important;
        min-width: 80px !important;
        padding: 0.7rem 0.6rem !important;
    }

    .bet-option span {
        font-size: 0.8rem !important;
    }

    .bet-option strong {
        font-size: 0.9rem !important;
    }

    .game-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .game-meta-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .betslip-card {
        width: 95% !important;
        max-width: 95% !important;
    }

    .betslip-list {
        max-height: 250px !important;
    }
}

@media (max-width: 520px) {
    .market-buttons {
        grid-template-columns: 1fr !important; /* 1 column on very small screens */
    }

    .bet-option {
        min-height: 70px !important;
        padding: 0.6rem 0.5rem !important;
    }

    .game-markets-wrapper {
        max-height: 250px !important;
    }
}

@media (max-width: 520px) {
    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .hero h2 {
        font-size: clamp(1.8rem, 11vw, 2.5rem);
    }

    .header-promo {
        padding: 0.42rem 0.65rem;
        font-size: 0.88rem;
    }

    .countdown {
        width: 100%;
        max-width: 300px;
        text-align: center;
        font-size: 1.05rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .auth-actions .btn,
    .auth-actions #authStatus {
        width: auto;
    }

    .auth-card {
        padding: 1rem;
    }

    .auth-card h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 650px) {
    .topbar {
        padding: 0.25rem 0.25rem 0.35rem;
        gap: 0.2rem;
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .topbar-center {
        order: 0;
        width: auto;
        justify-content: flex-start;
    }

    .topbar-left {
        order: 1;
        width: auto;
        justify-content: flex-start;
        gap: 0.45rem;
        flex-wrap: wrap;
    }

    .topbar-right {
        order: 2;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .brand-logo {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .brand-logo .brand-icon {
        border-radius: 8px;
    }

    .brand-title {
        font-size: 0.9rem;
        letter-spacing: 0.08em;
    }

    .topbar-right {
        gap: 0.35rem;
    }

    .menu-toggle {
        width: 1.85rem;
        height: 1.3rem;
    }

    .profile-section {
        padding: 0.35rem 0.5rem;
        gap: 0.45rem;
    }

    .profile-icon {
        width: 24px;
        height: 24px;
    }

    .profile-balance {
        font-size: 0.78rem;
    }

    .main-area {
        margin-top: 4.35rem;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-content-area {
        padding: 0;
    }

    .home-page-content {
        padding: 0;
        margin: 0;
    }

    .home-page-title {
        font-size: 1.2rem;
        text-align: left;
        margin: 0.2rem 0.45rem 0.4rem;
    }

    .page-header,
    #gamesContainer {
        padding-left: 0;
        padding-right: 0;
        margin: 0;
    }

    .game-list {
        gap: 0.35rem;
        margin: 0;
        padding: 0;
    }

    .game-card {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.55rem 0.55rem 0.6rem;
        border-radius: 10px;
        align-items: stretch;
        margin: 0;
    }

    .game-card-left {
        gap: 0.18rem;
        justify-content: center;
    }

    .game-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.08rem;
    }

    .game-vs {
        display: none;
    }

    .game-title {
        font-size: 0.9rem;
        line-height: 1.08;
    }

    .game-meta-row {
        display: none;
    }

    .game-subtitle {
        display: block;
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.72);
        font-weight: 600;
        margin: 0;
        text-align: left;
    }

    .market-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.45rem !important;
    }

    .game-markets-wrapper {
        grid-column: 1 / -1;
        margin-top: 0.22rem;
        max-height: 270px;
    }

    .market-action {
        width: fit-content;
        border: none;
        background: transparent;
        color: var(--gold);
        font-size: 0.82rem;
        font-weight: 800;
        padding: 0;
        text-transform: none;
        border-radius: 0;
        letter-spacing: 0.02em;
        justify-content: center;
        box-shadow: none;
        align-self: flex-start;
    }

    .market-action:hover {
        background: transparent;
        color: #f0cf68;
    }
}
@media screen and (max-width: 768px) {
    #withdrawPanel {
        position: fixed !important;
        top: 140px !important; /* Forces the entire panel to start BELOW the tall header */
        height: calc(100vh - 140px) !important; /* Prevents the bottom from getting cut off */
        z-index: 999999 !important; /* Forces it above absolutely everything else */
        overflow-y: auto !important; /* Allows the user to scroll if their screen is very small */
    }
}
/* --- FINAL MOBILE UI POLISH --- */
@media screen and (max-width: 768px) {
    /* 1. Push the main page content down so the tall header doesn't cover "Today's Games" */
    .main-area {
        margin-top: 150px !important; 
    }

    /* 2. Center and size the Home Page title nicely */
    .home-page-title {
        font-size: 1.8rem !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
        margin-bottom: 1rem !important;
    }

    /* 3. Stop long team names from truncating/chopping off! Let them wrap to the next line */
    .team-name, 
    .game-title, 
    .live-match-extra span {
        white-space: normal !important; 
        overflow: visible !important;
        word-wrap: break-word !important;
        line-height: 1.3 !important;
    }

    /* 4. Give the game cards a bit more breathing room so the newly wrapped text fits nicely */
    .game-card, 
    .live-match-card {
        padding: 0.85rem !important; 
        gap: 0.5rem !important;
    }
}

/* --- AVIATOR --- */
.aviator-page {
    background:
        radial-gradient(circle at 20% 8%, rgba(166, 83, 255, 0.2), transparent 40%),
        radial-gradient(circle at 85% 0%, rgba(52, 255, 145, 0.11), transparent 35%),
        #08090d;
    height: 100svh;
    overflow: hidden;
}

.aviator-topbar {
    border-bottom-color: rgba(124, 92, 255, 0.35);
}

.aviator-topbar .brand {
    min-width: 0;
}

.aviator-top-actions {
    margin-left: auto;
    justify-content: flex-end;
    min-width: 0;
}

.aviator-balance {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f6d469;
    white-space: nowrap;
}

.compact-topbar {
    min-height: 50px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.aviator-top-actions .btn {
    border-radius: 999px;
}

.aviator-shell {
    margin-top: 4rem;
    width: min(1200px, 97vw);
    height: calc(100svh - 4.35rem);
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    overflow: hidden;
}

.aviator-tournament-strip {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(90deg, #46305f 0%, #1d3232 100%);
    border: 1px solid rgba(137, 113, 255, 0.3);
    border-radius: 14px;
    padding: 0.42rem 0.6rem;
}

.tourney-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    border: 1px solid rgba(140, 255, 168, 0.35);
    font-size: 0.78rem;
    font-weight: 700;
}

.tourney-live-pill .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #47f08a;
    box-shadow: 0 0 8px rgba(71, 240, 138, 0.8);
}

.tourney-title {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.02em;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tourney-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-decoration: none;
    color: #111;
    background: linear-gradient(180deg, #ffd84d, #f4b700);
    font-weight: 900;
}

.aviator-history-wrap,
.aviator-game-wrap,
.aviator-controls-wrap {
    background: #10141d;
    border: 1px solid rgba(113, 132, 184, 0.22);
    border-radius: 14px;
    padding: 0.5rem;
    min-height: 0;
}

.compact-history {
    padding-top: 0.38rem;
    padding-bottom: 0.42rem;
    min-height: 2.15rem;
    display: flex;
    align-items: center;
}

.aviator-history {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
    font-size: 0.84rem;
    line-height: 1.1;
    white-space: nowrap;
}

.aviator-history-item {
    min-width: auto;
    padding: 0;
    border-radius: 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: transparent;
}

.aviator-history-item.history-low {
    color: #8cb4ff;
}

.aviator-history-item.history-purple {
    color: #b780ff;
}

.aviator-history-item.history-gold {
    color: #f6d469;
}

.aviator-status-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.overlay-status {
    font-size: 0.84rem;
}

.aviator-status-pill,
.aviator-countdown {
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    border: 1px solid rgba(140, 178, 255, 0.28);
    background: rgba(0, 0, 0, 0.36);
    font-weight: 700;
}

.aviator-countdown {
    display: none;
}

.aviator-stage {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(145, 101, 255, 0.35);
    min-height: 0;
}

#aviatorCanvas {
    width: 100%;
    height: clamp(145px, 26svh, 285px);
    display: block;
}

.aviator-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(151, 82, 255, 0.28), transparent 26%),
        radial-gradient(circle at 25% 42%, rgba(255, 40, 90, 0.12), transparent 24%),
        linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.24) 100%);
    pointer-events: none;
}

.aviator-bet-now-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: radial-gradient(circle, rgba(10, 12, 22, 0.22) 0%, rgba(10, 12, 22, 0.46) 100%);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.aviator-bet-now-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.bet-now-logo {
    width: clamp(58px, 8vw, 90px);
    height: auto;
    filter: drop-shadow(0 0 12px rgba(255, 215, 68, 0.35));
}

.bet-now-title {
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(1.3rem, 4vw, 2.2rem);
    letter-spacing: 0.07em;
    color: #ffd74f;
    text-shadow: 0 0 12px rgba(255, 215, 79, 0.35);
}

.bet-now-counter {
    min-width: 54px;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 217, 95, 0.52);
    background: rgba(0, 0, 0, 0.45);
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(0.82rem, 2.1vw, 1.05rem);
    font-weight: 700;
    color: #ffe37f;
    letter-spacing: 0.05em;
    text-align: center;
    box-shadow: 0 0 14px rgba(255, 210, 84, 0.25);
}

.aviator-bet-now-overlay.bet-window .bet-now-logo {
    display: none;
}

.aviator-bet-now-overlay.bet-window .bet-now-counter {
    min-width: 110px;
    padding: 0.28rem 0.95rem;
    font-size: clamp(1.1rem, 3.1vw, 1.55rem);
    border-color: rgba(255, 221, 122, 0.8);
    box-shadow: 0 0 24px rgba(255, 210, 84, 0.4);
}

@media (min-width: 651px) {
    .bet-now-logo {
        display: none;
    }

    .bet-now-counter {
        min-width: 96px;
        padding: 0.3rem 0.9rem;
        font-size: clamp(1.05rem, 1.7vw, 1.45rem);
        letter-spacing: 0.06em;
        border-color: rgba(255, 221, 122, 0.72);
        box-shadow: 0 0 22px rgba(255, 210, 84, 0.35);
    }
}

.aviator-bet-toast {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translate(-50%, -8px);
    z-index: 5;
    padding: 0.42rem 0.9rem;
    border-radius: 999px;
    font-family: "Rajdhani", sans-serif;
    font-size: 0.83rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    border: 1px solid transparent;
}

.aviator-bet-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.aviator-bet-toast.is-success {
    color: #081116;
    background: rgba(123, 247, 197, 0.94);
    border-color: rgba(160, 255, 224, 0.95);
}

.aviator-bet-toast.is-info {
    color: #0b1231;
    background: rgba(176, 214, 255, 0.94);
    border-color: rgba(198, 227, 255, 0.95);
}

.aviator-bet-toast.is-error {
    color: #2b0408;
    background: rgba(255, 142, 142, 0.95);
    border-color: rgba(255, 170, 170, 0.95);
}

.aviator-multiplier {
    position: absolute;
    top: 44%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Bebas Neue", sans-serif;
    font-size: clamp(3.4rem, 8vw, 5.9rem);
    letter-spacing: 0.03em;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.28);
    will-change: transform, filter, text-shadow;
}

.aviator-multiplier.multiplier-live {
    animation: multiplierGlow 2s ease-in-out infinite;
}

.aviator-bets-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.aviator-bet-card {
    border-radius: 12px;
    border: 1px solid rgba(132, 149, 195, 0.22);
    background: linear-gradient(180deg, #161b25 0%, #0f131a 100%);
    padding: 0.45rem;
    display: grid;
    gap: 0.4rem;
}

.bet-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(3, 6, 12, 0.75);
    border: 1px solid rgba(132, 149, 195, 0.2);
    border-radius: 999px;
    padding: 0.2rem;
}

.mode-tab {
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #8f9ebf;
    font-weight: 700;
    padding: 0.28rem 0.2rem;
}

.mode-tab.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.bet-stake-row {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 0.45rem;
    align-items: center;
}

.stake-adjust {
    border: 1px solid rgba(142, 153, 176, 0.35);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    background: rgba(5, 8, 14, 0.7);
    color: #dce4ff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.stake-main-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(137, 158, 200, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    padding: 0.3rem 0.7rem;
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    text-align: center;
}

.quick-stakes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
}

.chip-btn {
    border: none;
    border-radius: 999px;
    padding: 0.25rem 0.15rem;
    background: #0a0f18;
    color: #9eb3dd;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

.aviator-action-btn,
.aviator-cashout-btn {
    border: none;
    border-radius: 12px;
    width: 100%;
    min-height: clamp(60px, 8.8vh, 78px);
    padding: 0.25rem 0.7rem;
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(1.05rem, 2.2vw, 1.7rem);
    font-weight: 700;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
    letter-spacing: -0.01em;
    line-height: 1.06;
}

.aviator-action-btn {
    background: linear-gradient(180deg, #ffd54d 0%, #e4ac07 100%);
    color: #2e1a00;
    box-shadow: 0 10px 25px rgba(228, 172, 7, 0.36);
}

.aviator-action-btn.bet-locked {
    background: linear-gradient(180deg, #cf1c3c 0%, #8f0f27 100%);
    color: #fff3f5;
    box-shadow: 0 10px 25px rgba(207, 28, 60, 0.38);
}

.aviator-action-btn:disabled {
    opacity: 0.55;
    filter: grayscale(0.15);
}

.aviator-cashout-btn {
    background: linear-gradient(180deg, #ffb347 0%, #ff7a18 100%);
    color: #2b1300;
    box-shadow: 0 10px 25px rgba(255, 122, 24, 0.35);
    white-space: nowrap;
}

.aviator-cashout-btn.cashout-live {
    animation: cashoutPulse 1.15s ease-in-out infinite;
}

.aviator-cashout-btn:disabled {
    opacity: 0.5;
}

.stake-preview {
    font-size: 0.56em;
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.aviator-bet-status {
    margin: 0.05rem 0 0;
    min-height: 1rem;
    color: #9eacd0;
    font-size: 0.78rem;
}

@keyframes cashoutPulse {
    0%, 100% {
        transform: translateY(0);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-1px);
        filter: brightness(1.12);
    }
}

@keyframes multiplierGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        text-shadow: 0 0 28px rgba(255, 255, 255, 0.28), 0 0 48px rgba(193, 116, 255, 0.22);
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.08));
    }
    50% {
        transform: translate(-50%, -50%) scale(1.025);
        text-shadow: 0 0 36px rgba(255, 255, 255, 0.34), 0 0 60px rgba(193, 116, 255, 0.34);
        filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.15));
    }
}

/* --- CASHOUT TICKER --- */
.cashout-ticker {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.cashout-ticker-fade {
    position: absolute;
    top: 0;
    height: 100%;
    width: 40px;
    pointer-events: none;
    z-index: 3;
}

.cashout-ticker-fade-left {
    left: 0;
    background: linear-gradient(90deg, rgba(16, 20, 29, 0.95) 0%, transparent 100%);
}

.cashout-ticker-fade-right {
    right: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(16, 20, 29, 0.95) 100%);
}

.cashout-ticker-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cashout-ticker-track {
    display: flex;
    height: 100%;
    white-space: nowrap;
    will-change: transform;
    animation: tickerScroll linear infinite;
}

@keyframes tickerScroll {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

.cashout-ticker-entry {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    height: 100%;
    border-right: 1px solid rgba(140, 170, 255, 0.15);
    font-size: 0.88rem;
    font-family: "Rajdhani", monospace;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
}

.cashout-ticker-entry:last-child {
    border-right: none;
}

.cashout-ticker-phone {
    color: #7de2ff;
    letter-spacing: 0.05em;
}

.cashout-ticker-separator {
    color: rgba(255, 255, 255, 0.4);
}

.cashout-ticker-amount {
    color: #ffd54d;
    font-weight: 700;
}

.cashout-ticker-currency {
    color: #47f08a;
    font-size: 0.8rem;
}

@media (max-width: 650px) {
    .cashout-ticker {
        height: 26px;
    }

    .cashout-ticker-entry {
        padding: 0 20px;
        gap: 10px;
        font-size: 0.78rem;
    }

    .cashout-ticker-fade {
        width: 30px;
    }

    .cashout-ticker-fade-left {
        background: linear-gradient(90deg, rgba(10, 14, 22, 0.95) 0%, transparent 100%);
    }

    .cashout-ticker-fade-right {
        background: linear-gradient(90deg, transparent 0%, rgba(10, 14, 22, 0.95) 100%);
    }
}

@media (max-width: 650px) and (max-height: 700px) {
    .cashout-ticker {
        height: 24px;
    }

    .cashout-ticker-entry {
        padding: 0 16px;
        gap: 8px;
        font-size: 0.72rem;
    }

    .cashout-ticker-currency {
        font-size: 0.7rem;
    }
}

@media (max-width: 920px) {
    .aviator-shell {
        width: min(1180px, 99vw);
        margin-top: 3.8rem;
        height: auto;
        min-height: calc(100svh - 4.1rem);
        grid-template-rows: auto auto auto auto;
        overflow: visible;
    }

    #aviatorCanvas {
        height: clamp(140px, 24svh, 220px);
    }

    .aviator-multiplier {
        font-size: clamp(2.8rem, 10vw, 4.6rem);
    }
}

@media (max-width: 650px) {
    .aviator-page {
        height: 100svh;
        min-height: 100svh;
        overflow: hidden;
    }

    .aviator-topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding: 0.28rem 0.45rem 0.35rem;
        gap: 0.35rem;
    }

    .aviator-topbar .brand {
        min-width: 0;
        gap: 0.35rem;
    }

    .aviator-topbar .brand .brand-icon {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }

    .aviator-topbar .brand-title {
        font-size: 0.78rem;
        letter-spacing: 0.06em;
        white-space: nowrap;
        max-width: 34vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .aviator-top-actions {
        gap: 0.25rem;
        flex-wrap: nowrap;
        margin-left: auto;
        justify-content: flex-end;
        min-width: 0;
    }

    .aviator-balance {
        font-size: 0.77rem;
        max-width: 46vw;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: right;
    }

    .aviator-top-actions .btn {
        padding: 0.28rem 0.5rem;
        font-size: 0.72rem;
    }

    .aviator-shell {
        margin-top: 3.35rem;
        height: calc(100svh - 3.55rem);
        min-height: 0;
        gap: 0.35rem;
        overflow: hidden;
    }

    .aviator-history-wrap,
    .aviator-game-wrap,
    .aviator-controls-wrap {
        padding: 0.38rem;
    }

    .compact-history {
        min-height: 1.9rem;
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }

    .aviator-history {
        gap: 0.45rem;
        padding-bottom: 0;
        line-height: 1.05;
    }

    .aviator-bets-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .aviator-bet-card {
        padding: 0.34rem;
        gap: 0.3rem;
    }

    .bet-mode-tabs {
        padding: 0.16rem;
    }

    .mode-tab {
        padding: 0.2rem 0.14rem;
        font-size: 0.84rem;
    }

    .bet-stake-row {
        grid-template-columns: 30px 1fr 30px;
        gap: 0.28rem;
    }

    .stake-adjust {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .stake-main-input {
        padding: 0.24rem 0.55rem;
        font-size: clamp(0.92rem, 3.7vw, 1.05rem);
    }

    .quick-stakes {
        gap: 0.22rem;
    }

    .chip-btn {
        padding: 0.18rem 0.1rem;
        font-size: 0.74rem;
    }

    .aviator-action-btn,
    .aviator-cashout-btn {
        min-height: 52px;
        padding: 0.16rem 0.45rem;
        font-size: clamp(0.9rem, 3.8vw, 1.06rem);
    }

    .stake-preview {
        font-size: 0.48em;
    }

    .aviator-bet-status {
        min-height: 0.82rem;
        font-size: 0.67rem;
    }

    .aviator-tournament-strip {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.35rem;
        padding: 0.28rem 0.4rem;
    }

    .tourney-live-pill {
        gap: 0.2rem;
        padding: 0.2rem 0.38rem;
        font-size: 0.65rem;
    }

    .tourney-live-pill .dot {
        width: 7px;
        height: 7px;
    }

    .tourney-arrow {
        width: 25px;
        height: 25px;
        font-size: 0.85rem;
    }

    #aviatorCanvas {
        height: clamp(112px, 17svh, 150px);
    }

    .aviator-status-row {
        align-items: center;
    }

    .tourney-title {
        font-size: 0.68rem;
        letter-spacing: 0.01em;
    }

    .aviator-multiplier {
        font-size: clamp(1.45rem, 6.9vw, 2.2rem);
    }

    .aviator-top-actions .btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.78rem;
    }

    .aviator-balance {
        font-size: 0.78rem;
    }
}

@media (max-width: 650px) and (max-height: 700px) {
    .aviator-topbar {
        padding: 0.2rem 0.4rem 0.28rem;
    }

    .aviator-shell {
        margin-top: 3.1rem;
        height: calc(100svh - 3.25rem);
        gap: 0.28rem;
    }

    .aviator-history-wrap,
    .aviator-game-wrap,
    .aviator-controls-wrap {
        padding: 0.3rem;
        border-radius: 10px;
    }

    .compact-history {
        min-height: 1.7rem;
        padding-top: 0.18rem;
        padding-bottom: 0.18rem;
    }

    .aviator-history {
        gap: 0.45rem;
        font-size: 0.74rem;
        padding-bottom: 0;
        line-height: 1.02;
    }

    .aviator-status-pill,
    .aviator-countdown {
        padding: 0.18rem 0.48rem;
        font-size: 0.74rem;
    }

    #aviatorCanvas {
        height: clamp(92px, 14svh, 112px);
    }

    .aviator-multiplier {
        font-size: clamp(1.2rem, 6vw, 1.65rem);
    }

    .aviator-bets-grid {
        gap: 0.34rem;
    }

    .aviator-bet-card {
        padding: 0.26rem;
        gap: 0.22rem;
    }

    .bet-mode-tabs {
        padding: 0.12rem;
    }

    .mode-tab {
        padding: 0.16rem 0.12rem;
        font-size: 0.77rem;
    }

    .bet-stake-row {
        grid-template-columns: 26px 1fr 26px;
        gap: 0.2rem;
    }

    .stake-adjust {
        width: 26px;
        height: 26px;
        font-size: 0.9rem;
    }

    .stake-main-input {
        padding: 0.16rem 0.45rem;
        font-size: clamp(0.84rem, 3.4vw, 0.95rem);
    }

    .quick-stakes {
        gap: 0.16rem;
    }

    .chip-btn {
        padding: 0.14rem 0.08rem;
        font-size: 0.66rem;
    }

    .aviator-action-btn,
    .aviator-cashout-btn {
        min-height: 44px;
        padding: 0.1rem 0.35rem;
        font-size: clamp(0.78rem, 3.4vw, 0.9rem);
    }

    .stake-preview {
        font-size: 0.44em;
    }

    .aviator-bet-status {
        min-height: 0.72rem;
        font-size: 0.62rem;
    }
}
