/* ==========================================================================
   NEXUS MLM - COMPLETE MODERN RESET & DESIGN SYSTEM (RUPEES ₹ VERSION)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. UNIVERSAL MODERN RESET & NORMALIZATION ENGINE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
    border: none;
    background: transparent;
}

button {
    cursor: pointer;
}

ul, ol {
    list-style: none;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   PAGE PRELOADER STYLES
   -------------------------------------------------------------------------- */
.page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 54px;
    height: 54px;
    border: 3.5px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: preloaderSpin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

.preloader-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   2. ROOT DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
    --bg-main:          #f8fafc;
    --bg-card:          #ffffff;
    --bg-secondary:     #f1f5f9;
    --bg-hover:         #e2e8f0;
    
    --border-light:     #e2e8f0;
    --border-subtle:    #f1f5f9;
    
    --primary:          #059669; /* Emerald Primary */
    --primary-hover:    #047857;
    --primary-light:    #d1fae5;
    --primary-glow:     rgba(5, 150, 105, 0.25);
    
    --accent:           #4f46e5; /* Indigo Accent */
    --accent-light:     #e0e7ff;
    
    --gold:             #d97706; /* Crown / Gold Rank */
    --gold-light:       #fef3c7;
    
    --text-primary:     #0f172a;
    --text-secondary:   #475569;
    --text-muted:       #94a3b8;
    --text-on-primary:  #ffffff;
    
    /* Functional Colors */
    --success:          #10b981;
    --warning:          #f59e0b;
    --danger:           #ef4444;
    --info:             #3b82f6;
    
    /* Shadows & Glassmorphism */
    --shadow-sm:        0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md:        0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg:        0 16px 32px -6px rgba(15, 23, 42, 0.12), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow:      0 0 28px rgba(16, 185, 129, 0.2);
    
    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        16px;
    --radius-xl:        24px;
    --radius-full:      9999px;
    
    --font-main:        'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-display:     'Outfit', var(--font-main);
    --header-height:    76px;
}

/* ==========================================================================
   TOP LIVE ANNOUNCEMENT TICKER
   ========================================================================== */
.top-ticker-bar {
    background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 50%, #064e3b 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-track {
    display: inline-block;
    animation: tickerMove 25s linear infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 3rem;
}

.ticker-badge {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
}

@keyframes tickerMove {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.navbar {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    cursor: pointer;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.landing-nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.landing-nav-links a:hover {
    color: var(--primary);
}

.nav-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-secondary);
    padding: 5px;
    border-radius: var(--radius-full);
}

.nav-tab {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    background: transparent;
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    background-color: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wallet-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(79, 70, 229, 0.1));
    border: 1px solid var(--primary-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
}

.btn-dashboard-toggle {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 9px 20px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-dashboard-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.mobile-nav-toggle {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
}

.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: var(--bg-card);
    z-index: 1001;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}

