:root {
    --bg-body: #faf9f7;
    --bg-body-gradient: linear-gradient(145deg, #f8f6f3 0%, #f0ebe4 40%, #e8e2d9 100%);
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-solid: #ffffff;
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-header: rgba(252, 250, 247, 0.95);

    /* Gold Gradients - Richer */
    --gradient-gold: linear-gradient(135deg, #C9A227 0%, #A8860C 50%, #8B6B0B 100%);
    --gradient-gold-shine: linear-gradient(135deg, #E6C644 0%, #C9A227 30%, #A8860C 70%, #705608 100%);
    --gradient-gold-subtle: linear-gradient(135deg, rgba(201, 162, 39, 0.12) 0%, rgba(168, 134, 12, 0.08) 100%);
    --gradient-gold-light: linear-gradient(135deg, rgba(201, 162, 39, 0.18) 0%, rgba(168, 134, 12, 0.12) 100%);
    --gradient-success: linear-gradient(135deg, #047857 0%, #059669 100%);
    --gradient-purple: linear-gradient(135deg, #6D28D9 0%, #7C3AED 100%);
    --gradient-pink: linear-gradient(135deg, #BE185D 0%, #DB2777 100%);
    --gradient-blue: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(168, 134, 12, 0.25);
    --glass-shadow: 0 8px 32px rgba(80, 60, 20, 0.1);
    --glass-blur: blur(20px);

    /* Colors - Warmer Gold Palette */
    --gold: #A8860C;
    --gold-light: #C9A227;
    --gold-dark: #705608;
    --gold-muted: rgba(168, 134, 12, 0.75);
    --primary: #A8860C;
    --primary-light: rgba(168, 134, 12, 0.12);
    --secondary: #6D28D9;
    --accent: #C9A227;
    --success: #047857;
    --warning: #B45309;
    --danger: #B91C1C;

    /* Text - Better Contrast */
    --text-primary: #1C1917;
    --text-secondary: #57534E;
    --text-light: #78716C;
    --text-gold: #705608;

    /* Borders & Effects */
    --border-color: rgba(168, 134, 12, 0.2);
    --border-glow: rgba(168, 134, 12, 0.4);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;

    /* Shadows - Warmer */
    --card-shadow: 0 4px 24px rgba(80, 60, 20, 0.08);
    --card-glow: 0 8px 32px rgba(168, 134, 12, 0.15);
    --gold-glow: 0 4px 24px rgba(168, 134, 12, 0.3);

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --nav-height: 56px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-body: #0C0A09;
    --bg-body-gradient: linear-gradient(145deg, #0C0A09 0%, #1C1917 40%, #292524 100%);
    --bg-card: rgba(28, 25, 23, 0.9);
    --bg-card-solid: #1C1917;
    --bg-card-hover: rgba(41, 37, 36, 0.95);
    --bg-header: rgba(12, 10, 9, 0.95);

    /* Gold Gradients - Dark Mode */
    --gradient-gold: linear-gradient(135deg, #F5C518 0%, #D4A017 50%, #B8860B 100%);
    --gradient-gold-shine: linear-gradient(135deg, #FFD93D 0%, #F5C518 30%, #D4A017 70%, #A8860C 100%);
    --gradient-gold-subtle: linear-gradient(135deg, rgba(245, 197, 24, 0.12) 0%, rgba(212, 160, 23, 0.08) 100%);
    --gradient-gold-light: linear-gradient(135deg, rgba(245, 197, 24, 0.15) 0%, rgba(212, 160, 23, 0.1) 100%);

    /* Glassmorphism Dark */
    --glass-bg: rgba(28, 25, 23, 0.8);
    --glass-border: rgba(245, 197, 24, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Colors Dark */
    --gold: #F5C518;
    --gold-light: #FFD93D;
    --gold-dark: #D4A017;
    --gold-muted: rgba(245, 197, 24, 0.8);
    --primary: #F5C518;
    --primary-light: rgba(245, 197, 24, 0.15);

    /* Text Dark */
    --text-primary: #FAFAF9;
    --text-secondary: #A8A29E;
    --text-light: #78716C;
    --text-gold: #FFD93D;

    /* Borders Dark */
    --border-color: rgba(245, 197, 24, 0.15);
    --border-glow: rgba(245, 197, 24, 0.35);

    /* Shadows Dark */
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --card-glow: 0 8px 32px rgba(245, 197, 24, 0.12);
    --gold-glow: 0 4px 24px rgba(245, 197, 24, 0.25);
}

[data-theme="dark"] .bg-orb-1 {
    background: radial-gradient(circle, rgba(245, 197, 24, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .bg-orb-2 {
    background: radial-gradient(circle, rgba(109, 40, 217, 0.12) 0%, transparent 70%);
}

[data-theme="dark"] .bg-orb-3 {
    background: radial-gradient(circle, rgba(245, 197, 24, 0.1) 0%, transparent 70%);
}

[data-theme="dark"] .input-box,
[data-theme="dark"] .ref-input-group input {
    background: rgba(41, 37, 36, 0.6);
}

[data-theme="dark"] .close-modal {
    background: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-body);
    background-image: var(--bg-body-gradient);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 80px;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Animated Background Orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.bg-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.3) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: floatOrb1 20s ease-in-out infinite;
}

.bg-orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    bottom: 20%;
    left: -100px;
    animation: floatOrb2 25s ease-in-out infinite;
}

.bg-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(184, 134, 11, 0.2) 0%, transparent 70%);
    top: 50%;
    right: -50px;
    animation: floatOrb3 18s ease-in-out infinite;
}

@keyframes floatOrb1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-50px, 80px) scale(1.1);
    }

    66% {
        transform: translate(30px, -40px) scale(0.95);
    }
}

@keyframes floatOrb2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(80px, -60px) scale(1.15);
    }
}

@keyframes floatOrb3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-40px, 50px) scale(1.1);
    }
}

