:root {
    /* Design Tokens */
    --primary: #6366f1; /* Indigo */
    --primary-light: #818cf8;
    --secondary: #a855f7; /* Violet */
    --accent: #f43f5e; /* Rose */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Telegram Theme Overrides / Mapping */
    --bg-color: var(--tg-theme-bg-color, #ffffff);
    --secondary-bg-color: var(--tg-theme-secondary-bg-color, #f4f4f5);
    --text-color: var(--tg-theme-text-color, #18181b);
    --hint-color: var(--tg-theme-hint-color, #71717a);
    --link-color: var(--tg-theme-link-color, #6366f1);
    --button-color: var(--tg-theme-button-color, #6366f1);
    --button-text-color: var(--tg-theme-button-text-color, #ffffff);

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-bg: rgba(24, 24, 27, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--secondary-bg-color);
    color: var(--text-color);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Loading Spinner */
.loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    z-index: 9999;
    animation: fadeOut 0.5s ease 1s forwards; /* Subtle auto-hide if JS fails */
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--secondary-bg-color);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

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

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* ========================================
   PREMIUM HEADER - Animated Mesh Design
   ======================================== */
.app-header {
    background: #0f172a;
    color: white;
    padding: 20px 20px 50px;
    text-align: left;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Animated Mesh Gradient Background */
.header-mesh {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: 
        radial-gradient(ellipse 60% 50% at 10% 20%, rgba(99, 102, 241, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 80% 80%, rgba(168, 85, 247, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 0%, rgba(244, 63, 94, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 30% 50% at 90% 10%, rgba(34, 211, 238, 0.2) 0%, transparent 50%);
    animation: meshShift 12s ease-in-out infinite alternate;
}

@keyframes meshShift {
    0% { 
        background: 
            radial-gradient(ellipse 60% 50% at 10% 20%, rgba(99, 102, 241, 0.5) 0%, transparent 60%),
            radial-gradient(ellipse 50% 60% at 80% 80%, rgba(168, 85, 247, 0.4) 0%, transparent 55%),
            radial-gradient(ellipse 40% 40% at 50% 0%, rgba(244, 63, 94, 0.25) 0%, transparent 50%),
            radial-gradient(ellipse 30% 50% at 90% 10%, rgba(34, 211, 238, 0.2) 0%, transparent 50%);
    }
    100% { 
        background: 
            radial-gradient(ellipse 50% 60% at 30% 60%, rgba(99, 102, 241, 0.4) 0%, transparent 55%),
            radial-gradient(ellipse 60% 50% at 70% 20%, rgba(168, 85, 247, 0.45) 0%, transparent 60%),
            radial-gradient(ellipse 35% 45% at 80% 90%, rgba(244, 63, 94, 0.2) 0%, transparent 50%),
            radial-gradient(ellipse 40% 40% at 10% 80%, rgba(34, 211, 238, 0.25) 0%, transparent 50%);
    }
}

/* Floating Particles */
.header-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; width: 3px; height: 3px; animation-duration: 15s; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; top: 60%; width: 5px; height: 5px; animation-duration: 20s; animation-delay: -3s; }
.particle:nth-child(3) { left: 55%; top: 15%; width: 2px; height: 2px; animation-duration: 18s; animation-delay: -7s; }
.particle:nth-child(4) { left: 75%; top: 45%; width: 4px; height: 4px; animation-duration: 22s; animation-delay: -5s; }
.particle:nth-child(5) { left: 90%; top: 75%; width: 3px; height: 3px; animation-duration: 16s; animation-delay: -10s; }

@keyframes particleFloat {
    0%   { transform: translate(0, 0) scale(1); opacity: 0; }
    10%  { opacity: 0.6; }
    50%  { transform: translate(-30px, -40px) scale(1.5); opacity: 0.3; }
    90%  { opacity: 0.5; }
    100% { transform: translate(20px, -80px) scale(0.8); opacity: 0; }
}

/* Top Bar: Brand + Actions */
.header-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-icon i {
    width: 18px;
    height: 18px;
    color: white;
}

.brand h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    letter-spacing: -0.5px;
    margin: 0;
    background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.header-icon-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.header-icon-btn i {
    width: 16px;
    height: 16px;
}

/* Profile Section */
.header-profile-section {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.header-avatar-ring {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    text-transform: uppercase;
    overflow: hidden;
}

.avatar-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    border: 2.5px solid #0f172a;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.header-greeting {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.greeting-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.name-display {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-container {
    display: flex;
    gap: 5px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.status-badge {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-badge.creator { color: #facc15; border-color: rgba(250, 204, 21, 0.3); }
.status-badge.admin { color: #22d3ee; border-color: rgba(34, 211, 238, 0.3); }

/* Balance Card - Glassmorphic */
.header-balance-card {
    position: relative;
    z-index: 2;
    border-radius: 16px;
    overflow: hidden;
}

.balance-card-bg {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.balance-card-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
}

.balance-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.balance-icon-wrap {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.balance-icon-wrap i {
    width: 20px;
    height: 20px;
    color: var(--primary-light);
}

.balance-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.balance-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.5);
    font-weight: 700;
}

.balance-value {
    font-size: 20px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.balance-topup-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.2s ease;
}

.balance-topup-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.balance-topup-btn:active {
    transform: scale(0.95);
}

.balance-topup-btn i {
    width: 18px;
    height: 18px;
}

/* Wave Bottom Edge */
.header-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    line-height: 0;
}

.header-wave svg {
    width: 100%;
    height: 30px;
    display: block;
}

/* Navigation - Floating Bottom Style */
.app-nav {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    padding: 8px;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    border: none;
    background: transparent;
    color: var(--hint-color);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
}

.nav-btn i, .nav-btn lucide {
    margin-bottom: 4px;
}

.nav-btn.active {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Content Area */
.app-content {
    padding: 0 16px 120px;
    margin-top: -24px;
    position: relative;
    z-index: 10;
}

/* Goal Tracker Styles */
.goal-card {
    position: relative;
    overflow: hidden;
}

.goal-progress-container {
    margin: 15px 0;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.goal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.goal-percentage {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.goal-bar-bg {
    height: 12px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.goal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

.goal-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--hint-color);
    font-weight: 600;
}

.goal-empty-state {
    text-align: center;
    padding: 20px 0;
}

.goal-empty-state i {
    font-size: 32px;
    opacity: 0.2;
    margin-bottom: 10px;
    display: block;
}

/* Responsive Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    width: 100%;
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: repeat(3, 1fr);
    }
}

.col-full {
    grid-column: 1 / -1;
}

/* Cards */
.card {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px -1px rgba(0,0,0,0.05), 0 2px 6px -1px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: fit-content;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
}

.card:hover::before {
    opacity: 1;
}

.card:active {
    transform: scale(0.98);
}

.card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.card h3 i {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Special Case Card: Balance */
.balance-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4), 0 8px 10px -6px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.balance-card h3 { color: rgba(255, 255, 255, 0.8); }

.balance-amount {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0;
    font-family: 'Outfit', sans-serif;
}

.balance-details {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-details p {
    font-size: 12px;
    opacity: 0.9;
}

/* Table Design */
.table-container {
    overflow-x: auto;
    margin: 0 -20px;
    padding: 0 20px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--hint-color);
    letter-spacing: 0.05em;
    padding: 8px 12px;
}

.table td {
    background: var(--bg-color);
    padding: 16px 12px;
    font-size: 14px;
}

.table tr td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.table tr td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:active {
    transform: scale(0.97);
    background: var(--primary-light);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: var(--secondary-bg-color); color: var(--text-color); border: 1px solid var(--glass-border); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--hint-color);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: var(--secondary-bg-color);
    border: 1.5px solid var(--glass-border);
    color: var(--text-color);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    background: var(--bg-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-failed { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* Wallet Selection Grid */
.wallet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    background: var(--secondary-bg-color);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    gap: 8px;
}

.wallet-card span {
    font-size: 11px;
    font-weight: 700;
    color: var(--hint-color);
}

.wallet-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.wallet-item input:checked + .wallet-card {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.1);
}

.wallet-item input:checked + .wallet-card span {
    color: var(--primary);
}

.wallet-item input:checked + .wallet-card .wallet-icon {
    transform: scale(1.1);
}

/* Spinners & Loaders */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
}

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

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none; }

/* Modal System */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.glass-modal {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
}

.modal-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
}

.modal-body {
    padding: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.modal-body img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.spinner-container {
    padding: 40px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-icon {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon i {
    width: 14px;
    height: 14px;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

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

.donor-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-amount {
    font-size: 13px;
    font-weight: 800;
    color: var(--success);
}

.activity-message {
    font-size: 11px;
    color: var(--hint-color);
    font-style: italic;
    margin-bottom: 4px;
    line-height: 1.3;
}

.activity-time {
    font-size: 10px;
    color: var(--hint-color);
    opacity: 0.7;
}

/* ========================================
   EXPLORE PAGE - Premium Redesign
   ======================================== */

/* Hero Section */
.explore-hero {
    position: relative;
    padding: 30px 20px 35px;
    text-align: center;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
    margin: -15px -15px 0;
}

.explore-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4338ca 60%, #6366f1 100%);
    z-index: 0;
}

.explore-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(99, 102, 241, 0.4) 0%, transparent 40%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

.explore-hero-content {
    position: relative;
    z-index: 1;
}

.explore-hero-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: rgba(255,255,255,0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
}

.explore-hero-icon i {
    width: 24px;
    height: 24px;
    color: white;
}

.explore-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: white;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.explore-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 24px;
}

/* Search Box */
.explore-search-container {
    max-width: 460px;
    margin: 0 auto;
}

.explore-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.explore-search-box:focus-within {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.35);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.explore-search-icon {
    position: absolute;
    left: 16px;
    display: flex;
    pointer-events: none;
}

.explore-search-icon i {
    width: 18px;
    height: 18px;
    color: rgba(255,255,255,0.5);
    transition: color 0.3s ease;
}

.explore-search-box:focus-within .explore-search-icon i {
    color: rgba(255,255,255,0.9);
}

.explore-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 15px 60px 15px 48px;
    font-size: 15px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    width: 100%;
}

.explore-search-input::placeholder {
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

.explore-search-btn {
    position: absolute;
    right: 6px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #818cf8, #6366f1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.explore-search-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
}

.explore-search-btn:active {
    transform: scale(0.95);
}

.explore-search-btn i {
    width: 18px;
    height: 18px;
}

/* Hint Pills */
.explore-search-hints {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.explore-hint-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.65);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.explore-hint-pill:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateY(-1px);
}

/* Results Section */
.explore-results-section {
    padding: 20px 0 0;
}

.explore-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 4px;
}

.explore-results-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.explore-results-header h3 i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.explore-count {
    font-size: 12px;
    color: var(--hint-color);
    font-weight: 600;
}

.explore-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Creator Cards */
.explore-creator-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-color);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: cardSlideIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.explore-creator-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.explore-creator-card:active {
    transform: scale(0.99);
}

/* Creator Avatar */
.creator-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.creator-avatar.verified {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.creator-verified-tick {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-color);
}

/* Card Info */
.creator-card-info {
    flex: 1;
    min-width: 0;
}

.creator-card-name {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creator-card-username {
    font-size: 12px;
    color: var(--hint-color);
    margin-top: 1px;
}

.creator-card-stats {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.creator-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--hint-color);
    background: var(--secondary-bg-color);
    padding: 3px 8px;
    border-radius: 8px;
}

.creator-stat-chip i {
    color: var(--primary);
}

/* Card Button */
.creator-card-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.06);
    background: var(--secondary-bg-color);
    color: var(--hint-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.creator-card-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.08);
}

.creator-card-btn i {
    width: 18px;
    height: 18px;
}

/* Empty State */
.explore-empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-color);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.04);
}

.explore-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--secondary-bg-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explore-empty-icon i {
    width: 28px;
    height: 28px;
    color: var(--hint-color);
}

.explore-empty-state h4 {
    font-size: 16px;
    margin-bottom: 6px;
}

.explore-empty-state p {
    font-size: 13px;
    color: var(--hint-color);
}

/* ========================================
   PROFILE PAGE - Premium Redesign
   ======================================== */

.profile-hero {
    position: relative;
    padding: 40px 20px 25px;
    text-align: center;
    border-radius: 0 0 24px 24px;
    margin: -15px -15px 15px;
    background: var(--bg-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    overflow: hidden;
}

.profile-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    z-index: 0;
    border-radius: 0 0 16px 16px;
}

.profile-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" viewBox="0 0 800 400" xmlns="http://www.w3.org/2000/svg"><path d="M0,200 C300,100 500,300 800,200 L800,0 L0,0 Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat center bottom;
    background-size: cover;
}

.profile-back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.profile-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    z-index: 2;
    margin-top: 30px;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 4px solid var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar.verified {
    border-color: var(--primary);
}

.profile-verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-color);
    color: white;
}

.profile-info {
    position: relative;
    z-index: 2;
}

.profile-name {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 2px;
}

.profile-username {
    font-size: 14px;
    color: var(--hint-color);
    margin-bottom: 12px;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-bio {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    max-width: 90%;
    margin: 0 auto 20px;
    opacity: 0.9;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
    position: relative;
}

.profile-support-btn {
    width: auto;
    padding: 12px 28px;
    font-weight: 700;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
}

.profile-support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.profile-content-padding {
    padding: 0 5px;
}

.profile-stats-box {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(0,0,0,0.06);
    margin: 0 15px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--hint-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-accent  { color: var(--accent); }

.profile-section {
    margin-bottom: 25px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-left: 5px;
}

.section-title i {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Media Grid Placeholder Style */
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.media-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,0.03);
    aspect-ratio: 4/5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.media-card:hover {
    transform: scale(0.98);
}

.media-icon {
    font-size: 32px;
    color: rgba(0,0,0,0.1);
}

.media-icon i {
    width: 32px;
    height: 32px;
}

.media-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.media-caption {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    opacity: 0.9;
}

.media-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.empty-state-simple {
    text-align: center;
    padding: 20px;
    color: var(--hint-color);
    font-size: 13px;
    background: rgba(0,0,0,0.02);
    border-radius: 12px;
}

/* Announcements */
.announcement-card {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    border-left: 5px solid var(--primary);
    background: var(--secondary-bg-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.announcement-header i {
    width: 18px;
    height: 18px;
}

.announcement-title {
    font-weight: 700;
    font-size: 15px;
}

.announcement-body {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-color);
}

.announcement-footer {
    font-size: 11px;
    color: var(--hint-color);
    margin-top: 10px;
    text-align: right;
}

.announcement-info { border-left-color: var(--primary); background: rgba(99, 102, 241, 0.05); }
.announcement-success { border-left-color: var(--success); background: rgba(16, 185, 129, 0.05); }
.announcement-warning { border-left-color: var(--warning); background: rgba(245, 158, 11, 0.05); }
.announcement-danger { border-left-color: var(--danger); background: rgba(239, 68, 68, 0.05); }

/* Side Drawer Navigation */
.side-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    transition: visibility 0.3s;
}

.side-drawer.active {
    visibility: visible;
}

.drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-drawer.active .drawer-overlay {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: var(--bg-color);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
}

.side-drawer.active .drawer-content {
    right: 0;
}

.drawer-header {
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.drawer-user {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    overflow: hidden;
}

.drawer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-info {
    display: flex;
    flex-direction: column;
}

.drawer-name {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.drawer-status {
    font-size: 12px;
    opacity: 0.8;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drawer-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.menu-section {
    padding: 20px 20px 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--hint-color);
    letter-spacing: 1px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.menu-item i {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.menu-item:active {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.admin-section {
    color: var(--danger);
    border-top: 1px solid var(--secondary-bg-color);
    margin-top: 10px;
}

.admin-item i {
    color: var(--danger);
}

.drawer-footer {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--hint-color);
    border-top: 1px solid var(--secondary-bg-color);
}

/* Help Steps */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.step-content h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
}

.step-content p {
    margin: 0;
    font-size: 13px;
    color: var(--hint-color);
    line-height: 1.5;
}
 / *   R o w   H i g h l i g h t   f o r   D e e p   L i n k s   * / 
 . h i g h l i g h t - r o w   { 
         b a c k g r o u n d :   r g b a ( 9 9 ,   1 0 2 ,   2 4 1 ,   0 . 0 8 )   ! i m p o r t a n t ; 
         b o r d e r - l e f t :   4 p x   s o l i d   v a r ( - - p r i m a r y )   ! i m p o r t a n t ; 
         a n i m a t i o n :   h i g h l i g h t P u l s e   2 s   e a s e - i n - o u t   i n f i n i t e ; 
 } 
 
 @ k e y f r a m e s   h i g h l i g h t P u l s e   { 
         0 %   {   b a c k g r o u n d :   r g b a ( 9 9 ,   1 0 2 ,   2 4 1 ,   0 . 0 8 ) ;   } 
         5 0 %   {   b a c k g r o u n d :   r g b a ( 9 9 ,   1 0 2 ,   2 4 1 ,   0 . 1 5 ) ;   } 
         1 0 0 %   {   b a c k g r o u n d :   r g b a ( 9 9 ,   1 0 2 ,   2 4 1 ,   0 . 0 8 ) ;   } 
 } 
  
 