* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-blue: #2196F3;
    --dark-blue: #1976D2;
    --light-blue: #64B5F6;
    --bg-light: #f5f7fa;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --success: #22c55e;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
}

.page-section { display: none; }
.page-section.active { display: block; }

/* Header */
.app-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title { font-size: 1.25rem; font-weight: 800; }
.header-dots { font-size: 1.5rem; cursor: pointer; }

.sub-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    padding: 8px 16px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-icon { font-size: 1.25rem; }
.login-btn {
    background: transparent;
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 16px;
}

/* Announcement Bar */
.announcement-bar {
    background: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.speaker-icon { font-size: 1.25rem; color: var(--primary-blue); }
.announcement-text { flex: 1; margin: 0 12px; color: var(--text-muted); font-size: 0.9rem; }
.language-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
}

.flag-icon {
    width: 24px;
    height: 16px;
    background: linear-gradient(180deg, #002868 33%, #fff 33%, #fff 66%, #bf0a30 66%);
    border-radius: 2px;
}

/* Banner */
.banner-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 50%, #1e3a5f 100%);
    padding: 20px 16px;
    position: relative;
}

.banner-title { color: #FFD700; font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; text-align: center; }
.rewards-list { display: flex; flex-direction: column; gap: 8px; }
.reward-item { color: white; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.reward-item .level { color: #64B5F6; }
.reward-item .amount { color: #FFD700; font-weight: 800; }
.banner-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.banner-dot.active { background: white; }

/* Tabs */
.tabs-section { background: white; display: flex; border-bottom: 1px solid #e2e8f0; }
.tab-btn {
    flex: 1;
    padding: 16px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    font-size: 1rem;
}

.tab-btn.active { color: var(--primary-blue); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 3px 3px 0 0;
}

.online-users { background: #f8fafc; padding: 8px 16px; text-align: right; color: var(--text-muted); font-size: 0.85rem; }
.online-count { color: var(--primary-blue); font-weight: 700; }

/* Event Cards */
.events-section { padding: 12px; }
.event-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.event-card.pink { background: linear-gradient(135deg, #fce7f3 0%, #fff 100%); }
.event-card.green { background: linear-gradient(135deg, #dcfce7 0%, #fff 100%); }
.event-card.blue { background: linear-gradient(135deg, #dbeafe 0%, #fff 100%); }

.event-quantity { text-align: center; min-width: 70px; }
.quantity-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; }
.quantity-value { font-size: 1.5rem; font-weight: 800; }
.event-card.pink .quantity-value { color: #ec4899; }
.event-card.green .quantity-value { color: #22c55e; }
.event-card.blue .quantity-value { color: #3b82f6; }

.event-info { flex: 1; }
.event-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.event-teams { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; margin-bottom: 4px; }
.event-prediction { font-size: 1.1rem; font-weight: 800; color: var(--text-dark); margin-bottom: 4px; }
.event-timer { font-size: 0.8rem; color: var(--primary-blue); }

.golden-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    border-top: 1px solid #e2e8f0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 60px;
}

.nav-item.active { color: var(--primary-blue); }
.nav-icon { font-size: 1.5rem; }

.nav-item.center { position: relative; margin-top: -20px; }
.center-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.7rem;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

/* My Page */
.mypage-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 8px; line-height: 1; }
.mypage-title { font-size: 1.1rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.notification-btn { background: transparent; border: none; color: white; font-size: 1.25rem; cursor: pointer; position: relative; padding: 8px; }
.vip-privilege-btn { background: rgba(255,255,255,0.2); border: none; color: white; font-size: 0.8rem; cursor: pointer; padding: 6px 12px; border-radius: 16px; font-weight: 600; }

/* VIP Card */
.vip-card-section { padding: 16px; background: linear-gradient(180deg, #e3f2fd 0%, var(--bg-light) 100%); }
.vip-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.2);
}

.vip-badge {
    background: linear-gradient(135deg, #1976D2, #0d47a1);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
}

.user-id { color: var(--text-dark); font-weight: 600; margin-bottom: 16px; font-size: 0.9rem; }
.balance-section { margin-bottom: 16px; }
.balance-label { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 4px; }
.balance-value { font-size: 2.5rem; font-weight: 800; color: var(--primary-blue); }
.card-stats { display: flex; gap: 24px; }
.card-stat { flex: 1; }
.stat-label { color: var(--text-muted); font-size: 0.8rem; }
.stat-value { color: var(--text-dark); font-weight: 700; font-size: 0.95rem; }
.card-logo { position: absolute; top: 16px; right: 16px; font-size: 0.7rem; color: var(--primary-blue); font-weight: 800; }

/* Action Buttons */
.action-buttons { display: flex; gap: 12px; padding: 0 16px 16px; }
.action-btn {
    flex: 1;
    padding: 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
}

.action-btn.deposit { background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); color: white; }
.action-btn.withdrawal { background: white; color: var(--primary-blue); border: 2px solid var(--primary-blue); }

/* Menu Grid */
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px; }
.menu-item {
    background: white;
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #f1f5f9;
}

.menu-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.menu-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.menu-label { font-size: 0.8rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; }

/* Info Links */
.info-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
.info-link {
    background: white;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border: 1px solid #f1f5f9;
}

.info-link-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.info-link-text { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); }

/* Records */
.records-tabs { display: flex; background: white; border-bottom: 1px solid #e2e8f0; }
.records-tab {
    flex: 1;
    padding: 14px;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.records-tab.active { color: var(--primary-blue); border-bottom: 2px solid var(--primary-blue); }
.records-list { padding: 12px; }
.record-item { background: white; border-radius: 12px; padding: 16px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.record-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.record-type { font-weight: 700; color: var(--text-dark); }
.record-status { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.record-status.approved { background: #dcfce7; color: #166534; }
.record-status.pending { background: #fef3c7; color: #92400e; }
.record-status.rejected { background: #fee2e2; color: #991b1b; }
.record-details { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 0.85rem; }
.record-amount { font-weight: 700; color: var(--text-dark); }

/* Info/Account Sections */
.info-section, .account-section, .settings-section { padding: 16px; }
.info-card, .account-card { background: white; border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.info-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-value { font-weight: 600; color: var(--text-dark); }
.account-card-title { font-weight: 700; color: var(--text-dark); margin-bottom: 16px; font-size: 1.1rem; }
.account-field { margin-bottom: 16px; }
.account-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; display: block; }
.account-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
}

.account-input:focus { outline: none; border-color: var(--primary-blue); }
.save-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.logout-btn { background: #ef4444 !important; margin-top: 24px; }

/* Settings */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    margin-bottom: 2px;
}

.settings-item:first-child { border-radius: 16px 16px 0 0; }
.settings-item:nth-child(3) { border-radius: 0 0 16px 16px; }
.settings-left { display: flex; align-items: center; gap: 12px; }
.settings-icon { font-size: 1.25rem; }
.settings-label { font-weight: 600; color: var(--text-dark); }
.toggle-switch {
    width: 50px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 28px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active { background: var(--primary-blue); }
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active::after { transform: translateX(22px); }

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }
.modal-box { background: white; width: 90%; max-width: 400px; border-radius: 20px; overflow: hidden; }
.modal-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title { font-weight: 700; font-size: 1.1rem; }
.modal-close { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 20px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-dark); }
.form-input { width: 100%; padding: 12px 16px; border: 2px solid #e2e8f0; border-radius: 10px; font-size: 1rem; }
.form-input:focus { outline: none; border-color: var(--primary-blue); }
.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

.bank-info-box { background: #dbeafe; padding: 12px; border-radius: 10px; margin-bottom: 16px; }
.balance-info-box { background: #dcfce7; padding: 12px; border-radius: 10px; margin-bottom: 16px; }
.balance-display { font-size: 1.5rem; color: #166534; font-weight: 700; }

/* CS Modal */
.cs-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: flex-end;
}

.cs-modal.active { display: flex; }
.cs-content { background: white; width: 100%; max-height: 80vh; border-radius: 20px 20px 0 0; }
.cs-header {
    background: var(--primary-blue);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.cs-close { background: transparent; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.cs-body { padding: 20px; }
.cs-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
}

.cs-option:hover { background: #f8fafc; }
.cs-icon { font-size: 2rem; }
.cs-option h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.cs-option p { color: var(--text-muted); font-size: 0.85rem; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }

/* Alert Boxes */
.alert-box { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-box.info { background: #dbeafe; color: #1e40af; }
.alert-box.warning { background: #fef3c7; color: #92400e; }
.alert-box.success { background: #dcfce7; color: #166534; }
.alert-box.danger { background: #fee2e2; color: #991b1b; }

/* KYC Status Items */
.kyc-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
}

.kyc-info { display: flex; align-items: center; gap: 12px; }
.kyc-icon { font-size: 1.5rem; }
.kyc-title { font-weight: 600; color: var(--text-dark); }
.kyc-desc { font-size: 0.8rem; color: var(--text-muted); }
.kyc-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.kyc-badge.pending { background: #fef3c7; color: #92400e; }
.kyc-badge.verified { background: #dcfce7; color: #166534; }
.kyc-badge.approved { background: #dcfce7; color: #166534; }
.kyc-badge.rejected { background: #fee2e2; color: #991b1b; }

/* Privacy Items */
.privacy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.privacy-item:last-child { border-bottom: none; }
.privacy-item span { font-weight: 500; color: var(--text-dark); }

/* Radio Groups */
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-item:has(input:checked) { border-color: var(--primary-blue); background: #eff6ff; }
.radio-item input[type="radio"] { margin-right: 12px; width: 18px; height: 18px; accent-color: var(--primary-blue); }
.radio-label { font-weight: 500; color: var(--text-dark); }

/* Activity List */
.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.activity-icon.login { background: #dcfce7; }
.activity-icon.deposit { background: #dbeafe; }
.activity-icon.withdrawal { background: #fef3c7; }
.activity-icon.trade { background: #f3e8ff; }
.activity-icon.security { background: #fee2e2; }

.activity-info { flex: 1; }
.activity-title { font-weight: 600; color: var(--text-dark); }
.activity-time { font-size: 0.8rem; color: var(--text-muted); }
.activity-detail { font-size: 0.85rem; color: var(--text-muted); }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.stat-box-value { font-size: 1.25rem; font-weight: 700; color: var(--primary-blue); margin-bottom: 4px; }
.stat-box-label { font-size: 0.8rem; color: var(--text-muted); }

/* Action List Buttons */
.action-list-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.action-list-btn.warning { background: #fef3c7; color: #92400e; }
.action-list-btn.danger { background: #fee2e2; color: #991b1b; }
.action-list-btn:active { opacity: 0.8; }

/* Chat Modal */
.chat-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70vh;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    flex-direction: column;
}

.chat-modal.active { display: flex; }
.chat-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.chat-title { font-weight: 700; font-size: 1.1rem; }
.chat-status { font-size: 0.85rem; opacity: 0.9; }
.chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.user .chat-bubble {
    background: var(--primary-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.support .chat-bubble {
    background: white;
    color: var(--text-dark);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.chat-message.user .chat-time { text-align: right; }

.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 20px 20px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
}

.chat-input:focus { border-color: var(--primary-blue); }
.chat-send-btn {
    padding: 10px 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.chat-attach-btn {
    padding: 10px 12px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

.chat-typing {
    padding: 8px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.chat-file-message {
    background: #f8fafc !important;
    border: 1px dashed var(--primary-blue) !important;
    padding: 12px !important;
}

.chat-file-message .file-name {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.chat-file-message .file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Referral Page */
.referral-code-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.referral-code {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    letter-spacing: 2px;
}

.copy-btn {
    padding: 10px 16px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.referral-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.referral-link {
    color: var(--primary-blue);
    word-break: break-all;
}

.referral-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.referral-tier:last-child { border-bottom: none; }
.tier-level { font-weight: 600; color: var(--text-dark); }
.tier-count { color: var(--text-muted); font-size: 0.85rem; }
.tier-reward { font-weight: 700; color: var(--success); }

.referral-list { display: flex; flex-direction: column; gap: 10px; }
.referral-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.referral-user { font-weight: 600; color: var(--text-dark); }
.referral-date { font-size: 0.8rem; color: var(--text-muted); }
.referral-balance { font-size: 0.85rem; color: var(--primary-blue); font-weight: 500; }
.referral-reward { font-size: 0.8rem; color: var(--success); font-weight: 500; }
.referral-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.referral-status { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.referral-status.active { background: #dcfce7; color: #166534; }
.referral-status.pending { background: #fef3c7; color: #92400e; }
.referral-kyc { padding: 2px 8px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.referral-kyc.verified { background: #dbeafe; color: #1e40af; }
.referral-kyc.pending { background: #f3f4f6; color: #6b7280; }
.referral-id { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

/* Wallet Page */
.wallet-balance-card {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.wallet-balance-label { font-size: 0.9rem; opacity: 0.9; margin-bottom: 8px; }
.wallet-balance-value { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.wallet-balance-sub {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.wallet-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.wallet-action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.wallet-action-btn.deposit { background: var(--success); color: white; }
.wallet-action-btn.withdraw { background: #f59e0b; color: white; }

.wallet-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.wallet-stat-row:last-child { border-bottom: none; }
.wallet-stat-row span:first-child { color: var(--text-muted); }
.wallet-stat-row span:last-child { font-weight: 600; color: var(--text-dark); }

.transaction-list { display: flex; flex-direction: column; gap: 10px; }
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.transaction-info { display: flex; align-items: center; gap: 10px; }
.transaction-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.transaction-icon.deposit { background: #dcfce7; }
.transaction-icon.withdrawal { background: #fee2e2; }
.transaction-icon.trade { background: #dbeafe; }

.transaction-details { display: flex; flex-direction: column; }
.transaction-type { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.transaction-date { font-size: 0.75rem; color: var(--text-muted); }
.transaction-amount { font-weight: 700; }
.transaction-amount.positive { color: var(--success); }
.transaction-amount.negative { color: var(--danger); }

/* Notifications */
.notification-list { display: flex; flex-direction: column; gap: 10px; }
.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--primary-blue);
}

.notification-item.unread { background: #eff6ff; }
.notification-item.success { border-left-color: var(--success); }
.notification-item.warning { border-left-color: #f59e0b; }
.notification-item.error { border-left-color: var(--danger); }

.notification-icon { font-size: 1.5rem; }
.notification-content { flex: 1; }
.notification-title { font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.notification-message { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.notification-time { font-size: 0.75rem; color: var(--text-muted); }

/* Header notification badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark Mode Styles */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .app-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .sub-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark-mode .announcement-bar {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .banner-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #1e293b 100%);
}

body.dark-mode .tabs-section {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark-mode .tab-btn {
    color: #94a3b8;
}

body.dark-mode .tab-btn.active {
    color: #60a5fa;
}

body.dark-mode .event-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .event-card.pink {
    background: linear-gradient(135deg, #831843 0%, #1e293b 100%);
}

body.dark-mode .event-card.green {
    background: linear-gradient(135deg, #14532d 0%, #1e293b 100%);
}

body.dark-mode .event-card.blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
}

body.dark-mode .vip-card-section {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .vip-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
}

body.dark-mode .account-card,
body.dark-mode .info-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .info-row {
    border-bottom-color: #334155;
}

body.dark-mode .account-input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .account-input:focus {
    border-color: #60a5fa;
}

body.dark-mode .modal-box {
    background: #1e293b;
}

body.dark-mode .form-input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .form-input:focus {
    border-color: #60a5fa;
}

body.dark-mode .record-item,
body.dark-mode .transaction-item,
body.dark-mode .referral-item {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .chat-modal {
    background: #1e293b;
}

body.dark-mode .chat-input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .chat-input:focus {
    border-color: #60a5fa;
}

body.dark-mode .chat-bubble {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode .chat-message.user .chat-bubble {
    background: #60a5fa;
    color: white;
}

body.dark-mode .notification-item {
    background: #1e293b;
    border-left-color: #60a5fa;
}

body.dark-mode .bottom-nav {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-mode .nav-item {
    color: #94a3b8;
}

body.dark-mode .nav-item.active {
    color: #60a5fa;
}

body.dark-mode .center-logo {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

/* Bet Detail Modal */
.bet-detail-box { max-width: 420px; }

.bet-detail-match {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 16px;
}

.bet-match-date { font-size: 0.85rem; opacity: 0.9; margin-bottom: 8px; }
.bet-match-teams { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.bet-match-league { font-size: 0.8rem; opacity: 0.8; }

.bet-detail-info { margin-bottom: 16px; }

.bet-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.bet-info-row:last-child { border-bottom: none; }
.bet-info-label { color: var(--text-muted); font-size: 0.9rem; }
.bet-info-value { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.bet-info-value.highlight { color: var(--primary-blue); font-weight: 700; }
.bet-info-value.win { color: var(--success); }
.bet-info-value.loss { color: var(--danger); }

.bet-detail-progress {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.progress-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }

.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), #60a5fa);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-status { font-size: 0.8rem; color: var(--text-muted); text-align: center; }

.bet-detail-result {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.bet-detail-result.loss {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.result-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.result-score { font-size: 1.5rem; font-weight: 800; color: var(--text-dark); }

/* Clickable record items */
.record-item.clickable { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.record-item.clickable:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.trade-item { cursor: pointer; }
.trade-item:active { opacity: 0.8; }

/* Banner Styles */
.banner-card { cursor: pointer; }
.banner-card:active { opacity: 0.9; }

.banner-content { 
    display: flex; 
    flex-direction: column; 
    flex-wrap: wrap;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
}

.banner-image { 
    width: 100%; 
    height: 120px; 
    object-fit: cover; 
    border-radius: 8px 8px 0 0;
}

.banner-info { 
    padding: 12px; 
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-title { 
    font-weight: 800; 
    font-size: 1rem; 
    color: white; 
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.banner-description { 
    font-size: 0.85rem; 
    color: rgba(255,255,255,0.9); 
    line-height: 1.4;
    margin-bottom: 8px;
}

.banner-link { 
    color: #fbbf24; 
    text-decoration: none; 
    font-weight: 700;
    font-size: 0.85rem;
    align-self: flex-start;
    padding: 4px 12px;
    border: 1px solid #fbbf24;
    border-radius: 20px;
    transition: all 0.2s;
}

.banner-link:hover { 
    background: #fbbf24; 
    color: #764ba2;
}

/* Notification Styles */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f9fafb;
}

.notification-item.unread {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.notification-item.success {
    border-left: 4px solid #10b981;
}

.notification-item.warning {
    border-left: 4px solid #f59e0b;
}

.notification-item.error {
    border-left: 4px solid #ef4444;
}

.notification-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}
