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

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6C63FF;
    --primary-dark: #554FCC;
    --secondary: #FF6584;
    --accent: #43CBFF;
    --bg-dark: #0D0D1A;
    --bg-card: #161628;
    --text-primary: #F0F0FF;
    --text-muted: #8888AA;
    --border: rgba(108, 99, 255, 0.2);
}

:root[data-theme="light"] {
    --bg-dark: #F0F2F8;
    --bg-card: #FFFFFF;
    --text-primary: #1A1A2E;
    --text-muted: #6B7280;
    --border: rgba(108, 99, 255, 0.22);
}

/* ── Light mode overrides ── */
[data-theme="light"] body,
[data-theme="light"] .dash-body { background: var(--bg-dark); color: var(--text-primary); }

[data-theme="light"] .sidebar {
    background: var(--bg-card);
    box-shadow: 2px 0 12px rgba(0,0,0,.08);
    border-right-color: rgba(108,99,255,.18);
}

/* Tables */
[data-theme="light"] .asset-table thead { background: rgba(0,0,0,.03); }
[data-theme="light"] .asset-table td    { border-bottom: 1px solid rgba(0,0,0,.06); }
[data-theme="light"] .asset-table tr:hover td { background: rgba(108,99,255,.05); }
[data-theme="light"] .tbl thead  { background: rgba(0,0,0,.03); }
[data-theme="light"] .tbl td     { border-bottom: 1px solid rgba(0,0,0,.06); }
[data-theme="light"] .tbl tr:hover td { background: rgba(108,99,255,.05); }
[data-theme="light"] .instrument-table td { border-bottom: 1px solid rgba(0,0,0,.05); }
[data-theme="light"] .instrument-table tr:hover td { background: rgba(108,99,255,.07); }
[data-theme="light"] .autocomplete-item { border-bottom: 1px solid rgba(0,0,0,.05); }
[data-theme="light"] .autocomplete-item:hover { background: rgba(108,99,255,.1); }

/* Modal */
[data-theme="light"] .modal-backdrop { background: rgba(0,0,0,.45); }
[data-theme="light"] .modal   { box-shadow: 0 24px 64px rgba(0,0,0,.18); }
[data-theme="light"] .modal-close:hover { background: rgba(0,0,0,.07); }

/* Step indicator */
[data-theme="light"] .step-dot { background: rgba(0,0,0,.07); border-color: rgba(0,0,0,.15); }
[data-theme="light"] .step-line { background: rgba(0,0,0,.12); }

/* Category tabs */
[data-theme="light"] .cat-tab { background: rgba(0,0,0,.04); }
[data-theme="light"] .cat-tab:hover  { background: rgba(108,99,255,.1); }
[data-theme="light"] .cat-tab.active { background: rgba(108,99,255,.15); }

/* Inputs */
[data-theme="light"] .input-wrapper input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    background: rgba(0,0,0,.04);
    border-color: rgba(108,99,255,.25);
    color: var(--text-primary);
}
[data-theme="light"] #browseSearch      { background: rgba(0,0,0,.04); color: var(--text-primary); }
[data-theme="light"] .currency-select   { background: rgba(0,0,0,.06); color: var(--text-primary); }
[data-theme="light"] .form-group select option { background: #fff; color: #1A1A2E; }
[data-theme="light"] .autocomplete-list { background: var(--bg-card); border-color: rgba(108,99,255,.2); }

/* Summary & cards */
[data-theme="light"] .summary-card { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
[data-theme="light"] .summary-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.1); }
[data-theme="light"] .table-wrap,
[data-theme="light"] .tbl-wrap { box-shadow: 0 2px 8px rgba(0,0,0,.05); }

/* Sidebar nav */
[data-theme="light"] .nav-item         { color: var(--text-muted); }
[data-theme="light"] .nav-item:hover   { background: rgba(108,99,255,.08); color: var(--text-primary); }
[data-theme="light"] .nav-item.active  { background: rgba(108,99,255,.14); }
[data-theme="light"] .nav-add-wallet   { background: rgba(108,99,255,.08); }
[data-theme="light"] .sidebar-footer   { border-top-color: rgba(0,0,0,.08); }

/* Misc */
[data-theme="light"] .selected-instrument-banner { background: rgba(108,99,255,.1); }
[data-theme="light"] .currency-select option { background: #fff; color: #1A1A2E; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── NAVBAR ── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(12px);
    background: rgba(13, 13, 26, 0.8);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.navbar .logo {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.navbar nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar nav a:hover {
    color: var(--text-primary);
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.4);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero h1 .gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--primary);
}

/* ── FEATURES ── */
.features {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(108, 99, 255, 0.15);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ── STATS ── */
.stats {
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-inner {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ── SCROLL ANIMATION ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .navbar nav { display: none; }
    .hero h1 { font-size: 2.2rem; }
}
