@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-main: #05030a;
    --bg-sidebar: #080614;
    --bg-card: #0d0a1c;
    --border-color: rgba(168, 85, 247, 0.45);
    --border-color-glow: rgba(192, 132, 252, 0.95);
    --accent-gold: #fbbf24;
    --accent-purple: #c084fc;
    --accent-blue: #38bdf8;
    --accent-green: #34d399;
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

html, body {
    background: var(--bg-main);
    color: var(--text-main);
    height: 100dvh;
    overflow: hidden;
}

/* =========================================================
   CLOUDY & ATMOSPHERIC NEBULA BACKGROUND
   ========================================================= */

body {
    display: flex;
    position: relative;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.28) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.22) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.12) 0%, transparent 70%),
        linear-gradient(135deg, #05030a 0%, #030107 100%);
    background-size: 100% 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #05030a;
}
::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

/* =========================================================
   SIDEBAR STYLING
   ========================================================= */

.sidebar {
    width: 275px;
    background: var(--bg-sidebar);
    border-right: 1.5px solid rgba(168, 85, 247, 0.35);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: fixed;
    height: 100dvh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto !important;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.3);
}

.logo-icon {
    font-size: 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    padding: 8px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
}

.logo-text h2 {
    font-size: 15px;
    letter-spacing: 1.5px;
    color: #ffffff;
    font-weight: 900;
    font-family: 'Space Grotesk', sans-serif;
}

.logo-text span {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--accent-gold);
    font-weight: 800;
}

.nav-section-title {
    font-size: 10.5px;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    margin: 20px 0 8px 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-links a {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(168, 85, 247, 0.2);
    color: #ffffff;
    border-color: rgba(192, 132, 252, 0.6);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.sidebar-footer {
    padding-top: 15px;
    border-top: 1px solid rgba(168, 85, 247, 0.3);
    margin-top: auto;
}

.token-badge {
    background: #090614;
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.token-val {
    font-size: 13px;
    color: var(--accent-gold);
    font-weight: 800;
    font-family: 'Space Grotesk', monospace;
}

/* =========================================================
   TOP NAVBAR
   ========================================================= */

.main-content {
    margin-left: 275px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100dvh;
    background: transparent;
}

.top-navbar {
    height: 75px;
    border-bottom: 1.5px solid rgba(168, 85, 247, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: rgba(5, 3, 10, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.connect-btn {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(56, 189, 248, 0.35));
    border: 1.5px solid var(--border-color-glow);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.connect-btn:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.7);
}

/* =========================================================
   PERFECT RESPONSIVE & GLOWING CARD LAYOUT
   ========================================================= */

.content-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.app-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-margin-top: 90px;
}

/* Main Cards with Prominent Glowing Borders */
.card-glass, .stat-card, .welcome-card {
    background: var(--bg-card);
    border: 1.5px solid rgba(168, 85, 247, 0.5);
    border-radius: 18px;
    padding: 22px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(147, 51, 234, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease-in-out;
}

.card-glass:hover, .stat-card:hover {
    border-color: var(--border-color-glow);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}

.welcome-card {
    background: linear-gradient(135deg, #140f2b 0%, #0a0717 100%);
    border: 1.5px solid rgba(192, 132, 252, 0.65);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7), 0 0 30px rgba(168, 85, 247, 0.35);
}

/* Compact Inner Elements (Chote cards chote rahenge aur borders clear dikhengi) */
.card-inner {
    background: #090614;
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 6px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Balance Row & Mini Boxes */
.balance-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0;
}

.mini-balance-box {
    background: #090614;
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Swap Input Box */
.swap-input-box {
    background: #090614;
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    border-radius: 14px;
    padding: 16px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-green);
    background: rgba(52, 211, 153, 0.15);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.live-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
}

.welcome-card h1 {
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 10px;
    font-family: 'Space Grotesk', sans-serif;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-value {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    font-family: 'Space Grotesk', monospace;
}

.stat-label {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.5);
    font-family: 'Space Grotesk', sans-serif;
}

.btn-primary-custom:hover {
    box-shadow: 0 8px 25px rgba(192, 132, 252, 0.8);
    transform: translateY(-2px);
}

/* =========================================================
   MOBILE RESPONSIVENESS FIXES
   ========================================================= */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .content-body {
        padding: 16px;
        gap: 16px;
    }
    .card-glass, .stat-card, .welcome-card {
        padding: 16px;
    }
    .balance-row {
        grid-template-columns: 1fr;
    }
    .top-navbar {
        padding: 0 16px;
    }
}