/* UTILS */
.hidden {
    display: none !important;
}

.btn {
    border: none;
    padding: 14px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #ffffff;
    box-shadow: var(--gold-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(184, 134, 11, 0.35);
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.25);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.35);
}

.text-center {
    text-align: center;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes goldPulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(184, 134, 11, 0.15);
    }

    50% {
        box-shadow: 0 0 25px rgba(184, 134, 11, 0.3);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(184, 134, 11, 0.15);
    }

    50% {
        border-color: rgba(184, 134, 11, 0.3);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* GLASSMORPHISM CARD BASE */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
}

/* COMPACT HEADER */
.top-header {
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    font-weight: 700;
    font-size: 16px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.3px;
}

.brand i {
    color: var(--gold);
    font-size: 18px;
}

.balance-container {
    text-align: right;
    background: var(--gradient-gold-subtle);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.balance-container:hover {
    border-color: var(--border-glow);
    box-shadow: var(--card-glow);
}

.balance-container .label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2px;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.balance-container .val {
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: var(--gold-dark);
}

.usdt-logo {
    width: 16px;
    height: 16px;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    color: white;
}

/* HERO CARD */
.hero-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    margin: 16px;
    padding: 28px 22px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    animation: borderGlow 4s ease-in-out infinite;
}

.hero-card::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.12) 0%, transparent 70%);
    top: -120px;
    right: -120px;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.hero-card::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
    bottom: -90px;
    left: -90px;
    border-radius: 50%;
}

.hero-title {
    color: var(--text-secondary);
    font-size: 11px;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
}

.hero-amount {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-amount span {
    font-size: 20px;
    color: var(--gold-muted);
    font-weight: 600;
}

.usdt-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-gold-subtle);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    margin-top: 6px;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border-color);
    color: var(--gold-dark);
    font-weight: 500;
}

.hero-stats {
    display: flex;
    justify-content: space-around;
    font-size: 12px;
    background: var(--gradient-gold-light);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    margin-top: 18px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(184, 134, 11, 0.1);
    color: var(--text-secondary);
}

.hero-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-stats i {
    color: var(--gold);
}

/* ACTION GRID */
.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.action-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    padding: 12px 6px;
    border-radius: var(--border-radius-sm);
}

.action-btn:hover {
    transform: translateY(-6px);
    background: var(--bg-card);
    box-shadow: var(--card-shadow);
}

.icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.icon-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.25), transparent);
    top: 0;
    left: 0;
}

.action-btn:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
}

