/* CSS Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #0d0f12;
    --card-bg: #1a1d24;
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --text-dark-gray: #6b7280;
    --btn-secondary-bg: #2a2d35;
    --nav-bg: #121419;
    --nav-border: #222;
    
    --green-primary: #22c55e;
    --green-dark: #16a34a;
    --orange: #f59e0b;
    --purple: #a855f7;
    --blue: #3b82f6;
    --border-radius: 16px;
}

body.light-mode {
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-white: #1f2937;
    --text-gray: #6b7280;
    --text-dark-gray: #9ca3af;
    --btn-secondary-bg: #e5e7eb;
    --nav-bg: #ffffff;
    --nav-border: #e5e7eb;
}

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.app-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background-color: var(--bg-color);
    position: relative;
    padding-bottom: 120px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 45px; height: 45px; border-radius: 50%;
    background: linear-gradient(45deg, #555, #222);
    display: flex; justify-content: center; align-items: center;
    font-size: 24px; color: white;
}
.user-text h1 { font-size: 18px; font-weight: 600; }
.user-text h1 span { margin-left: 4px; }
.user-text p { font-size: 13px; color: var(--text-gray); }

.header-icons { display: flex; gap: 10px; align-items: center; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background-color: var(--card-bg); display: flex; justify-content: center;
    align-items: center; font-size: 16px; cursor: pointer; border: none;
    color: var(--text-white); position: relative; transition: background-color 0.3s, color 0.3s;
}
.icon-btn .dot {
    position: absolute; top: 8px; right: 10px; width: 6px; height: 6px;
    background-color: var(--green-primary); border-radius: 50%;
}

/* Toggle Switch */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { display: inline-block; height: 24px; position: relative; width: 48px; }
.theme-switch input { display: none; }
.slider {
    background-color: var(--btn-secondary-bg); bottom: 0; cursor: pointer; left: 0;
    position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px;
}
.slider:before {
    background-color: var(--green-primary); bottom: 4px; content: ""; height: 16px;
    left: 4px; position: absolute; transition: .4s; width: 16px; border-radius: 50%;
}
input:checked + .slider { background-color: var(--card-bg); }
input:checked + .slider:before { transform: translateX(24px); }

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #1a4029, #0d1f14);
    border-radius: var(--border-radius); padding: 30px; position: relative;
    overflow: hidden; border: 1px solid #2a4633; margin-bottom: 24px; color: white;
}
body.light-mode .balance-card {
    background: linear-gradient(135deg, #16a34a, #15803d); border-color: #166534;
}

.balance-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; color: #d1d5db; font-size: 15px;
}

