
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --bg-input: #2a2a2a;
    --gold-primary: #d4a843;
    --gold-light: #f0d78c;
    --gold-dark: #b8922e;
    --gold-gradient: linear-gradient(135deg, #d4a843 0%, #f0d78c 50%, #d4a843 100%);
    --gold-gradient-dark: linear-gradient(135deg, #b8922e 0%, #d4a843 100%);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --danger: #ff4444;
    --success: #00c853;
    --warning: #ff9100;
    --info: #2196f3;
    --border-color: #2a2a2a;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-gold: 0 4px 20px rgba(212,168,67,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 80px;
}

/* Header */
.app-header {
    background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--gold-primary);
}

.logo i {
    font-size: 20px;
    color: var(--gold-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.credit-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(212,168,67,0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-light);
    border: 1px solid rgba(212,168,67,0.3);
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 56px;
    right: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    min-width: 220px;
    z-index: 200;
    display: none;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
}

.dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(212,168,67,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 14px;
    flex-shrink: 0;
}

.dropdown-logout {
    color: var(--danger);
    border-top: 1px solid var(--border-color);
}

.dropdown-logout .logout-icon {
    background: rgba(255,68,68,0.15);
    color: var(--danger);
}

/* Hero Section */
.hero-section {
    padding: 20px 16px 16px;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(100deg, rgba(17,17,17,0.92) 0%, rgba(17,17,17,0.75) 35%, rgba(17,17,17,0.4) 60%, rgba(17,17,17,0.1) 100%);
}

.hero-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    text-align: left;
    max-width: 55%;
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
    color: var(--text-primary);
}

.hero-highlight {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 6px;
}

.hero-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 180px;
}

.btn-hero-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #c9a43a 0%, #e8c96a 50%, #c9a43a 100%);
    color: #111;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(212,168,67,0.3);
}

.btn-hero-primary i {
    font-size: 18px;
    flex-shrink: 0;
}

.btn-hero-primary small {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.8;
}

.btn-hero-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(60,60,60,0.6);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--gold-primary);
    backdrop-filter: blur(4px);
}

.btn-hero-secondary i {
    font-size: 16px;
    flex-shrink: 0;
    color: var(--gold-primary);
}

.btn-hero-secondary small {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.7;
}

.btn {
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #111;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212,168,67,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.btn-outline:hover {
    background: rgba(212,168,67,0.1);
}

.btn-danger {
    background: linear-gradient(135deg, #EF5350, #C62828);
    color: #fff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #E53935, #B71C1C);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
    margin: 0 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.feature-item {
    text-align: center;
    padding: 10px 4px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212,168,67,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    color: var(--gold-primary);
    font-size: 16px;
    border: 1px solid rgba(212,168,67,0.2);
}

.feature-label {
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 500;
}

.feature-sublabel {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-link {
    font-size: 13px;
    color: var(--gold-primary);
    text-decoration: none;
    padding: 8px 4px;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

/* Lottery Cards */
.lottery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 24px;
    align-items: stretch;
    justify-content: center;
}

.lottery-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 0 0;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.lottery-card:hover {
    color: var(--text-primary);
}

.lottery-card .lottery-name {
    color: var(--text-primary);
}

.lottery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    z-index: 2;
}

.lottery-bg {
    position: absolute;
    right: 0;
    bottom: 45px;
    width: 70px;
    height: 90px;
    z-index: 0;
    opacity: 0.5;
}

.lottery-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom right;
}

.lottery-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

.lottery-flag {
    font-size: 24px;
}

.lottery-flag-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.lottery-name {
    font-size: 14px;
    font-weight: 600;
}

.lottery-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    padding: 0 14px;
    position: relative;
    z-index: 1;
}

