@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* 🔮 Rich Royal Purple & Violet Web3 Theme */
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: #f5f3ff;
    --primary-grad: linear-gradient(135deg, #581c87 0%, #7c3aed 50%, #c026d3 100%);
    --primary-grad-reverse: linear-gradient(135deg, #c026d3 0%, #7c3aed 50%, #581c87 100%);
    --primary-glow: rgba(124, 58, 237, 0.3);
    
    --accent-emerald: #10b981;
    --accent-emerald-light: #ecfdf5;
    --accent-gold: #f59e0b;
    --accent-gold-light: #fffbeb;
    --accent-rose: #f43f5e;
    --accent-rose-light: #fff1f2;
    --accent-cyan: #06b6d4;
    
    --bg-main: #f5f3ff;
    --bg-card: #ffffff;
    --bg-card-subtle: #ede9fe;
    
    --text-main: #1e1b4b;
    --text-muted: #6b7280;
    --text-subtle: #9ca3af;
    
    --border-color: #ede9fe;
    --border-light: #f5f3ff;
    
    --shadow-sm: 0 2px 6px rgba(124, 58, 237, 0.05);
    --shadow-md: 0 10px 25px -4px rgba(124, 58, 237, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 40px -8px rgba(124, 58, 237, 0.25);
    
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #1e1136;
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 85px;
    overflow-x: hidden;
}

/* Base Wrapper for layout (App Mobile Container) */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--bg-main);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

@media (min-width: 769px) {
    body {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 15px;
        padding-bottom: 15px;
        background: radial-gradient(circle at top, #2e1065 0%, #0f051d 100%);
    }
    .app-container {
        min-height: 96vh;
        border-radius: 28px;
        overflow: hidden;
        border: 1px solid rgba(168, 85, 247, 0.2);
    }
}

/* Header & Hamburger Menu */
.app-header {
    background: var(--primary-grad);
    padding: 22px 20px 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: relative;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.app-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-align: center;
    flex: 1;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hamburger-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Top Navigation Bar */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--primary-grad);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

.top-nav-bar h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 13.5px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Drawer / Sidebar Navigation */
.sidebar-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 82%;
    max-width: 340px;
    height: 100%;
    background-color: #ffffff;
    z-index: 1000;
    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 15px 0 40px rgba(0,0,0,0.3);
    padding: 30px 20px;
    overflow-y: auto;
}

.sidebar-drawer.active {
    left: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 5, 29, 0.65);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: none;
}

.drawer-overlay.active {
    display: block;
}

.drawer-logo {
    font-size: 23px;
    font-weight: 800;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.drawer-menu-list {
    list-style: none;
}

.drawer-menu-item {
    margin-bottom: 6px;
}

.drawer-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.drawer-menu-link:hover, .drawer-menu-item.active .drawer-menu-link {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
}

.drawer-menu-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    color: var(--primary);
}

/* User Profile Banner (Dashboard) */
.profile-banner {
    background: var(--primary-grad);
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
    padding: 15px 24px 45px 24px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.35);
}

.profile-banner::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -30%;
    width: 160%;
    height: 180%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 65%);
    pointer-events: none;
}

.profile-avatar-wrap {
    position: relative;
    width: 105px;
    height: 105px;
    margin: 0 auto 12px auto;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.25));
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: white;
}