.balance-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.wallet-icon-large {
    width: 50px; height: 50px; background-color: rgba(34, 197, 94, 0.1);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 24px; color: var(--green-primary);
}
.balance-amount { font-size: 42px; font-weight: 700; margin-bottom: 5px; }
.balance-growth { color: var(--green-primary); font-size: 14px; margin-bottom: 25px; }
.balance-growth span { color: #d1d5db; }

/* Action Buttons */
.action-buttons { display: flex; gap: 12px; width: 100%; max-width: 500px; }
.btn {
    flex: 1; padding: 14px; border-radius: 10px; border: none; font-size: 15px;
    font-weight: 500; cursor: pointer; display: flex; justify-content: center;
    align-items: center; gap: 8px; transition: opacity 0.2s, background-color 0.3s;
}
.btn:hover { opacity: 0.9; }
.btn-primary { background-color: var(--green-primary); color: #000; }
.btn-secondary { background-color: var(--btn-secondary-bg); color: var(--text-white); }

/* Quick Actions */
.quick-actions {
    background-color: var(--card-bg); border-radius: var(--border-radius); padding: 20px;
    display: flex; justify-content: space-around; margin-bottom: 24px; width: 100%;
}
.action-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.action-icon { width: 45px; height: 45px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 18px; }
.action-item p { font-size: 13px; color: var(--text-gray); }

/* Invite Card - CAROUSEL STYLES */
.invite-carousel {
    margin-bottom: 24px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.invite-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.invite-slide {
    min-width: 100%;
    background: linear-gradient(135deg, #1a2623, #0f1a17);
    padding: 30px;
    position: relative;
    overflow: hidden;
    color: white;
}

body.light-mode .invite-slide {
    background: linear-gradient(135deg, #ffffff, #e5e7eb);
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.invite-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.invite-content h3 { font-size: 18px; margin-bottom: 5px; }
.invite-content h3 span { color: var(--green-primary); }
.invite-content p { font-size: 14px; color: #9ca3af; margin-bottom: 15px; line-height: 1.5; }
body.light-mode .invite-content p { color: #4b5563; }

.invite-graphic { position: absolute; right: 50px; top: 50%; transform: translateY(-50%); font-size: 120px; opacity: 0.2; color: var(--green-primary); z-index: 1; }

.invite-graphic-badge {
    position: absolute; right: 150px; bottom: 30px; background: var(--green-primary); color: #000;
    width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-weight: 700; font-size: 14px; z-index: 3; border: 3px solid #0d1714;
}

/* Carousel Dots */
.pagination-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dark-gray);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.dot.active {
    width: 24px;
    border-radius: 5px;
    background: var(--green-primary);
}

/* Sections */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; margin-top: 30px; }
.section-header h2 { font-size: 18px; }
.section-header a { color: var(--green-primary); font-size: 14px; text-decoration: none; }

/* Overview Grid - Updated to ensure 3 columns always */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    min-width: 0;
    width: 100%;
}

.stat-label { font-size: 12px; color: var(--text-gray); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 18px; font-weight: 600; margin-bottom: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card svg { width: 100%; height: 25px; margin-top: 10px; }
.stat-growth { font-size: 11px; margin-top: 5px; }
.stat-growth.green { color: var(--green-primary); }
.stat-growth.orange { color: var(--orange); }
.stat-growth.purple { color: var(--purple); }

/* PLAN SECTION - DAYS FORMAT */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 24px;
}

.plan-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid transparent;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-3px);
    border-color: var(--green-primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.plan-card.featured {
    border: 2px solid var(--green-primary);
    background-color: rgba(34, 197, 94, 0.05);
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--green-primary);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 20px;
    text-transform: uppercase;
}

.plan-header { margin-bottom: 12px; }
.plan-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.plan-price { font-size: 20px; font-weight: 700; color: var(--green-primary); }
.plan-price span { font-size: 12px; font-weight: 400; color: var(--text-gray); }

.plan-features { list-style: none; margin-bottom: 12px; }
.plan-features li { font-size: 12px; color: var(--text-gray); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.plan-features li i { color: var(--green-primary); font-size: 11px; }

.btn-plan {
    width: 100%;
    background-color: var(--btn-secondary-bg);
    color: var(--text-white);
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s, color 0.2s;
}

.btn-plan:hover { background-color: var(--green-primary); color: #000; }

/* Recent Activity */
.activity-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 15px;
}

.activity-item {
    background-color: var(--card-bg); border-radius: 12px; padding: 15px;
    display: flex; align-items: center; justify-content: space-between;
}
.activity-left { display: flex; align-items: center; gap: 15px; }
.activity-icon {
    width: 40px; height: 40px; border-radius: 50%; background-color: rgba(34, 197, 94, 0.2);
    color: var(--green-primary); display: flex; justify-content: center; align-items: center;
}
.activity-text h4 { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.activity-text p { font-size: 13px; color: var(--text-gray); }
.activity-right { text-align: right; }
.activity-right .amount { color: var(--green-primary); font-size: 14px; font-weight: 600; display: block; margin-bottom: 3px; }
.activity-right .time { color: var(--text-dark-gray); font-size: 12px; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--nav-bg);
    border-top: 1px solid var(--nav-border); display: flex; justify-content: space-between; padding: 15px 30px; z-index: 10;
}
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--text-dark-gray);
    cursor: pointer; background: none; border: none; font-family: inherit; font-size: 14px;
}
.nav-item i { font-size: 20px; }
.nav-item span { font-size: 12px; font-weight: 500; }
.nav-item.active { color: var(--green-primary); }
.nav-item.active i { background-color: rgba(34, 197, 94, 0.15); padding: 8px; border-radius: 12px; margin-bottom: -5px; }

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
}

.auth-container h2 {
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-gray);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--btn-secondary-bg);
    border-radius: 8px;
    background-color: var(--bg-color);
    color: var(--text-white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--green-primary);
}