.lottery-schedule {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: #cd5c5c;
    margin-bottom: 8px;
    padding: 0 14px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.lottery-schedule span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.lottery-schedule i {
    font-size: 10px;
}

.lottery-countdown {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 10px;
    padding: 0 8px;
}

.countdown-item {
    background: var(--bg-primary);
    padding: 6px 0;
    border-radius: var(--radius-sm);
    text-align: center;
    flex: 1;
    min-width: 0;
}

.countdown-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold-primary);
    display: block;
}

.countdown-label {
    font-size: 10px;
    color: var(--text-muted);
}

.lottery-countdown.countdown-danger .countdown-value {
    color: var(--danger);
}

.lottery-btn {
    width: 100%;
    padding: 10px;
    background: var(--gold-gradient);
    color: #111;
    border: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Promo Banner */
.promo-banner {
    margin: 0 12px 24px;
    background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
    border-radius: var(--radius-md);
    padding: 0;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.promo-bg {
    position: absolute;
    right: 0;
    top: 0;
    width: 70%;
    height: 100%;
    z-index: 0;
}

.promo-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top right;
}

.promo-content {
    position: relative;
    z-index: 1;
    padding: 20px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 180px;
}

.promo-text-wrap {
    flex: 1;
    max-width: 55%;
}

.promo-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.promo-percent {
    font-size: 42px;
    font-weight: 700;
    color: var(--gold-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.promo-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.btn-promo {
    display: inline-block;
    padding: 8px 16px;
    background: var(--gold-gradient);
    color: #111;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    border: none;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

.promo-coin {
    position: absolute;
    color: var(--gold-primary);
    font-size: 18px;
    opacity: 0.5;
    z-index: 2;
}

.promo-coin.coin-1 {
    bottom: 20px;
    left: 20px;
}

.promo-coin.coin-2 {
    top: 15px;
    right: 45%;
    font-size: 14px;
}

/* Login/Register Pages */
.auth-page {
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
    padding: 0;
    min-height: 100vh;
}

.app-container.no-nav {
    padding-bottom: 0;
}

.auth-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 56px;
}

.auth-header .back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-primary);
    font-size: 20px;
    text-decoration: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-header h1 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 24px;
    margin: 0 12px 12px;
}

.auth-form {
    padding: 24px 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.input-group .form-input {
    padding-left: 44px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--gold-primary);
    border-color: var(--gold-primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #111;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-group label {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.checkbox-group a {
    color: var(--gold-primary);
    text-decoration: none;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--gold-primary);
    text-decoration: none;
    font-weight: 600;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.btn-line {
    background: #06c755;
    color: white;
    width: 100%;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, #181818 0%, #0d0d0d 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    z-index: 100;
    overflow: visible;
}

.bottom-nav::after {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    min-height: 58px;
    transition: color 0.25s;
    flex: 1;
    position: relative;
    z-index: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item:last-child {
    border-right: none;
}

.nav-item.active {
    color: var(--gold-primary);
}

.nav-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #aaa;
    font-size: 18px;
    transition: all 0.25s;
}

.nav-item.active .nav-icon-wrap {
    background: linear-gradient(135deg, #f5d76e 0%, #c49a1f 100%);
    color: #111;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}

.nav-item-center {
    flex: 0 0 78px;
    border-right: none;
    justify-content: flex-end;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.nav-item-center::before {
    content: '';
    position: absolute;
    top: -36px;
    left: 50%;
    transform: translateX(-50%);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.45) 0%, rgba(212, 175, 55, 0.1) 45%, transparent 70%);
    filter: blur(6px);
    z-index: 0;
    pointer-events: none;
}

.nav-center-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #f9e49a 0%, #e8c548 40%, #b88a1f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 26px;
    border: 4px solid #111;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.55), 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 18px rgba(212, 175, 55, 0.45);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    margin-top: -32px;
}

.nav-active-indicator {
    width: 22px;
    height: 3px;
    border-radius: 3px;
    background: var(--gold-primary);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.25s;
}

.nav-item-center.active .nav-active-indicator {
    opacity: 1;
}

.nav-item-center span:last-child {
    margin-top: 2px;
}

/* Lottery Play Page */
.lottery-play-header {
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.lottery-play-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.lottery-play-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lottery-play-title .flag {
    font-size: 28px;
}

.lottery-play-title .name {
    font-size: 16px;
    font-weight: 600;
}

.lottery-play-title .date {
    font-size: 12px;
    color: var(--text-secondary);
}

.lottery-draw-select .lottery-select-trigger {
    border: 1px solid var(--gold-primary) !important;
}

.lottery-draw-select .lottery-select-dropdown {
    border: 1px solid var(--border-color);
}

.lottery-draw-select .lottery-select-option:hover {
    background: var(--bg-card-hover);
}

.lottery-draw-select .lottery-select-option + .lottery-select-option {
    border-top: 1px solid var(--border-color);
}

.countdown-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.countdown-large .label {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

.countdown-large .time {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.time-box {
    background: var(--bg-card);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-align: center;
    min-width: 50px;
    border: 1px solid var(--border-color);
}

.time-box .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-primary);
}

.time-box .unit {
    font-size: 10px;
    color: var(--text-muted);
}

/* Rate Bar */
.rate-bar {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rate-bar::-webkit-scrollbar {
    display: none;
}

.rate-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(212, 175, 55, 0.15);
    min-width: 68px;
    text-align: center;
}

.rate-item .rate-icon {
    display: none;
}

.rate-item .rate-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.rate-item .rate-label {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

.rate-item .rate-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-primary);
    white-space: nowrap;
}

/* Bet Type Tabs */
.bet-type-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.bet-type-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.bet-type-tab {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    text-align: center;
}

.bet-type-tab.active {
    background: var(--gold-gradient);
    color: #111;
    border-color: var(--gold-primary);
    font-weight: 600;
}

.bet-type-tab {
    position: relative;
}

.tab-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef5350;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1;
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 3;
}

.bet-type-tab.active .tab-count {
    background: #c62828;
    color: #fff;
}

.countdown-large.countdown-closed .label,
.countdown-large.countdown-closed .unit {
    color: #4CAF50;
}

.countdown-large.countdown-closed .value {
    color: #4CAF50;
}

.countdown-large.countdown-urgent .label,
.countdown-large.countdown-urgent .unit {
    color: #ef5350;
}

.countdown-large.countdown-urgent .value {
    color: #ef5350;
}

.countdown-large.countdown-urgent .time-box {
    border-color: rgba(239, 83, 80, 0.4);
    background: rgba(239, 83, 80, 0.08);
}

.countdown-large.countdown-closed .time-box {
    border-color: rgba(76, 175, 80, 0.4);
    background: rgba(76, 175, 80, 0.08);
}

.countdown-large .time-separator {
    color: var(--gold-primary);
    font-size: 20px;
}

.countdown-large.countdown-closed .time-separator {
    color: #4CAF50;
}

.countdown-large.countdown-urgent .time-separator {
    color: #ef5350;
}

/* Games Hub */
.games-page {
    padding: 16px;
    padding-bottom: 100px;
}

.games-header {
    margin-bottom: 16px;
}

.games-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.games-sparkle {
    color: var(--gold-primary);
    font-size: 18px;
}

.games-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.game-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.game-tabs::-webkit-scrollbar {
    display: none;
}

.game-tab {
    flex: 1;
    min-width: 72px;
    text-align: center;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    background: #1E1E1E;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.game-tab .tab-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.game-tab i {
    color: #fff;
    font-size: 12px;
}

.game-tab.active {
    background: linear-gradient(90deg, #D4A82B, #B88A1F);
    color: #111;
    border-color: transparent;
}

.game-tab.active .tab-icon {
    background: rgba(0, 0, 0, 0.15);
}

.game-tab.active i {
    color: #111;
}

.lottery-game-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.lottery-game-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #151515;
    background-size: 100% 58%;
    background-position: center top;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    min-height: 260px;
}

.lottery-game-card.thai {
    border-color: rgba(212, 168, 43, 0.45);
    box-shadow: 0 0 0 1px rgba(212, 168, 43, 0.45), 0 4px 20px rgba(0, 0, 0, 0.35);
}

.lottery-game-card.lao {
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.45), 0 4px 20px rgba(0, 0, 0, 0.35);
}

