:root {
    /* Dark Mode (Default) variables */
    --bg-color: #0b1121;
    --card-bg: #151f32;
    --text-color: #ffffff;
    --text-muted: #8a9bb7;
    --primary-gradient: linear-gradient(90deg, #2ecc71, #27ae60);
    --input-bg: #1f2a40;
    --border-color: #2c3e50;
    --accent-color: #2ecc71;
    --nav-bg: #0f172a;
}

/* Light Mode Variables class */
.light-mode {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #555;
    --input-bg: #e4e6eb;
    --border-color: #ccc;
    --nav-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile View Width */
    padding: 20px 20px 90px 20px; /* Extra bottom padding for nav */
    position: relative;
}

/* Header */
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.logo { font-weight: bold; font-size: 1.2rem; letter-spacing: 1px; }
.text-warning { color: #f1c40f; }

/* Theme Button */
.theme-btn { background: var(--card-bg); border: none; color: var(--text-color); padding: 10px; border-radius: 50%; cursor: pointer; }

/* Hero */
.hero { text-align: center; margin-bottom: 30px; }
.hero h1 { font-size: 1.8rem; line-height: 1.3; }
.highlight { color: var(--accent-color); }

/* Login Card */
.login-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.input-icon {
    background: #3498db;
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    margin-left: 5px;
}

input {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px;
    width: 100%;
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4); /* Glow effect */
    transition: transform 0.2s;
}
.btn-primary:active { transform: scale(0.98); }

.note { font-size: 0.8rem; text-align: center; margin-top: 10px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 5px;}

/* Plan Card */
.plan-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    border: 1px solid var(--accent-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}
.card-header { color: #f1c40f; font-weight: bold; margin-bottom: 10px; }
.green-text { color: var(--accent-color); font-weight: bold; }

/* Stats */
.stats-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.stat-box {
    background: var(--card-bg);
    flex: 1;
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.stat-box i { font-size: 1.5rem; color: var(--accent-color); }
.stat-box h4 { font-size: 1.1rem; }
.stat-box span { font-size: 0.8rem; color: var(--text-muted); }

/* Live List Styling */
.recent-list-container {
    margin-bottom: 20px;
    /* overflow: hidden; */ /* Optional */
}

.section-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    padding-left: 5px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-bg); 
    /* Slightly different bg for items helps them pop */
    margin-bottom: 5px; 
    border-radius: 8px;
}
.list-item:last-child { border-bottom: none; }

.p-icon { background: #3498db; color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.7rem; margin-right: 5px; }
.amount.positive { color: var(--accent-color); font-weight: bold; }
.amount.negative { color: #e74c3c; font-weight: bold; }

/* Animation Keyframes */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideDown 0.5s ease-out;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    z-index: 100;
}
.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
}
.nav-item.active { color: var(--accent-color); }
.nav-item i { font-size: 1.2rem; margin-bottom: 5px; }
/* ===========================
   PLANS PAGE STYLING
   =========================== */

/* Page Header Title */
.page-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Plan Card Wrapper */
.plan-card-item {
    background: linear-gradient(145deg, var(--card-bg), rgba(255,255,255,0.02));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.plan-card-item:hover {
    transform: translateY(-5px);
}

/* Plan Header (Icon + Name) */
.plan-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #f1c40f; /* Gold default */
}

.plan-head i { font-size: 1.3rem; }

/* Badges (Popular/Running) */
.badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 5px;
    margin-left: 10px;
    text-transform: uppercase;
}
.badge-green { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid #2ecc71; }
.badge-gold { background: rgba(241, 196, 15, 0.2); color: #f1c40f; border: 1px solid #f1c40f; }

/* Plan Details Grid */
.plan-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.detail-row span { display: block; }
.detail-label { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 2px; }
.detail-value { font-weight: bold; color: var(--text-color); }
.text-profit { color: var(--accent-color); }

/* Theme Variations */
/* Turbo Green Theme */
.theme-green { border-color: #2ecc71; box-shadow: 0 0 10px rgba(46, 204, 113, 0.1); }
.theme-green .plan-head { color: #2ecc71; }
.theme-green .btn-invest { background: linear-gradient(90deg, #2ecc71, #27ae60); box-shadow: 0 0 15px rgba(46, 204, 113, 0.4); }

/* Premium Gold Theme */
.theme-gold { border-color: #f1c40f; box-shadow: 0 0 10px rgba(241, 196, 15, 0.1); }
.theme-gold .plan-head { color: #f1c40f; }
.theme-gold .btn-invest { background: linear-gradient(90deg, #f1c40f, #d35400); box-shadow: 0 0 15px rgba(241, 196, 15, 0.4); }

/* Invest Button inside Card */
.btn-invest {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
/* ===========================
   STATS PAGE STYLING
   =========================== */

/* Global Stats Card (Gold/Premium Look) */
.global-stats-card {
    background: linear-gradient(145deg, var(--card-bg), rgba(255,255,255,0.02));
    border: 1px solid #f1c40f; /* Gold border */
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(241, 196, 15, 0.1);
}

.global-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}
.global-row:last-child { border-bottom: none; }

.g-label { color: var(--text-color); font-size: 0.95rem; }
.g-value { font-weight: bold; font-size: 1.1rem; color: #ffffff; }

/* History List Items */
.history-card-item {
    background: var(--input-bg); /* Slightly darker/different than card */
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.h-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.h-type {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.h-amount { font-weight: bold; font-size: 1rem; }
.h-time { font-size: 0.75rem; color: var(--text-muted); text-align: right; }

/* Arrow Colors */
.arrow-down { color: var(--accent-color); } /* Deposit (Green) */
.arrow-up { color: #e74c3c; } /* Payout (Red) */
/* ===========================
   REFERRAL PAGE STYLING
   =========================== */

/* Commission Banner */
.commission-card {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0));
    border: 1px solid #2ecc71;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.commission-card h1 { font-size: 2.5rem; color: #2ecc71; margin-bottom: 5px; }
.commission-card span { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 1px; }

/* How It Works Steps */
.step-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-num {
    background: var(--input-bg);
    color: var(--accent-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-text h4 { font-size: 1rem; margin-bottom: 2px; }
.step-text p { font-size: 0.8rem; color: var(--text-muted); }

/* Login Button for Link */
.btn-get-link {
    background: var(--input-bg);
    border: 1px dashed var(--accent-color);
    color: var(--accent-color);
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}
.btn-get-link:hover { background: rgba(46, 204, 113, 0.1); }
/* ===========================
   DASHBOARD (ACCOUNT) STYLING
   =========================== */

/* Header Profile Icon */
.profile-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
}
.profile-icon:hover { color: var(--text-color); }

/* Balance Card */
.balance-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.balance-title { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 5px; }
.balance-amount { font-size: 2.2rem; font-weight: bold; color: #ffffff; margin-bottom: 20px; }

/* Action Buttons (Deposit/Withdraw) */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-deposit { border: 1px solid #2ecc71; box-shadow: 0 0 10px rgba(46, 204, 113, 0.1); }
.btn-deposit:hover { background: rgba(46, 204, 113, 0.1); }

.btn-withdraw { border: 1px solid #e74c3c; box-shadow: 0 0 10px rgba(231, 76, 60, 0.1); }
.btn-withdraw:hover { background: rgba(231, 76, 60, 0.1); }

/* Active Plan Progress Bar */
.progress-container {
    width: 100%;
    background: rgba(255,255,255,0.1);
    height: 8px;
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%; /* JS or PHP will set this */
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-color);
}

/* Dashboard Stats Grid (3 Columns) */
.dash-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 25px;
}

.mini-stat {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80px;
}

.mini-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 5px; }
.mini-value { font-size: 0.9rem; font-weight: bold; color: var(--accent-color); }
.mini-sub { font-size: 0.65rem; color: var(--text-muted); margin-top: 2px; }
/* ===========================
   DEPOSIT PAGE STYLING
   =========================== */

/* Wallet Display Box */
.wallet-box {
    background: #1f2a40;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    text-align: center;
}

.wallet-label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; display: block; }
.wallet-number { font-size: 1.4rem; font-weight: bold; color: #ffffff; letter-spacing: 1px; }

/* Copy Button */
.btn-copy {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.btn-copy:active { transform: scale(0.95); }

/* Instructions List */
.instruction-list {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    border-left: 3px solid #f1c40f;
}
.instruction-list li {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
}
.instruction-list li i { color: #f1c40f; margin-top: 4px; }
/* Progress Bar Container */
.progress-container {
    width: 100%;
    background: rgba(255,255,255,0.1); /* Halka background taake container dikhe */
    height: 6px;  /* Height zaroori hai */
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

/* Moving Green Line */
.progress-bar {
    height: 100%; /* Parent ki height lega */
    background: var(--accent-color); /* Green Color */
    width: 0%; /* JS isay update karega */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.6); /* Glow Effect */
    transition: width 1s linear; /* Smooth chalne ke liye */
}
/* ===========================
   WHATSAPP FLOAT BUTTON
   =========================== */
.whatsapp-btn {
    position: fixed;
    bottom: 90px; /* Bottom Nav se thoda upar */
    right: 20px;
    background-color: #25d366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #20b958;
    color: white;
}

/* Chamakne wali animation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}