/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Gold & Green Color Palette */
    --gold: #D4AF37;
    --gold-light: #F4D03F;
    --gold-dark: #B8860B;
    --green: #27AE60;
    --green-light: #2ECC71;
    --green-dark: #219653;
    --blue: #3498DB;
    --purple: #6366F1;
    --purple-light: #8B5CF6;
    --purple-dark: #4F46E5;
    --orange: #E67E22;
    --red: #E74C3C;
    
    /* Purple Background Colors */
    --bg-dark: #1A1A2E;
    --bg-darker: #16213E;
    --bg-light: #0F3460;
    --bg-lighter: #1E3A8A;
    
    /* Neutral Colors */
    --dark: #1A1A2E;
    --darker: #0F3460;
    --light: #E2E8F0;
    --gray: #94A3B8;
    --gray-light: #CBD5E1;
    --white: #FFFFFF;
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, var(--gold), var(--gold-light));
    --gradient-green: linear-gradient(135deg, var(--green), var(--green-light));
    --gradient-blue: linear-gradient(135deg, var(--blue), #2980B9);
    --gradient-purple: linear-gradient(135deg, var(--purple), var(--purple-light));
    --gradient-bg: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --shadow-purple: 0 4px 20px rgba(99, 102, 241, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-full: 50px;
    
    /* Tier Colors */
    --bronze: #CD7F32;
    --silver: #C0C0C0;
    --gold-tier: #FFD700;
    --platinum: #E5E4E2;
    --emerald: #50C878;
    --ruby: #E0115F;
    --sapphire: #0F52BA;
    --diamond: #B9F2FF;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: var(--gradient-bg);
    color: var(--light);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--white);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.section-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Header */
.header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 2.25rem;
    color: var(--gold);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    padding: 0.75rem 0;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

.wallet-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.wallet-address {
    font-family: 'Monaco', 'Courier New', monospace;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--gold-light);
}

.wallet-balance {
    font-weight: 600;
    color: var(--green-light); /* GREEN COLOR for balance */
    font-size: 0.875rem;
}

.btn-wallet {
    background: var(--gradient-gold);
    color: var(--dark);
    border: none;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
}

.btn-wallet:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gold);
    cursor: pointer;
}