.btn-deposit .icon-box {
    background: var(--gradient-gold);
    box-shadow: var(--gold-glow);
}

.btn-withdraw .icon-box {
    background: var(--gradient-success);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.25);
}

.btn-team .icon-box {
    background: var(--gradient-purple);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}

.btn-support .icon-box {
    background: var(--gradient-pink);
    box-shadow: 0 6px 20px rgba(219, 39, 119, 0.25);
}

.action-btn span {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* SECTION TITLES */
.section-title {
    padding: 20px 16px 14px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.section-title .see-all {
    font-size: 12px;
    color: var(--gold);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.section-title .see-all:hover {
    transform: translateX(3px);
}

/* ROI LIST */
.roi-list {
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.roi-item {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 18px;
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.roi-item::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 100%;
    background: var(--gradient-gold);
    left: 0;
    top: 0;
    transition: width 0.3s ease;
}

.roi-item:hover::before {
    width: 5px;
}

.roi-item:hover {
    transform: translateX(6px) translateY(-3px);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    box-shadow: var(--card-glow);
}

.roi-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-gold-subtle);
    border: 1px solid var(--border-color);
    color: var(--gold);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
}

.roi-item:hover .roi-icon {
    transform: scale(1.05);
    background: var(--gradient-gold);
    color: white;
    border-color: transparent;
}

.roi-info {
    flex: 1;
}

.roi-info h4 {
    margin: 0;
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-primary);
    font-weight: 600;
}

.roi-info p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.roi-percent {
    font-weight: 700;
    font-size: 20px;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
}

.roi-percent::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    top: 3px;
    right: -12px;
    animation: goldPulse 1.5s infinite;
}

.roi-item.highlight {
    border-color: rgba(184, 134, 11, 0.25);
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.06) 0%, var(--bg-card) 100%);
}

.roi-item.highlight .roi-icon {
    background: var(--gradient-gold);
    color: white;
    border-color: transparent;
}

/* REFER TAB */
.refer-hero {
    text-align: center;
    padding: 50px 20px 40px;
    background: linear-gradient(180deg, rgba(212, 160, 23, 0.08) 0%, transparent 100%);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.refer-hero::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.1) 0%, transparent 70%);
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
}

.refer-hero img {
    width: 90px;
    height: 90px;
    margin-bottom: 18px;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 25px rgba(184, 134, 11, 0.2));
    position: relative;
    z-index: 2;
}

.refer-hero h2 {
    font-size: 26px;
    margin-bottom: 10px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    z-index: 2;
    font-weight: 800;
}

.refer-hero p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 300px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.refer-link-box {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    margin: 16px;
    padding: 22px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.refer-link-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    top: 0;
    left: 0;
}

.ref-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.user-ref-code {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 6px;
}

.ref-input-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.ref-input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.ref-input-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.1);
}

.ref-input-group button {
    background: var(--gradient-gold);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    width: 48px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--gold-glow);
}

.ref-input-group button:hover {
    transform: scale(1.05) rotate(5deg);
}

.refer-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0 16px;
    margin-top: 24px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    bottom: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--card-glow);
}

.stat-card .value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-card .label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* FORMS */
.form-container {
    padding: 16px;
    position: relative;
    z-index: 1;
}

.page-header {
    padding: 20px 16px 12px;
    position: relative;
    z-index: 1;
}

.page-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

.network-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(243, 186, 47, 0.1);
    color: #d97706;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    border: 1px solid rgba(243, 186, 47, 0.2);
}

.bsc-logo {
    width: 14px;
    height: 14px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.input-box {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    transition: var(--transition);
}

.input-box:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.1);
}

.amount-input-group {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.amount-input-group:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.1);
}

.amount-input-group span {
    padding: 0 14px;
    font-weight: 700;
    color: var(--gold);
    font-size: 14px;
}