.lottery-game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.lottery-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 58%;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 55%, rgba(21,21,21,0.92) 100%);
    z-index: 0;
}

.lottery-game-card.thai .lottery-card-bg {
    background: linear-gradient(180deg, rgba(212,168,43,0.1) 0%, rgba(0,0,0,0.15) 55%, rgba(21,21,21,0.92) 100%);
}

.lottery-game-card.lao .lottery-card-bg {
    background: linear-gradient(180deg, rgba(139,92,246,0.1) 0%, rgba(0,0,0,0.15) 55%, rgba(21,21,21,0.92) 100%);
}

.lottery-card-content {
    position: relative;
    padding: 14px;
    flex: 1;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lottery-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.lottery-flag-wrap {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lottery-flag {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.lottery-favorite {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
    transition: all 0.2s;
}

.lottery-favorite.active {
    color: #EF5350;
    border-color: rgba(239, 83, 80, 0.5);
    background: rgba(239, 83, 80, 0.15);
}

.lottery-favorite:active {
    transform: scale(0.92);
}

.lottery-bottom {
    margin-top: auto;
    padding-top: 8px;
}

.lottery-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.lottery-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.lottery-link {
    background: transparent;
    border: none;
    padding: 0;
    font-family: 'Kanit', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lottery-link.rules {
    color: var(--gold-primary);
    font-weight: 500;
}

.lottery-game-card.lao .lottery-link.rules {
    color: #A78BFA;
}

.lottery-link i {
    font-size: 10px;
}

.lottery-date-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lottery-date-box i {
    font-size: 16px;
    color: var(--gold-primary);
}

.lottery-game-card.lao .lottery-date-box i {
    color: #A78BFA;
}

.lottery-date {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.lottery-date-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.lottery-card-footer {
    padding: 0 14px 14px;
    position: relative;
    z-index: 1;
    background: #151515;
}

.lottery-bet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
}

.lottery-bet-btn:active {
    transform: scale(0.98);
}

.lottery-bet-btn.gold {
    background: linear-gradient(90deg, #E8C96A, #C79A2A);
    box-shadow: 0 4px 16px rgba(212, 168, 43, 0.35);
}

.lottery-bet-btn.purple {
    background: linear-gradient(90deg, #A78BFA, #7C3AED);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.lottery-bet-btn.disabled {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: not-allowed;
}

.game-modal-box {
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    background: #1c1c1c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.rate-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rate-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #111;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.rate-modal-value {
    color: #4CAF50;
    font-weight: 700;
}

.rules-modal-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 4px;
}

.game-modal-close {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #EF4444;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.game-modal-close:active {
    opacity: 0.9;
}

/* Deposit Page */
.deposit-page {
    padding: 16px;
    padding-bottom: 100px;
}

.deposit-section {
    margin-bottom: 20px;
}

.deposit-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.deposit-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 14px;
}

.deposit-send-icon {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.25);
    color: #FF6B6B;
}

.deposit-history-icon {
    background: rgba(100, 181, 246, 0.12);
    border-color: rgba(100, 181, 246, 0.25);
    color: #64B5F6;
}

.deposit-bank-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}

.deposit-bank-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.deposit-bank-card {
    background: linear-gradient(135deg, rgba(28, 28, 28, 0.98), rgba(16, 16, 16, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 24px;
    padding: 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.deposit-bank-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.deposit-bank-head-info {
    flex: 1;
    min-width: 0;
}

.deposit-bank-account-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.deposit-bank-name {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.deposit-bank-verified {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #2ecc71;
    white-space: nowrap;
}

.deposit-bank-verified i {
    font-size: 14px;
}

.deposit-bank-number-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    margin-bottom: 12px;
}

.deposit-bank-number-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.deposit-bank-number-label i {
    color: var(--gold-primary);
    font-size: 11px;
}

.deposit-bank-number-value {
    font-family: 'Kanit', monospace;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.deposit-bank-owner-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.deposit-bank-owner-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.deposit-bank-owner-info {
    flex: 1;
    min-width: 0;
}

.deposit-bank-owner-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2px;
}

.deposit-bank-owner-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.deposit-bank-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(212, 168, 43, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.deposit-bank-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.deposit-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(90deg, #E8C96A, #C79A2A);
    color: #111;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(212, 168, 43, 0.25);
}

.deposit-copy-btn:active {
    transform: scale(0.97);
}

.deposit-copy-btn.copied {
    background: linear-gradient(90deg, #66BB6A, #43A047);
    color: #fff;
}

.deposit-empty-bank {
    text-align: center;
    padding: 32px 24px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.deposit-empty-bank i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    color: var(--gold-primary);
    opacity: 0.5;
}

.deposit-empty-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
}

.deposit-empty-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.deposit-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.deposit-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Kanit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.deposit-tab i {
    font-size: 14px;
}

.deposit-tab-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    transition: all 0.2s;
}

.deposit-tab.active .deposit-tab-img {
    filter: none;
}

.deposit-tab.active {
    background: linear-gradient(90deg, #D4A82B, #B88A1F);
    color: #111;
    box-shadow: 0 4px 12px rgba(212, 168, 43, 0.25);
}

.deposit-tab-content {
    display: none;
}

.deposit-tab-content.active {
    display: block;
}

.deposit-amount-box {
    margin-bottom: 16px;
}

.deposit-amount-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    font-weight: 500;
}

.deposit-amount-label i {
    color: var(--gold-primary);
    font-size: 14px;
}

.deposit-amount-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
}

.deposit-amount-hint i {
    color: var(--gold-primary);
    font-size: 11px;
}

.deposit-amount-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
}

.deposit-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    outline: none;
}

.deposit-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.deposit-amount-unit {
    font-size: 14px;
    color: var(--gold-primary);
    font-weight: 600;
}

.deposit-amount-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
}

.deposit-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

.deposit-upload-area:hover {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.6);
}

