:root {
    --gold: #c99a3d;
    --gold-light: #e9c977;
    --gold-dark: #8a6a20;
    --bg: #faf6ea;
    --card: #ffffff;
    --text: #3a2f1c;
    --muted: #7a6f57;
    --border: #eadfc0;
    --accent1: #ffb020;
    --accent2: #ff6a3d;
    --success: #10b981;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

html, body {
    background: var(--bg);
    color: var(--text);
    height: 100dvh;
    overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 6px;
}

/* Sidebar Styling with Background Image */
.sidebar {
    width: 275px;
    background: #fffdf7 url('logo/aside.png') no-repeat center center;
    background-size: cover;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    position: fixed;
    height: 100dvh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto !important;
    box-shadow: 4px 0 20px rgba(180, 150, 80, 0.05);
}

.brand-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--gold-light), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    box-shadow: 0 6px 16px rgba(201, 154, 61, 0.35);
}

.brand-logo i {
    font-size: 28px;
    color: #fff;
}

.brand-title {
    text-align: center;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 16px;
    color: var(--text);
}

.brand-sub {
    text-align: center;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.nav-link-custom {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    width: 100%;
    transition: all 0.25s ease;
}

.nav-link-custom i {
    width: 20px;
    text-align: center;
    color: var(--gold-dark);
    transition: color 0.25s ease;
}

.nav-link-custom:hover {
    background: #f5ecd4;
    color: var(--gold-dark);
}

.nav-link-custom.active {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(201, 154, 61, 0.25);
}

.nav-link-custom.active i {
    color: #fff;
}

/* Sidebar Overlay for Mobile Drawer */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(58, 47, 28, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Bottom Navigation Bar Styling */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fffdf7;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 15px rgba(180, 150, 80, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.mobile-bottom-nav a i {
    font-size: 18px;
}

.mobile-bottom-nav a.active {
    color: var(--gold-dark);
}

/* Main Content Area */
.main-content {
    margin-left: 275px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100dvh;
    background: var(--bg);
}

.top-navbar {
    height: 75px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: rgba(250, 246, 234, 0.92);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.connect-btn {
    background: linear-gradient(90deg, #703f0e, var(--gold));
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(180, 150, 80, 0.2);
}

.connect-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(180, 150, 80, 0.3);
    opacity: .95;
    color: #fff;
}

.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;
}

/* Cards & Elements */
.card-glass, .stat-card, .welcome-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 4px 15px rgba(180, 150, 80, 0.05);
    transition: all 0.3s ease-in-out;
}

.card-glass:hover, .stat-card:hover {
    border-color: var(--gold-light);
    box-shadow: 0 6px 20px rgba(180, 150, 80, 0.1);
}

.welcome-card {
    background: linear-gradient(135deg, #fffef9, #fbf1d6);
    border: 1px solid var(--border);
}

.card-inner {
    background: #fffdf7;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.balance-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 14px 0;
}

.mini-balance-box {
    background: #fffdf7;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.swap-input-box {
    background: #fffdf7;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-top: 10px;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold));
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background-color: #4dff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #4dff88;
}

.welcome-card h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin: 10px 0 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    font-family: monospace;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: .5px;
    margin-top: 4px;
}

.btn-primary-custom {
    background: linear-gradient(90deg, #703f0e, var(--gold));
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(180, 150, 80, 0.15);
}

.btn-primary-custom:hover {
    opacity: .95;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(180, 150, 80, 0.25);
    color: #fff;
}

.wallet-address-text {
    word-break: break-all;
    font-family: monospace;
    color: var(--gold-dark);
}

.welcome-content-flex {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.welcome-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.withdraw-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

/* Staked & Banner Grid Responsiveness */
.staked-banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .stats-grid {
        grid-rules: repeat(2, 1fr);
        grid-template-columns: repeat(2, 1fr);
    }
    .withdraw-grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .mobile-bottom-nav {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding-bottom: 70px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .content-body {
        padding: 16px;
        gap: 16px;
    }
    .balance-row {
        grid-template-columns: 1fr;
    }
    .welcome-bottom-row {
        flex-direction: column;
        align-items: stretch;
    }
    .staked-banner-grid {
        grid-template-columns: 1fr !important;
    }
}