.amount-input-group input {
    flex: 1;
    background: none;
    border: none;
    padding: 12px 8px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.amount-input-group input:focus {
    outline: none;
}

.amount-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.amount-preset {
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.amount-preset:hover {
    background: var(--gradient-gold-subtle);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.amount-preset.active {
    background: var(--gradient-gold);
    color: white;
    border-color: transparent;
    box-shadow: var(--gold-glow);
}

/* PROFILE TAB */
.profile-header {
    background: linear-gradient(180deg, rgba(212, 160, 23, 0.1) 0%, transparent 100%);
    padding: 40px 16px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.12) 0%, transparent 70%);
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
}

.avatar {
    width: 85px;
    height: 85px;
    background: var(--gradient-gold);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: white;
    box-shadow: var(--gold-glow);
    border: 3px solid rgba(255, 255, 255, 0.5);
    animation: goldPulse 3s infinite;
    position: relative;
    z-index: 2;
}

.profile-header h3 {
    margin: 8px 0;
    font-size: 24px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    z-index: 2;
    font-weight: 800;
}

.user-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gradient-gold-subtle);
    color: var(--gold-dark);
    border-radius: 50px;
    font-size: 11px;
    margin-top: 6px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
    font-weight: 600;
}

.profile-stats {
    display: flex;
    margin: 16px;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.stat-box {
    flex: 1;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    top: 0;
    left: 0;
}

.stat-box:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--card-glow);
}

.stat-box span {
    display: block;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 6px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-box small {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-list {
    padding: 16px;
    position: relative;
    z-index: 1;
}

.menu-item {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.menu-item:hover {
    transform: translateX(6px);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
}

.menu-item i:first-child {
    color: var(--gold);
    font-size: 18px;
    width: 22px;
}

.menu-item .arrow {
    margin-left: auto;
    color: var(--text-light);
}

.menu-item.text-red {
    color: var(--danger);
}

.menu-item.text-red i:first-child {
    color: var(--danger);
}

/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-header);
    backdrop-filter: var(--glass-blur);
    display: flex;
    justify-content: space-around;
    padding: 12px 8px 18px;
    z-index: 100;
    border-top: 1px solid var(--border-color);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
}

.nav-item i {
    font-size: 20px;
    color: var(--text-light);
    transition: var(--transition);
}

.nav-item:hover i {
    color: var(--gold);
    transform: translateY(-2px);
}

.nav-item.active {
    background: var(--gradient-gold-subtle);
}

.nav-item.active i {
    color: var(--gold);
}

/* MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card-solid);
    backdrop-filter: var(--glass-blur);
    width: 90%;
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    padding: 24px;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    top: 0;
    left: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.close-modal {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--gold);
    background: var(--gradient-gold-subtle);
    border-color: var(--gold);
    transform: rotate(90deg);
}

.modal-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    position: relative;
}

.modal-steps::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    position: relative;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 700;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--gradient-gold);
    color: white;
    border-color: var(--gold);
    box-shadow: var(--gold-glow);
}

.step-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step.active .step-label {
    color: var(--gold);
}

.qr-container {
    background: rgba(0, 0, 0, 0.02);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: center;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    background: linear-gradient(45deg, rgba(184, 134, 11, 0.05) 25%, rgba(184, 134, 11, 0.1) 25%, rgba(184, 134, 11, 0.1) 50%, rgba(184, 134, 11, 0.05) 50%, rgba(184, 134, 11, 0.05) 75%, rgba(184, 134, 11, 0.1) 75%);
    background-size: 20px 20px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.deposit-address {
    background: var(--gradient-gold-subtle);
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    word-break: break-all;
    text-align: center;
    margin: 16px 0;
    border: 1px solid var(--border-color);
    color: var(--gold-dark);
    font-weight: 600;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-animation h4 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 16px;
}

.confirmation-status {
    text-align: center;
    padding: 24px;
    background: rgba(5, 150, 105, 0.08);
    border-radius: var(--border-radius);
    margin: 20px 0;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-icon {
    font-size: 44px;
    color: var(--success);
    margin-bottom: 14px;
    animation: bounce 1s infinite alternate;
}

.confirmation-status h4 {
    color: var(--success);
    font-size: 18px;
    margin-bottom: 6px;
}

/* SUPPORT MODAL */
.support-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.support-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.support-option::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 100%;
    background: var(--gradient-pink);
    left: 0;
    top: 0;
}

.support-option:hover {
    transform: translateX(6px) translateY(-2px);
    background: var(--bg-card-hover);
    border-color: rgba(219, 39, 119, 0.25);
    box-shadow: 0 0 20px rgba(219, 39, 119, 0.1);
}