.deposit-upload-area.has-preview {
    padding: 12px;
    min-height: auto;
}

.deposit-upload-area.has-preview .deposit-upload-icon,
.deposit-upload-area.has-preview .deposit-upload-title,
.deposit-upload-area.has-preview .deposit-upload-desc {
    display: none;
}

.deposit-upload-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 24px;
    margin-bottom: 4px;
}

.deposit-upload-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.deposit-upload-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.deposit-upload-preview {
    display: none;
    width: 100%;
    max-height: 220px;
    border-radius: 12px;
    overflow: hidden;
}

.deposit-upload-area.has-preview .deposit-upload-preview {
    display: block;
}

.deposit-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 220px;
}

.deposit-upload-filename {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    min-height: 18px;
}

.deposit-upload-btn {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(90deg, #E8C96A, #C79A2A);
    color: #111;
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(212, 168, 43, 0.3);
}

.deposit-upload-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.deposit-upload-btn:active {
    transform: scale(0.98);
}

.deposit-coming-soon {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
}

.deposit-coming-soon i {
    display: block;
    font-size: 36px;
    color: var(--gold-primary);
    margin-bottom: 10px;
    opacity: 0.6;
}

.deposit-coming-soon-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
    font-weight: 400;
}

.deposit-history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.deposit-history-empty i {
    color: var(--gold-primary);
    opacity: 0.6;
}

