:root {
    --primary: #7434cc;
    --primary-glow: rgba(116, 52, 204, 0.15);
    --secondary: #f43f5e;
    --accent: #10b981;
    --bg-main: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius: 20px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --skeleton: #e2e8f0;
}

@keyframes skeleton-loading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.skeleton {
    background: linear-gradient(90deg, var(--skeleton) 25%, #f1f5f9 50%, var(--skeleton) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
    display: block;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 90px;
    background: radial-gradient(circle at top right, #eef2ff 0%, #f8fafc 50%);
}

body.dark-mode {
    --bg-main: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --skeleton: #1e293b;
    background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 50%);
}

body.dark-mode .chart-container, 
body.dark-mode .stat-card, 
body.dark-mode .action-card {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .bottom-nav {
    background: rgba(15, 23, 42, 0.7);
    border-top-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode input, body.dark-mode select {
    background: #1e293b;
    border-color: #334155;
    color: white;
}

.container { max-width: 500px; margin: 0 auto; padding: 1.2rem; }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding: 0.5rem 0; }
.logo h1 { font-size: 1.6rem; font-weight: 900; letter-spacing: -1.5px; }
.logo span { color: var(--primary); }

/* Premium Summary Cards */
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border: 1px solid white;
}
.stat-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.stat-card * { position: relative; z-index: 1; }
.stat-card p { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.5rem; position: relative; }
.stat-card h2 { font-size: 1.5rem; font-weight: 900; position: relative; }

/* PRO Chart Container */
.chart-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid white;
}

/* Action Buttons */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.action-card {
    background: white; padding: 1.5rem; border-radius: 24px; text-align: center;
    box-shadow: var(--shadow); border: 2px solid transparent; transition: all 0.3s ease;
}
.action-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.action-card i { font-size: 1.8rem; color: var(--primary); margin-bottom: 0.8rem; }
.action-card span { font-weight: 800; font-size: 0.85rem; display: block; }

/* Payment Method Card Mockup */
.card-mockup {
    background: linear-gradient(135deg, #6025b0 0%, #06b6d4 100%);
    color: white; padding: 1.5rem; border-radius: 20px; margin-bottom: 1rem;
    position: relative; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.card-mockup::after { content: '••••'; position: absolute; bottom: 1.5rem; right: 1.5rem; opacity: 0.5; font-size: 1.2rem; }
.card-mockup h4 { font-size: 1.2rem; font-weight: 800; margin-bottom: 2rem; }
.card-mockup .type { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; opacity: 0.8; }

/* Forms */
.form-group { margin-bottom: 1.5rem; }
label { display: block; margin-bottom: 0.5rem; font-size: 0.75rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
input, select {
    width: 100%; padding: 1rem; border-radius: 16px; border: 2px solid #f1f5f9; background: #f8fafc;
    font-size: 1rem; font-weight: 600; font-family: inherit; transition: 0.3s;
}
input:focus { border-color: var(--primary); outline: none; background: white; }

.btn-primary {
    background: var(--primary); color: white; border: none; padding: 1.2rem; border-radius: 18px;
    font-weight: 800; font-size: 1rem; width: 100%; cursor: pointer; transition: 0.3s;
    box-shadow: 0 10px 15px -3px rgba(116, 52, 204, 0.4);
}
.btn-primary:active { transform: scale(0.98); }

/* Bottom Navbar PRO */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    display: flex; justify-content: space-around; align-items: center;
    padding: 0.8rem 0; border-top: 1px solid rgba(255, 255, 255, 0.3); z-index: 1000;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.02);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #94a3b8; cursor: pointer; transition: 0.3s; }
.nav-item i { font-size: 1.4rem; }
.nav-item span { font-size: 0.65rem; font-weight: 800; }
.nav-item.active { color: var(--primary); }

/* Floating + Button */
.nav-center {
    background: var(--primary); width: 55px; height: 55px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: white;
    box-shadow: 0 8px 15px rgba(116,52,204,0.4); margin-top: -35px;
}

/* History Item */
.history-item {
    display: flex; align-items: center; padding: 1rem; border-bottom: 1px solid #f1f5f9;
}
.history-icon { width: 45px; height: 45px; border-radius: 14px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.2rem; margin-right: 1rem; }
.history-content { flex: 1; }
.history-content h4 { font-size: 0.95rem; font-weight: 800; color: var(--text-main); }
.history-content p { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }
.history-amount { text-align: right; font-weight: 900; font-size: 1.1rem; }

/* Tab Container */
.tab-content { display: none; }
.tab-content.active { display: block; animation: slideIn 0.4s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Wallet Tabs */
.type-selector { display: flex; background: #f1f5f9; padding: 4px; border-radius: 12px; }
.type-btn { flex: 1; border: none; padding: 0.6rem; border-radius: 10px; font-weight: 800; font-size: 0.75rem; cursor: pointer; background: transparent; color: var(--text-muted); transition: 0.3s; }
.type-btn.active { background: white; color: var(--primary); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    display: none; align-items: center; justify-content: center; z-index: 2000;
}
.modal-overlay img { max-width: 90%; max-height: 80%; border-radius: 20px; }

/* Carousel scrollbar hide */
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-container { -ms-overflow-style: none; scrollbar-width: none; }

/* Toast Notifications */
#toast-container {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; gap: 10px;
    width: 90%; max-width: 400px; pointer-events: none;
}
.toast {
    background: var(--card-bg); color: var(--text-main); padding: 1rem 1.5rem;
    border-radius: 16px; box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 0.8rem;
    border-left: 5px solid var(--primary); animation: slideInTop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    pointer-events: auto; backdrop-filter: blur(10px);
}
.toast.success { border-left-color: var(--accent); }
.toast.error { border-left-color: var(--secondary); }
.toast.info { border-left-color: var(--primary); }

@keyframes slideInTop {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}
.toast.fade-out { opacity: 0; transform: translateY(-20px); transition: 0.3s; opacity: 0; }