.error-message {
    background-color: #dc2626;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background-color: var(--green-primary);
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .plans-grid { grid-template-columns: 1fr; }
    .action-buttons { max-width: 100%; }
    .activity-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body { padding: 15px; }
    .stat-card { padding: 10px; height: 110px; }
    .stat-label { font-size: 10px; }
    .stat-value { font-size: 14px; }
    .stat-growth { font-size: 10px; }
    .plans-grid { grid-template-columns: 1fr; gap: 10px; }
    .plan-card { padding: 12px; }
    .plan-price { font-size: 16px; }
    .plan-price span { font-size: 10px; }
    .plan-features li { font-size: 11px; margin-bottom: 4px; }
    .bottom-nav { padding: 15px 10px; justify-content: space-around; }
    .balance-amount { font-size: 32px; }
    .invite-graphic { right: 0; font-size: 80px; }
    .invite-graphic-badge { right: 10px; bottom: 10px; width: 45px; height: 45px; }
    .overview-grid { grid-template-columns: 1fr; }
}
/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.notification-item.unread {
    border-left: 3px solid var(--green-primary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.notification-content p {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-dark-gray);
}

.unread-dot {
    width: 10px;
    height: 10px;
    background: var(--green-primary);
    border-radius: 50%;
}

/* Help Page */
.help-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.help-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
}

.help-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.help-card h3 {
    margin-bottom: 20px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--btn-secondary-bg);
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--green-primary);
}

.faq-item p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.6;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
}

.contact-method i {
    font-size: 20px;
    color: var(--green-primary);
}

.contact-method h4 {
    font-size: 13px;
    margin-bottom: 3px;
}

.contact-method p {
    font-size: 12px;
    color: var(--text-gray);
}

.security-tips {
    list-style: none;
}

.security-tips li {
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-tips i {
    color: var(--green-primary);
}

/* Ranking Page */
.ranking-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    padding: 30px 0;
}

.podium-item {
    text-align: center;
    flex: 1;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.podium-position {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--green-primary);
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    margin-bottom: 10px;
}

.podium-item .user-avatar {
    width: 60px;
    height: 60px;
    font-size: 30px;
    margin-bottom: 10px;
}

.podium-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.podium-item p {
    font-size: 13px;
    color: var(--green-primary);
    margin-bottom: 10px;
}

.podium-stand {
    width: 100%;
    background: var(--card-bg);
    border-radius: 8px 8px 0 0;
    padding: 20px;
    text-align: center;
    font-weight: 600;
}

.podium-item.first .podium-stand {
    height: 80px;
}

.podium-item.second .podium-stand {
    height: 60px;
}

.podium-item.third .podium-stand {
    height: 40px;
}

.ranking-list {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.ranking-item:hover {
    background: var(--bg-color);
}

.ranking-item.current-user {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--green-primary);
}

.rank-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--btn-secondary-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
}

.ranking-info {
    flex: 1;
}

.ranking-info h4 {
    font-size: 13px;
    margin-bottom: 3px;
}

.ranking-info p {
    font-size: 11px;
    color: var(--text-gray);
}

.ranking-earnings {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-primary);
}

/* Profile Page */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Payment Methods */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.payment-method-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.payment-method-card:hover {
    transform: translateY(-3px);
}

.payment-method-card.selected {
    border-color: var(--green-primary);
    background: rgba(34, 197, 94, 0.05);
}

.payment-method-card i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--green-primary);
}

.payment-method-card h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.payment-method-card p {
    font-size: 12px;
    color: var(--text-gray);
}
/* Updated Bottom Navigation for 6 items */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    border-top: 1px solid var(--nav-border);
    display: flex;
    justify-content: space-around;
    padding: 10px 15px;
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-dark-gray);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    flex: 1;
    padding: 5px;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 18px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--green-primary);
}

.nav-item.active i {
    background-color: rgba(34, 197, 94, 0.15);
    padding: 8px;
    border-radius: 12px;
    margin-bottom: -5px;
}

@media (max-width: 600px) {
    .bottom-nav {
        padding: 10px 5px;
    }
    
    .nav-item span {
        font-size: 9px;
    }
    
    .nav-item i {
        font-size: 16px;
    }
}
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--orange);
}

.status-badge.approved {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-primary);
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-badge.completed {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}