.deposit-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deposit-history-item {
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.98), rgba(18, 18, 18, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.deposit-history-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.deposit-history-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.08));
    border: 1px solid rgba(212, 175, 55, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(212, 168, 43, 0.15);
}

.deposit-history-content {
    flex: 1;
    min-width: 0;
}

.deposit-history-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.deposit-history-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.deposit-history-date {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.deposit-history-source {
    padding: 3px 8px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--gold-primary);
}

.deposit-history-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.deposit-history-status i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.deposit-history-status.status-pending {
    background: rgba(255, 193, 7, 0.12);
    color: #FFC107;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.deposit-history-status.status-pending i {
    background: #FFC107;
    color: #111;
}

.deposit-history-status.status-approved {
    background: rgba(76, 175, 80, 0.12);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.35);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.2);
}

.deposit-history-status.status-approved i {
    background: #4CAF50;
    color: #fff;
}

.deposit-history-status.status-rejected {
    background: rgba(239, 83, 80, 0.12);
    color: #EF5350;
    border: 1px solid rgba(239, 83, 80, 0.25);
}

.deposit-history-status.status-rejected i {
    background: #EF5350;
    color: #fff;
}

.deposit-history-note {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.deposit-history-note.success {
    color: #4CAF50;
}

.deposit-history-note.danger {
    background: rgba(239, 83, 80, 0.08);
    border-color: rgba(239, 83, 80, 0.2);
    color: #EF5350;
}

.deposit-history-note i {
    font-size: 18px;
    flex-shrink: 0;
}

@media (max-width: 360px) {
    .deposit-history-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .deposit-history-amount {
        font-size: 16px;
    }

    .deposit-history-status {
        padding: 6px 10px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .deposit-tab {
        font-size: 11px;
        padding: 10px 4px;
    }

    .deposit-bank-number {
        font-size: 18px;
    }

    .deposit-copy-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.deposit-bank-section {
    margin-bottom: 16px;
}

.deposit-method-amount {
    margin-bottom: 16px;
}

.deposit-card-input-box {
    margin-bottom: 16px;
}

.deposit-card-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
}

.deposit-card-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Kanit', monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    outline: none;
}

.deposit-card-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.deposit-card-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.deposit-chain-box {
    margin-bottom: 16px;
}

.deposit-chain-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(38, 161, 123, 0.4);
    border-radius: 12px;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4A82B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.deposit-chain-select option {
    background: #1a1a1a;
    color: #fff;
}

.deposit-wallet-box {
    margin-bottom: 16px;
}

.deposit-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(38, 161, 123, 0.2);
    border-radius: 16px;
}