/* Main Content */
.main-content {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

/* Connect Section */
.connect-section {
    max-width: 600px;
    margin: 6rem auto;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.connect-card {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.connect-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

.connect-icon {
    font-size: 5rem;
    color: var(--gold);
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.gold-icon {
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.connect-btn {
    width: 100%;
    max-width: 300px;
    margin: 2.5rem auto;
    display: block;
    font-size: 1.2rem;
    padding: 1.25rem;
    background: var(--gradient-gold);
    color: var(--dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-gold);
}

.connect-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.connect-info {
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: left;
    margin: 2rem 0;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.connect-info p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--gray-light);
}

.connect-info i {
    color: var(--gold);
    width: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(212, 175, 55, 0.1);
}

.feature i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.feature h4 {
    color: var(--gold-light);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.gold::before { background: var(--gradient-gold); }
.stat-card.green::before { background: var(--gradient-green); } /* GREEN for earnings */
.stat-card.blue::before { background: var(--gradient-blue); }
.stat-card.purple::before { background: var(--gradient-purple); }

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.75rem;
    flex-shrink: 0;
}

.stat-card.gold .stat-icon { background: var(--gradient-gold); }
.stat-card.green .stat-icon { background: var(--gradient-green); } /* GREEN for earnings */
.stat-card.blue .stat-icon { background: var(--gradient-blue); }
.stat-card.purple .stat-icon { background: var(--gradient-purple); }

.stat-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    color: var(--white);
}

.stat-info p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 3rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.button-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

.action-btn {
    background: rgba(26, 26, 46, 0.9);
    border: none;
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.action-btn.gold::before { background: var(--gradient-gold); }
.action-btn.green::before { background: var(--gradient-green); } /* GREEN for withdraw */
.action-btn.blue::before { background: var(--gradient-blue); }
.action-btn.purple::before { background: var(--gradient-purple); }

.action-btn:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.action-btn i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.action-btn.gold i { color: var(--gold); }
.action-btn.green i { color: var(--green); } /* GREEN icon for withdraw */
.action-btn.blue i { color: var(--blue); }
.action-btn.purple i { color: var(--purple); }

.action-btn span {
    display: block;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.action-btn small {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Tiers Section - UPDATED WITH ALL 8 TIERS */
.tiers-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tier-card {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 420px;
}

.tier-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

/* Tier-specific hover border colors */
.tier-card.tier-bronze:hover { border-color: var(--bronze); }
.tier-card.tier-silver:hover { border-color: var(--silver); }
.tier-card.tier-gold:hover { border-color: var(--gold-tier); }
.tier-card.tier-platinum:hover { border-color: var(--platinum); }
.tier-card.tier-emerald:hover { border-color: var(--emerald); }
.tier-card.tier-ruby:hover { border-color: var(--ruby); }
.tier-card.tier-sapphire:hover { border-color: var(--sapphire); }
.tier-card.tier-diamond:hover { border-color: var(--diamond); }

/* For Diamond and Sapphire tiers */
.tier-diamond::before,
.tier-sapphire::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: rotate(30deg);
    animation: shine 3s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* Tier Badge Colors - ALL 8 TIERS */
.tier-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.5rem 1.25rem;
    border-bottom-left-radius: var(--radius);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--dark);
}

.tier-bronze .tier-badge { 
    background: var(--bronze); 
    color: var(--dark);
}
.tier-silver .tier-badge { 
    background: var(--silver); 
    color: var(--dark);
}
.tier-gold .tier-badge { 
    background: var(--gold-tier); 
    color: var(--dark);
}
.tier-platinum .tier-badge { 
    background: var(--platinum); 
    color: var(--dark);
}
.tier-emerald .tier-badge { 
    background: var(--emerald); 
    color: var(--dark);
}
.tier-ruby .tier-badge { 
    background: var(--ruby); 
    color: var(--white);
}
.tier-sapphire .tier-badge { 
    background: var(--sapphire); 
    color: var(--white);
}
.tier-diamond .tier-badge { 
    background: var(--diamond); 
    color: var(--dark);
}

/* Tier Price Styling */
.tier-price {
    margin: 1rem 0 1.5rem; /* Added top margin */
    text-align: center;
    position: relative;
    z-index: 5; /* Ensure price stays above badge background */
}

.price {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* Helps text stand out */
}

.price-sub {
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Tier Features */
.tier-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.tier-features li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-light);
}

.tier-features i {
    color: var(--green);
    font-size: 0.875rem;
}

.tier-features strong {
    color: var(--white);
}

/* Tier Progress */
.tier-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Different progress bar colors for each tier */
.tier-bronze .progress-fill { background: var(--bronze); }
.tier-silver .progress-fill { background: var(--silver); }
.tier-gold .progress-fill { background: var(--gradient-gold); }
.tier-platinum .progress-fill { background: var(--platinum); }
.tier-emerald .progress-fill { background: var(--emerald); }
.tier-ruby .progress-fill { background: var(--ruby); }
.tier-sapphire .progress-fill { background: var(--sapphire); }
.tier-diamond .progress-fill { background: var(--gradient-gold); }

.progress-text {
    font-size: 0.875rem;
    color: var(--gray);
    display: block;
    text-align: center;
}

/* Tier Button Colors - ALL 8 TIERS */
.tier-btn {
    width: 100%;
    padding: 1rem;
    color: var(--dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
}

.bronze-btn { 
    background: var(--bronze); 
    color: var(--dark);
}
.silver-btn { 
    background: var(--silver); 
    color: var(--dark);
}
.gold-btn { 
    background: var(--gradient-gold); 
    color: var(--dark);
}
.platinum-btn { 
    background: var(--platinum); 
    color: var(--dark);
}
.emerald-btn { 
    background: var(--emerald); 
    color: var(--dark);
}
.ruby-btn { 
    background: var(--ruby); 
    color: var(--white);
}
.sapphire-btn { 
    background: var(--sapphire); 
    color: var(--white);
}
.diamond-btn { 
    background: var(--gradient-gold); 
    color: var(--dark);
}

.tier-btn:hover:not(.locked):not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.tier-btn.locked,
.tier-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-btn.locked:hover,
.tier-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Loading state */
.tier-btn.loading {
    color: transparent;
    pointer-events: none;
}

.tier-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 1s linear infinite;
}

/* Tier Status (for Diamond Crown) */
.tier-status {
    text-align: center;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: var(--radius);
    margin-top: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.tier-status i {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.tier-status span {
    color: var(--gold-light);
    font-size: 0.875rem;
}

/* Completed Tier Styling */
.tier-card.completed-tier {
    opacity: 0.8;
    filter: grayscale(30%);
    border: 1px solid var(--green) !important;
}

.tier-card.completed-tier .tier-badge {
    background: var(--green) !important;
    color: var(--dark) !important;
}

.tier-card.completed-tier .price {
    color: var(--green) !important;
}

.tier-card.completed-tier .tier-features li i {
    color: var(--green) !important;
}

/* Current Tier Styling */
.tier-card.current-tier {
    border: 2px solid var(--gold);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
    transform: scale(1.02);
}

/* Responsive Design for Tiers */
@media (max-width: 1024px) {
    .tiers-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.75rem;
    }
}

@media (max-width: 768px) {
    .tiers-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .tier-card {
        padding: 1.5rem;
    }
    
    .price {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .tiers-container {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .tier-card {
        padding: 1.25rem;
    }
}

/* For very small screens */
@media (max-width: 380px) {
    .tier-diamond .tier-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        max-width: 70%;
    }
}

/* Earnings Section */
.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.earning-card {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.earning-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.earning-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.earnings-icon {
    font-size: 2.25rem;
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.earnings-icon.daily { background: rgba(52, 152, 219, 0.1); color: var(--blue); border: 1px solid rgba(52, 152, 219, 0.2); }
.earnings-icon.pool { background: rgba(39, 174, 96, 0.1); color: var(--green); border: 1px solid rgba(39, 174, 96, 0.2); } /* GREEN for pool */
.earnings-icon.referral { background: rgba(155, 89, 182, 0.1); color: var(--purple); border: 1px solid rgba(155, 89, 182, 0.2); }
.earnings-icon.bonus { background: rgba(230, 126, 34, 0.1); color: var(--orange); border: 1px solid rgba(230, 126, 34, 0.2); }

.earning-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.earning-desc {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.earning-timer,
.earning-info,
.referral-levels,
.bonus-milestones {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--gray-light);
}

.referral-levels {
    justify-content: space-between;
}

.level-badge {
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.bonus-milestones {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.milestone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.milestone i {
    color: var(--gray);
}

.milestone.completed i {
    color: var(--green); /* GREEN for completed milestones */
}

/* Referral Section */
.referral-card {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.referral-link-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.referral-link-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--gold-light);
}

.referral-link-box input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.copy-btn {
    padding: 1rem 2rem;
    background: var(--gradient-gold);
    color: var(--dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.referral-stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--gray);
    font-size: 0.95rem;
}

.commission-rates h4 {
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.25rem;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.rate-card {
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.rate-card:hover {
    transform: translateY(-5px);
    background: rgba(212, 175, 55, 0.1);
}

.rate-level {
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.rate-percent {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.rate-desc {
    color: var(--gray-light);
    font-size: 0.875rem;
}

/* Admin Panel */
.admin-panel {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gold);
    margin-bottom: 2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.admin-card {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.admin-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.admin-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-stat {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.admin-stat span {
    color: var(--gray-light);
    font-weight: 500;
}

.admin-stat strong {
    color: var(--gold-light);
    font-size: 1.1rem;
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-btn {
    padding: 1rem 1.5rem;
    background: var(--gradient-gold);
    color: var(--dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.withdraw-form {
    display: flex;
    gap: 1rem;
}

.admin-input {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
}

.admin-input:focus {
    outline: none;
    border-color: var(--gold);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 52, 96, 0.95);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    animation: modalSlideIn 0.3s ease-out;
    z-index: 1002;
    margin: auto; /* Center vertically */
}

/* Ensure modal is always on top */
.modal.active {
    display: flex !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    z-index: 1003;
}

.close-modal:hover {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    transform: rotate(90deg);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Make modal responsive */
@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
        align-items: flex-start; /* Start from top on mobile */
        padding-top: 20vh; /* Give space from top */
    }
    
    .modal-content {
        max-height: 70vh;
        padding: 1.5rem;
        margin-top: 2rem; /* Space from top */
    }
}

.modal h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gold);
    padding-right: 2rem;
}

.team-list {
    max-height: 400px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray);
    font-style: italic;
}

.withdraw-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    font-weight: 600;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group input {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-text {
    color: var(--gray);
    font-size: 0.875rem;
    line-height: 1.5;
}

.modal-btn {
    padding: 1rem 1.5rem;
    color: var(--dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.modal-btn.primary {
    background: var(--gradient-gold);
}

.modal-btn.success {
    background: var(--gradient-green); /* GREEN for success buttons */
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tier-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tier-modal-price {
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.tier-modal-price .price {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tier-modal-price .price-sub {
    color: var(--gray-light);
}

.requirements-box {
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: rgba(212, 175, 55, 0.02);
}

.requirements-box h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.requirement-progress {
    margin: 1.5rem 0;
}

.requirement-met {
    color: var(--green); /* GREEN for met requirements */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(39, 174, 96, 0.1);
    border-radius: var(--radius);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.requirement-not-met {
    color: var(--orange);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(230, 126, 34, 0.1);
    border-radius: var(--radius);
    border: 1px solid rgba(230, 126, 34, 0.2);
}

.modal-actions {
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: rgba(15, 52, 96, 0.95);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-section a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.footer-section a:hover {
    color: var(--gold);
    transform: translateX(5px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: var(--gray);
    flex-wrap: wrap;
    gap: 1rem;
}

.network-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.network-info i {
    color: var(--gold);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 52, 96, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: var(--gold);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--gold);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tiers-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius) var(--radius);
        border-top: 1px solid rgba(212, 175, 55, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .nav-links.active {
    display: flex !important;
}
    
    .menu-toggle {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    z-index: 1001;
}
    
    .wallet-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
        order: 3;
    }
    
    .connect-card {
        padding: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .stats-grid,
    .actions-grid,
    .earnings-grid,
    .tiers-container {
        grid-template-columns: 1fr;
    }
    
    .referral-link-box {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .rates-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .withdraw-form {
        flex-direction: column;
    }
    
    .admin-input {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Selection Styling */
::selection {
    background: var(--gold);
    color: var(--dark);
}

/* Focus Outline */
:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    background: rgba(26, 26, 46, 0.95);
    border-left: 4px solid var(--gold);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast.success { 
    border-left-color: var(--green);
    background: rgba(39, 174, 96, 0.1);
}

.toast.error { 
    border-left-color: var(--red);
    background: rgba(231, 76, 60, 0.1);
}

.toast.info { 
    border-left-color: var(--blue);
    background: rgba(52, 152, 219, 0.1);
}

.toast i {
    font-size: 1.25rem;
    width: 24px;
    flex-shrink: 0;
}

.toast.success i { color: var(--green); }
.toast.error i { color: var(--red); }
.toast.info i { color: var(--blue); }

.toast span {
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.4;
}

@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

/* Responsive toast */
@media (max-width: 768px) {
    .toast-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
        max-width: none;
    }
    
    .toast {
        width: 100%;
    }
}