:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #e94560;
    --gold: #d4a843;
    --gold-light: #f0d78c;
    --text: #eee;
    --text-dim: #888;
    --success: #00d26a;
    --warning: #ffc107;
    --danger: #dc3545;
    --border: #333;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--primary);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.auth-box {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
}
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h1 { color: var(--gold); font-size: 1.8rem; margin-bottom: 8px; }
.auth-header p { color: var(--text-dim); }
.auth-header .logo {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 2rem;
}

/* User Layout */
.user-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px;
    background: var(--secondary);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    background: linear-gradient(180deg, rgba(212,168,67,0.1) 0%, transparent 100%);
}
.sidebar-header h1 { color: var(--gold); font-size: 1.2rem; letter-spacing: 2px; }
.user-info { margin-top: 15px; }
.user-info .user-id {
    font-size: 0.75rem; color: var(--text-dim);
    background: var(--primary); padding: 3px 10px; border-radius: 10px;
    display: inline-block; margin-bottom: 8px;
}
.user-info .username { font-weight: 600; font-size: 1.1rem; }
.user-info .vip-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    color: #000;
    padding: 4px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
}

.sidebar-nav { padding: 15px 0; }
.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.nav-item:hover, .nav-item.active {
    background: rgba(212, 168, 67, 0.1);
    color: var(--gold);
    border-left-color: var(--gold);
}
.nav-item i { width: 25px; margin-right: 12px; font-size: 1.1rem; }
.nav-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
}

.logout-btn {
    margin: 20px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.logout-btn:hover { background: rgba(220, 53, 69, 0.3); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}
.page-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-header h2 { color: var(--gold); font-size: 1.5rem; }

/* Cards */
.card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.card:hover { border-color: rgba(212,168,67,0.3); }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { color: var(--gold); font-size: 1.1rem; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}
.stat-item {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}
.stat-item:hover { border-color: var(--gold); transform: translateY(-3px); }
.stat-item i { font-size: 1.8rem; color: var(--gold); margin-bottom: 10px; }
.stat-item .value { font-size: 1.5rem; font-weight: 700; display: block; color: var(--gold-light); }
.stat-item .label { color: var(--text-dim); font-size: 0.85rem; }

/* Form */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 12px 15px;
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-control:focus { outline: none; border-color: var(--gold); }
.input-group { position: relative; }
.input-group .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary { background: linear-gradient(135deg, var(--gold), #b8860b); color: #000; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(212,168,67,0.3); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* Panel */
.content-panel { display: none; }
.content-panel.active { display: block; }

/* QR Section */
.qr-section {
    background: linear-gradient(135deg, rgba(212,168,67,0.1), rgba(212,168,67,0.05));
    border: 2px solid var(--gold);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
}
.qr-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    margin: 20px 0;
}
.qr-box img { max-width: 200px; }
.qr-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    margin: 15px 0;
}
.qr-code {
    font-size: 1.2rem;
    color: var(--text-dim);
    background: var(--primary);
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}
.bank-info {
    margin-top: 20px;
    padding: 15px;
    background: var(--primary);
    border-radius: 10px;
    text-align: left;
}
.bank-info p { margin: 8px 0; color: var(--text-dim); }
.bank-info strong { color: var(--gold); }

/* Amount Buttons */
.amount-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.amount-btn {
    padding: 15px;
    background: var(--primary);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.amount-btn:hover, .amount-btn.active {
    border-color: var(--gold);
    background: rgba(212,168,67,0.1);
}
.amount-btn .amount { font-size: 1.2rem; font-weight: 700; color: var(--gold); }
.amount-btn .bonus { font-size: 0.8rem; color: var(--success); }

/* Transaction History */
.transaction-list { display: flex; flex-direction: column; gap: 10px; }
.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--primary);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.transaction-item.success { border-left: 3px solid var(--success); }
.transaction-item.pending { border-left: 3px solid var(--warning); }
.transaction-item i { margin-right: 10px; }
.transaction-info { flex: 1; }
.transaction-amount { font-weight: 700; font-size: 1.1rem; }
.transaction-amount.positive { color: var(--success); }
.transaction-time { font-size: 0.8rem; color: var(--text-dim); }

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-header h3 { color: var(--gold); }
.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Status */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status.success { background: rgba(0,210,106,0.2); color: #2ecc71; }
.status.pending { background: rgba(255,193,7,0.2); color: #ffc107; }
.status.failed { background: rgba(220,53,69,0.2); color: #e74c3c; }

/* VIP Styles */
.vip-progress { height: 20px; background: var(--primary); border-radius: 10px; margin-bottom: 15px; overflow: hidden; }
.vip-progress-bar { height: 100%; background: linear-gradient(90deg, var(--gold), #f39c12); border-radius: 10px; transition: width 0.5s; }
.vip-levels-table table tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.vip-levels-table td { padding: 10px; text-align: center; border-bottom: 1px solid var(--border); }
.vip-levels-table .current-vip { background: rgba(212,168,67,0.2) !important; }

/* Alert */
.alert { padding: 12px 15px; border-radius: 8px; margin-bottom: 15px; }
.alert-error { background: rgba(220,53,69,0.2); border: 1px solid var(--danger); color: var(--danger); }

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar-header h1, .nav-item span, .sidebar-header .user-info { display: none; }
    .nav-item { justify-content: center; padding: 15px; }
    .main-content { margin-left: 70px; padding: 15px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .amount-buttons { grid-template-columns: repeat(2, 1fr); }
}

/* Loading */
.loading { text-align: center; padding: 40px; color: var(--text-dim); }