.deposit-qr-code {
    width: 160px;
    height: 160px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.deposit-qr-code svg {
    width: 100%;
    height: 100%;
    display: block;
}

.deposit-qr-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.deposit-wallet-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px 12px 16px;
    background: rgba(38, 161, 123, 0.1);
    border: 1px solid rgba(38, 161, 123, 0.3);
    border-radius: 12px;
    word-break: break-all;
}

.deposit-wallet-text {
    flex: 1;
    font-family: 'Kanit', monospace;
    font-size: 12px;
    color: #fff;
    letter-spacing: 0.5px;
    word-break: break-all;
    line-height: 1.5;
    max-height: 42px;
    overflow: hidden;
}

.deposit-copy-btn.small {
    padding: 8px 12px;
    font-size: 12px;
}

/* Withdraw Page */
.withdraw-page {
    padding: 16px;
    padding-bottom: 100px;
}

.withdraw-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.withdraw-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4CAF50;
    font-size: 14px;
}

.withdraw-section-icon.history {
    background: rgba(100, 181, 246, 0.12);
    border-color: rgba(100, 181, 246, 0.25);
    color: #64B5F6;
}

.withdraw-alert {
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 16px;
}

.withdraw-alert.error {
    background: rgba(239, 83, 80, 0.1);
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: #EF5350;
}