.profile-username {
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.profile-rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.profile-rank-badge i {
    color: #fde047;
}

/* Cards Grid (Dashboard Stats) */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 18px;
    margin-top: -28px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card:first-child .stat-icon-box {
    background: var(--accent-emerald-light);
    color: var(--accent-emerald);
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.stat-card:first-child .stat-value {
    color: #059669;
}

.stat-currency {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 2px;
}

/* General Layout Card */
.content-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    margin: 18px;
    padding: 22px 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.card-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-grad);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Weekly Earners list */
.earner-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.earner-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fdfaff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.earner-item:hover {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

.earner-rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.earner-rank-badge.rank-1 { background-color: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.earner-rank-badge.rank-2 { background-color: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.earner-rank-badge.rank-3 { background-color: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }

.earner-profile-pic {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 8px;
    margin-right: 12px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.earner-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.earner-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.earner-amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}

/* Chart Container and layout */
.activity-box {
    display: flex;
    gap: 14px;
}

.activity-legend-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 115px;
}

.activity-legend-card {
    background-color: #fdfaff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-legend-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.activity-legend-val {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--primary);
}

.activity-chart-canvas-wrap {
    flex: 1;
    height: 160px;
    position: relative;
}

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 68px;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 990;
    box-shadow: 0 -4px 20px rgba(124, 58, 237, 0.08);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    flex: 1;
    padding: 8px 0;
    transition: all 0.2s ease;
}

.bottom-nav-item i {
    font-size: 19px;
    transition: transform 0.2s ease;
}

.bottom-nav-item:hover i {
    transform: translateY(-2px);
}

.bottom-nav-item.active {
    color: var(--primary);
    font-weight: 800;
}

.bottom-nav-item.active i {
    transform: translateY(-2px) scale(1.1);
    color: var(--primary);
}

/* Forms & UI Elements */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-primary {
    display: block;
    width: 100%;
    background: var(--primary-grad);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.2px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: all 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.45);
    transform: translateY(-1px);
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* E-Commerce Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    background-color: #f5f3ff;
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.product-cat {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.product-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.real-price {
    font-size: 11.5px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.disc-price {
    font-size: 14.5px;
    font-weight: 800;
    color: #ef4444;
}

.add-cart-btn {
    background: var(--primary-grad);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    text-align: center;
    transition: all 0.15s;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.add-cart-btn:hover {
    transform: scale(1.02);
}

/* Cart Item List */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.cart-details {
    flex: 1;
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Badge list styles */
.badge-secondary {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border-color);
}

/* Grid Details List */
.details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f3ff;
}

.details-label {
    color: var(--text-muted);
    font-weight: 600;
}

.details-val {
    font-weight: 700;
    color: var(--text-main);
}

/* Floating Actions */
.copy-link-box {
    display: flex;
    gap: 10px;
}

.copy-input {
    flex: 1;
    font-family: monospace;
    font-size: 12.5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* Admin Panel Styles (Deep Royal Theme) */
.admin-layout {
    display: flex;
    min-height: 100vh;
    max-width: 100% !important;
    margin: 0;
    background-color: #f8fafc;
}

.admin-sidebar {
    width: 260px;
    background-color: #1a0b2e !important;
    color: #c4b5fd !important;
    padding: 25px 15px;
    flex-shrink: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.admin-sidebar h2 {
    color: #ffffff !important;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    background: var(--primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-sidebar a {
    color: #e9d5ff !important;
    border-radius: 10px;
    transition: all 0.2s;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    background: var(--primary-grad) !important;
    color: #ffffff !important;
    transform: translateX(4px);
}

.admin-card-summary {
    background: #ffffff;
    border-left: 4px solid var(--primary);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    font-size: 13.5px;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.admin-table th, .admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: #faf5ff;
    font-weight: 800;
    color: #581c87;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Utilities */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.text-success { color: #059669; }
.text-danger { color: #e11d48; }
.text-warning { color: #d97706; }
.w-full { width: 100%; }

/* Landing Page Hero & Cards */
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.landing-hero {
    background: var(--primary-grad);
    color: white;
    padding: 55px 20px 45px 20px;
    text-align: center;
    border-bottom-left-radius: 36px;
    border-bottom-right-radius: 36px;
    box-shadow: 0 12px 35px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 150%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 65%);
    pointer-events: none;
}

.landing-hero h1 {
    font-size: 29px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.landing-hero p {
    font-size: 14.5px;
    opacity: 0.95;
    line-height: 1.5;
    margin-bottom: 24px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d8b4fe;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