.mobile-drawer-overlay.active .mobile-drawer {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-drawer-links a, .mobile-drawer-links button {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

/* ==========================================================================
   APP CONTAINER & VIEW SWITCHER
   ========================================================================== */
.app-container {
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

.page-view {
    display: none;
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MODERN LANDING PAGE SECTION STYLES
   ========================================================================== */
.hero-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
    padding: 2.5rem 0 4rem 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.2px;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.trust-badges {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trust-item i {
    color: var(--primary);
}

.hero-visual-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.hero-visual-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.visual-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-meta-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.visual-payout-box {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.visual-payout-box h4 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #34d399;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: 4rem;
}

.stat-strip-item {
    text-align: center;
}

.stat-strip-item h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-strip-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.features-section {
    padding: 3rem 0;
}

.section-header-center {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header-center h2 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.section-header-center p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 6px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 2.25rem 1.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.feature-card.accent .feature-icon {
    background: var(--accent-light);
    color: var(--accent);
}

.feature-card.gold .feature-icon {
    background: var(--gold-light);
    color: var(--gold);
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.plan-tabs-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.plan-tabs-header {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
    overflow-x: auto;
}

.plan-tab-btn {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.plan-tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

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

.plan-tab-content.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.plan-content-text h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.plan-content-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.plan-highlight-list {
    list-style: none;
}

.plan-highlight-list li {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.plan-highlight-list li i {
    color: var(--primary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 4rem;
}

.testimonial-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-quote {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
}

.author-info h4 {
    font-size: 0.95rem;
    font-weight: 800;
}

.author-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.author-earnings {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-header {
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.faq-header i {
    transition: transform 0.25s ease;
    color: var(--primary);
}

.faq-item.active .faq-header i {
    transform: rotate(180deg);
}

.faq-body {
    padding: 0 1.5rem 1.25rem 1.5rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-body {
    display: block;
}

.cta-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius-xl);
    padding: 3.5rem 2.5rem;
    color: white;
    text-align: center;
    margin: 4rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.cta-box h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-box p {
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    font-size: 1.05rem;
}

/* ==========================================================================
   MEMBER DASHBOARD STYLES
   ========================================================================== */
.view-section {
    display: none;
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
}

.card-panel {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: all 0.25s ease;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary);
}

.stat-card.accent::before { background-color: var(--accent); }
.stat-card.gold::before { background-color: var(--gold); }
.stat-card.info::before { background-color: var(--info); }

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.stat-change {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.neutral { color: var(--text-muted); }

.referral-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.referral-content h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.referral-content p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.referral-input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 6px 6px 16px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
}

.referral-input-group input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    width: 280px;
}

.referral-input-group button {
    background-color: var(--primary);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.referral-input-group button:hover {
    background-color: var(--primary-hover);
}

.tree-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 2.5rem 1.5rem;
    overflow-x: auto;
    min-height: 550px;
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.tree-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    width: 280px;
}

.search-box input {
    background: transparent;
    border: none;
    width: 100%;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.tree-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.active { background-color: var(--primary); }
.legend-dot.pending { background-color: var(--warning); }
.legend-dot.crown { background-color: var(--gold); }

.tf-tree {
    display: flex;
    justify-content: center;
    text-align: center;
    min-width: 650px;
}

.tf-tree ul {
    padding-top: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.tf-tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 8px 0 8px;
}

.tf-tree li::before, .tf-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid var(--border-light);
    width: 50%;
    height: 20px;
}

.tf-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid var(--border-light);
}

.tf-tree li:only-child::after, .tf-tree li:only-child::before {
    display: none;
}

.tf-tree li:only-child {
    padding-top: 0;
}

.tf-tree li:first-child::before, .tf-tree li:last-child::after {
    border: none;
}

.tf-tree li:last-child::before {
    border-right: 2px solid var(--border-light);
    border-radius: 0 8px 0 0;
}

.tf-tree li:first-child::after {
    border-radius: 8px 0 0 0;
}

.tf-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid var(--border-light);
    width: 0;
    height: 20px;
}

.node-card {
    background-color: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    min-width: 140px;
    display: inline-block;
    position: relative;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.node-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.node-card.crown {
    border-color: var(--gold);
    background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
}

.node-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin: 0 auto 8px auto;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.node-card.active .node-avatar {
    background-color: var(--primary-light);
    color: var(--primary);
}

.node-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.node-rank {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.node-pv {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
    background-color: var(--primary-light);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    display: inline-block;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.package-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-light);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.package-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    transform: scale(1.03);
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    padding: 3px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.package-price {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.package-pv {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.package-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.package-features li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-features li i {
    color: var(--primary);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.calc-control {
    margin-bottom: 1.5rem;
}

.calc-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.range-slider {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--bg-hover);
    accent-color: var(--primary);
    cursor: pointer;
}

.result-box {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.result-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.result-amount {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 8px 0;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
    min-width: 600px;
}

.custom-table th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.status-badge.completed {
    background-color: var(--primary-light);
    color: var(--primary);
}

.status-badge.pending {
    background-color: var(--gold-light);
    color: var(--gold);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 460px;
    width: 90%;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(16px);
    transition: all 0.25s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-close {
    background: var(--bg-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--text-primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.footer {
    border-top: 1px solid var(--border-light);
    background-color: var(--bg-card);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVE MEDIA QUERIES (320px - 992px)
   ========================================================================== */
@media (max-width: 992px) {
    .navbar {
        padding: 0 1.25rem;
    }
    
    .landing-nav-links, .nav-tabs {
        display: none !important;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .user-profile-widget .btn-dashboard-toggle span {
        display: none;
    }

    .user-profile-widget .btn-dashboard-toggle {
        padding: 9px 12px;
    }
    
    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
        padding: 1.5rem 0 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .trust-badges {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .referral-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .referral-input-group {
        width: 100%;
        flex-direction: column;
        gap: 8px;
        background: transparent;
        border: none;
        padding: 0;
    }
    
    .referral-input-group input {
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: 10px 16px;
        border-radius: var(--radius-full);
        text-align: center;
    }

    .referral-input-group button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1.25rem 1rem;
    }
    
    .hero-title {
        font-size: 2.1rem;
        letter-spacing: -0.8px;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-primary, .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .stats-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.25rem;
    }

    .stat-strip-item h3 {
        font-size: 1.5rem;
    }
    
    .section-header-center h2 {
        font-size: 1.85rem;
    }
    
    .package-card.featured {
        transform: none;
    }

    .plan-tabs-container {
        padding: 1.5rem 1rem;
    }

    .plan-tabs-header {
        gap: 8px;
    }

    .plan-tab-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .stats-strip {
        grid-template-columns: 1fr;
    }

    .wallet-badge {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .brand-logo span {
        font-size: 1.15rem;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .node-card {
        min-width: 110px;
        padding: 8px 10px;
    }
    
    .node-name {
        font-size: 0.75rem;
    }

    .node-rank {
        font-size: 0.65rem;
    }

    .node-pv {
        font-size: 0.65rem;
    }
}