.withdraw-alert a {
    color: var(--gold-primary);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lottery-card, .bet-card, .feature-item {
    animation: fadeIn 0.4s ease forwards;
}

/* Responsive */
@media (max-width: 380px) {
    .lottery-grid {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 18px;
    }
    .hero-highlight {
        font-size: 14px;
    }
    .hero-section {
        min-height: 240px;
    }
    .bet-row {
        gap: 4px;
        margin-bottom: 6px;
    }
    .bet-number-input {
        width: 38px;
        padding: 8px 2px;
        font-size: 14px;
    }
    .bet-amount-input {
        padding: 8px 6px;
        font-size: 13px;
    }
    .num-keypad {
        padding: 4px 12px;
    }
    .keypad-row {
        gap: 4px;
    }
    .keypad-btn {
        padding: 10px 4px;
        font-size: 16px;
    }
    .bet-form {
        padding: 8px 12px 200px;
    }
    .bet-remove {
        padding: 2px;
        font-size: 14px;
        width: 32px;
        height: 32px;
    }
    .row-num {
        font-size: 10px !important;
        width: 20px !important;
    }
    .rate-bar {
        padding: 8px 12px;
        gap: 4px;
    }
    .rate-item {
        padding: 6px 8px;
        min-width: 58px;
    }
    .rate-item .rate-label {
        font-size: 9px;
    }
    .rate-item .rate-value {
        font-size: 12px;
    }
    .bet-type-tabs {
        padding: 12px;
        gap: 6px;
    }
    .bet-type-row {
        gap: 6px;
    }
    .bet-type-tab {
        padding: 8px 6px;
        font-size: 12px;
    }
    .countdown-large {
        gap: 6px;
        padding: 10px 8px;
    }
    .countdown-large .label {
        font-size: 12px;
    }
    .time-box {
        padding: 6px 8px;
        min-width: 42px;
    }
    .time-box .value {
        font-size: 16px;
    }
}

.withdraw-page {
    padding: 16px 16px 24px;
    color: #ffffff;
}

.withdraw-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.withdraw-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(241, 196, 15, 0.18);
    border: 1px solid rgba(241, 196, 15, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #f1c40f;
    flex-shrink: 0;
}

.withdraw-header-text {
    flex: 1;
}

.withdraw-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #ffffff;
}

.withdraw-subtitle {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
}

.withdraw-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.withdraw-alert.error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.45);
    color: #ff8a80;
}

.withdraw-alert i {
    margin-top: 2px;
    font-size: 16px;
}

.withdraw-alert a {
    color: #f1c40f;
    text-decoration: underline;
}

.withdraw-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.withdraw-amount-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(241, 196, 15, 0.4);
    border-radius: 18px;
    padding: 16px;
}

.withdraw-amount-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.withdraw-amount-label i {
    color: #f1c40f;
    font-size: 16px;
}

.withdraw-amount-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.withdraw-amount-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1c40f 0%, #d4ac0d 100%);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.25);
}

.withdraw-amount-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    padding: 0;
    outline: none;
    min-width: 0;
}

.withdraw-amount-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.withdraw-amount-input::-webkit-outer-spin-button,
.withdraw-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.withdraw-amount-unit {
    font-size: 18px;
    font-weight: 700;
    color: #f1c40f;
    flex-shrink: 0;
}

.withdraw-amount-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    flex-wrap: wrap;
}

.withdraw-balance {
    color: #f1c40f;
    font-weight: 600;
}

.withdraw-bank-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(241, 196, 15, 0.4);
    border-radius: 18px;
    padding: 16px;
}

.withdraw-bank-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 14px;
}

.withdraw-bank-label i {
    color: #f1c40f;
    font-size: 16px;
}

.withdraw-bank-body {
    display: flex;
    align-items: center;
    gap: 14px;
}