.support-icon {
    width: 46px;
    height: 46px;
    background: var(--gradient-pink);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 6px 18px rgba(219, 39, 119, 0.2);
    transition: var(--transition);
}

.support-option:hover .support-icon {
    transform: scale(1.05) rotate(5deg);
}

.support-info h4 {
    margin-bottom: 3px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.support-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* WITHDRAWAL SUCCESS */
.withdraw-success {
    text-align: center;
    padding: 32px;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid var(--success);
    background: var(--bg-card);
}

.success-checkmark .check-icon .icon-line {
    height: 4px;
    background-color: var(--success);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
    top: 42px;
    left: 14px;
    width: 24px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
    top: 36px;
    right: 8px;
    width: 44px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 17px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 17px;
    }

    70% {
        width: 46px;
        left: -6px;
        top: 35px;
    }

    84% {
        width: 15px;
        left: 19px;
        top: 44px;
    }

    100% {
        width: 24px;
        left: 14px;
        top: 42px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 42px;
        top: 50px;
    }

    65% {
        width: 0;
        right: 42px;
        top: 50px;
    }

    84% {
        width: 50px;
        right: 0px;
        top: 33px;
    }

    100% {
        width: 44px;
        right: 8px;
        top: 36px;
    }
}

.withdraw-success h3 {
    color: var(--success);
    font-size: 20px;
    margin-bottom: 8px;
}

/* RIPPLE EFFECT */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(184, 134, 11, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .hero-amount {
        font-size: 36px;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .refer-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .profile-stats {
        flex-direction: column;
    }

    .amount-presets {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-right {
        gap: 8px;
    }

    .theme-toggle {
        width: 44px;
        height: 24px;
    }
}

/* Theme Toggle Switch Styles */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--gradient-gold-subtle);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--border-glow);
    box-shadow: var(--card-glow);
}

.theme-toggle i {
    font-size: 12px;
    z-index: 2;
    transition: var(--transition);
}

#theme-icon-sun {
    color: var(--gold);
}

#theme-icon-moon {
    color: var(--text-light);
}

.toggle-slider {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient-gold);
    border-radius: 50%;
    left: 4px;
    transition: var(--transition);
    box-shadow: var(--gold-glow);
}

[data-theme="dark"] .toggle-slider {
    left: calc(100% - 24px);
    background: var(--gradient-gold);
}

[data-theme="dark"] #theme-icon-sun {
    color: var(--text-light);
}

[data-theme="dark"] #theme-icon-moon {
    color: var(--gold);
}


#tree-container { width: 100%; height: 500px; background: rgba(255,255,255,0.05); border-radius: 15px; overflow: hidden; }
/* Modal Styles */
.hidden { 
    display: none !important; 
}
/*.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; display: flex; align-items: center; justify-content: center; }*/
.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    z-index: 9999 !important; /* Ensure it stays on top */
    display: none; /* Changed from flex to none by default */
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(5px);
}

/* This class will be added/removed by JS */
.modal:not(.hidden) {
    display: flex !important;
}
.modal-content { background: #1a1a1a; padding: 20px; border-radius: 20px; width: 90%; max-width: 400px; color: white; border: 1px solid #D4A017; }
.modal-row { display: flex; justify-content: space-between; margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.close-btn { background: #D4A017; border: none; padding: 10px; width: 100%; border-radius: 10px; color: black; font-weight: bold; margin-top: 10px; }
/* Add horizontal padding to the network container */
#tree-container {
    padding: 0 20px;
    box-sizing: border-box;
}

/* Remove default OrgChart buttons (Edit/Share/PDF) */
[data-n-id] rect {
    fill: #1a1a1a; /* Dark node background */
    stroke: #D4A017; /* Gold border */
}

/* Clean Modal Design without Edit/PDF/Share icons */
.modal-content {
    padding: 25px;
    background: #111;
    border: 2px solid #D4A017;
    border-radius: 15px;
    text-align: left;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
    font-size: 14px;
}

.modal-row span:first-child {
    color: #888; /* Label color */
    font-weight: 500;
}

.modal-row span:last-child {
    color: #fff; /* Value color */
    font-weight: 700;
}

/* Highlight specific values */
.text-gold { color: #D4A017 !important; }
.text-green { color: #4CAF50 !important; }