.withdraw-bank-logo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.withdraw-bank-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.withdraw-bank-info {
    flex: 1;
    min-width: 0;
}

.withdraw-bank-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.withdraw-bank-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.withdraw-bank-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.4);
    color: #f1c40f;
    font-size: 12px;
    font-weight: 600;
}

.withdraw-bank-number {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.withdraw-copy-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(241, 196, 15, 0.4);
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.withdraw-copy-btn:hover {
    background: rgba(241, 196, 15, 0.2);
}

.withdraw-copy-btn.copied {
    background: #f1c40f;
    color: #000000;
}

.withdraw-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #E8C96A 0%, #C79A2A 100%);
    color: #000000;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(212, 168, 43, 0.35);
    transition: all 0.2s ease;
    margin-top: 4px;
}

.withdraw-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.withdraw-submit-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(212, 168, 43, 0.45);
}

.withdraw-submit-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #000000;
    color: #f1c40f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.withdraw-history {
    margin-top: 28px;
}

.withdraw-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.withdraw-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.withdraw-history-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
}

.withdraw-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.withdraw-history-item {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
}

.withdraw-history-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.withdraw-history-left {
    min-width: 0;
}

.withdraw-history-amount {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.withdraw-history-amount i {
    color: #e74c3c;
    margin-right: 4px;
}

.withdraw-history-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

.withdraw-history-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.withdraw-history-status.status-pending {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.withdraw-history-status.status-approved {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.withdraw-history-status.status-rejected {
    background: rgba(231, 76, 60, 0.15);
    color: #ff8a80;
}

.withdraw-history-note {
    font-size: 12px;
    line-height: 1.5;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.withdraw-history-note.success {
    color: #f1c40f;
}

.withdraw-history-note.danger {
    color: #ff8a80;
}

.withdraw-reason {
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 380px) {
    .withdraw-page {
        padding: 12px 12px 20px;
    }
    .withdraw-header-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
        border-radius: 14px;
    }
    .withdraw-title {
        font-size: 20px;
    }
    .withdraw-subtitle {
        font-size: 12px;
    }
    .withdraw-amount-input {
        font-size: 30px;
    }
    .withdraw-amount-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .withdraw-bank-logo {
        width: 48px;
        height: 48px;
    }
    .withdraw-bank-name {
        font-size: 14px;
    }
    .withdraw-bank-detail {
        gap: 6px;
    }
    .withdraw-bank-badge {
        font-size: 10px;
        padding: 3px 7px;
    }
    .withdraw-bank-number {
        font-size: 12px;
    }
    .withdraw-copy-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    .withdraw-submit-btn {
        font-size: 15px;
        padding: 14px;
    }
    .deposit-bank-card {
        padding: 14px;
        border-radius: 20px;
    }
    .deposit-bank-logo {
        width: 48px;
        height: 48px;
    }
    .deposit-bank-account-name {
        font-size: 15px;
    }
    .deposit-bank-verified {
        font-size: 10px;
    }
    .deposit-bank-number-value {
        font-size: 20px;
        letter-spacing: 1px;
    }
    .deposit-copy-btn {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 12px;
    }
    .deposit-bank-owner-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .deposit-bank-owner-value {
        font-size: 14px;
    }
}

@media (max-width: 340px) {
    .deposit-bank-card-head {
        flex-wrap: wrap;
    }
    .deposit-bank-verified {
        width: 100%;
        margin-top: 6px;
    }
    .deposit-bank-number-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .deposit-copy-btn {
        width: 100%;
    }
}

@media (min-width: 480px) {
    .hero-text {
        max-width: 50%;
    }
    .features-grid {
        gap: 12px;
        padding: 20px 16px;
    }
    .feature-item {
        padding: 14px 8px;
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 480px;
    }
    .hero-section {
        padding: 24px 20px 20px;
    }
    .features-grid {
        padding: 20px;
    }
    .num-keypad {
        width: 480px;
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}
