/* ============================================================
   AAVE REPLICA - PROFESSIONAL DEFI INTERFACE
   Dark Theme | Glass Morphism | Responsive | Animations
   ============================================================ */

:root {
    --bg-primary: #0b0e14;
    --bg-secondary: #11131a;
    --bg-card: rgba(20, 24, 36, 0.7);
    --bg-glass: rgba(27, 32, 48, 0.6);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    
    --text-primary: #f1f1f3;
    --text-secondary: #a0a3b1;
    --text-muted: #5e6278;
    
    --purple: #b6509e;
    --purple-light: #d07ab8;
    --teal: #2ebac6;
    --teal-light: #5dd4de;
    --gradient-primary: linear-gradient(135deg, #b6509e 0%, #2ebac6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(182,80,158,0.15) 0%, rgba(46,186,198,0.15) 100%);
    
    --success: #46dba2;
    --warning: #f2c94c;
    --danger: #eb5757;
    --info: #6c8eff;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 40px rgba(182,80,158,0.15);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

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

html { scroll-behavior: smooth; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #2a2e3f; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a3f55; }

/* ============================================================
   GLASS MORPHISM
   ============================================================ */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 32px; height: 32px;
}

.logo-icon svg { width: 100%; height: 100%; }

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.network-badge:hover { border-color: var(--border-hover); }

.network-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.btn-connect {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-connect::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-connect:hover::before { left: 100%; }

.btn-connect:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-connected {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-glass);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(11, 14, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 16px 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
}

.mobile-menu.hidden { display: none; }

.mobile-menu a {
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.mobile-menu a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

/* ============================================================
   PAGES
   ============================================================ */
.page { display: none; padding-top: 64px; }
.page.active { display: block; }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-banner {
    position: relative;
    padding: 80px 24px 60px;
    text-align: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero-banner h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-banner p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(182,80,158,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   MARKETS SECTION
   ============================================================ */
.markets-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.markets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.markets-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) { color: var(--text-primary); }

.markets-filters {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.toggle-switch input { display: none; }

.toggle-slider {
    width: 40px; height: 22px;
    background: var(--bg-secondary);
    border-radius: 11px;
    position: relative;
    border: 1px solid var(--border-glass);
    transition: var(--transition-fast);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition-fast);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--purple);
    border-color: var(--purple);
}

.toggle-switch input:checked + .toggle-slider::after {
    left: 20px;
    background: white;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.market-table thead {
    background: rgba(255,255,255,0.02);
}

.market-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.market-table th:last-child { text-align: right; }

.market-table td {
    padding: 18px 20px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-primary);
    white-space: nowrap;
}

.market-table tbody tr {
    transition: var(--transition-fast);
}

.market-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

.market-table td:last-child { text-align: right; }

/* Asset Cell */
.asset-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asset-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

.asset-symbol {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.asset-name {
    font-size: 12px;
    color: var(--text-muted);
}

/* APY */
.apy-positive { color: var(--success); font-weight: 600; }
.apy-negative { color: var(--danger); font-weight: 600; }

/* Collateral Badge */
.collateral-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.collateral-yes {
    background: rgba(70, 219, 162, 0.1);
    color: var(--success);
}

.collateral-no {
    background: rgba(160, 163, 177, 0.1);
    color: var(--text-muted);
}

/* Action Buttons */
.btn-action {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    margin-left: 6px;
}

.btn-supply {
    background: rgba(182, 80, 158, 0.15);
    color: var(--purple-light);
    border: 1px solid rgba(182, 80, 158, 0.25);
}

.btn-supply:hover {
    background: rgba(182, 80, 158, 0.25);
    transform: translateY(-1px);
}

.btn-borrow {
    background: rgba(46, 186, 198, 0.15);
    color: var(--teal-light);
    border: 1px solid rgba(46, 186, 198, 0.25);
}

.btn-borrow:hover {
    background: rgba(46, 186, 198, 0.25);
    transform: translateY(-1px);
}

/* Tab Panel */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

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

.modal.hidden { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.modal-close:hover { color: var(--text-primary); }

/* Wallet Modal */
.wallet-options {
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

.wallet-option:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.03);
    transform: translateX(4px);
}

.wallet-option img {
    width: 32px; height: 32px;
    border-radius: 8px;
    object-fit: contain;
}

.wallet-disclaimer {
    padding: 0 28px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Action Modal */
.action-modal .modal-body {
    padding: 24px 28px 28px;
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.asset-info img {
    width: 44px; height: 44px;
    border-radius: 50%;
}

.asset-info div { display: flex; flex-direction: column; }

.asset-info span { font-size: 18px; font-weight: 700; }
.asset-info small { font-size: 13px; color: var(--text-muted); }

.amount-input-wrapper { margin-bottom: 24px; }

.amount-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.amount-header strong { color: var(--text-primary); }

.amount-input {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 4px;
    transition: var(--transition-fast);
}

.amount-input:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(182,80,158,0.1);
}

.amount-input input {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    outline: none;
}

.amount-input input::placeholder { color: var(--text-muted); }

.max-btn {
    padding: 10px 18px;
    background: rgba(182, 80, 158, 0.15);
    border: 1px solid rgba(182, 80, 158, 0.25);
    border-radius: var(--radius-sm);
    color: var(--purple-light);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-right: 4px;
}

.max-btn:hover {
    background: rgba(182, 80, 158, 0.25);
}

.amount-usd {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

.transaction-overview {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.transaction-overview h4 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.overview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-glass);
}

.overview-row:last-child { border-bottom: none; }

.overview-row span { color: var(--text-secondary); }

.health-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.health-bar {
    width: 80px;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.health-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.btn-primary {
    padding: 14px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-full { width: 100%; }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: -1px;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    padding: 24px;
    transition: var(--transition);
}

.summary-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-header i { font-size: 16px; color: var(--text-muted); }

.summary-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.summary-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.summary-sub .positive { color: var(--success); }
.summary-sub .negative { color: var(--danger); }

.health-card { border-left: 3px solid var(--success); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-section {
    padding: 28px;
    min-height: 300px;
}

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

.dashboard-section h3 i { color: var(--purple-light); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-outline {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-outline:hover {
    border-color: var(--purple);
    color: var(--purple-light);
}

/* Position Item */
.position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-glass);
}

.position-item:last-child { border-bottom: none; }

.position-asset {
    display: flex;
    align-items: center;
    gap: 12px;
}

.position-asset img {
    width: 32px; height: 32px;
    border-radius: 50%;
}

.position-details {
    text-align: right;
}

.position-amount {
    font-weight: 600;
    font-size: 14px;
}

.position-usd {
    font-size: 12px;
    color: var(--text-muted);
}

.position-apy {
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================
   GOVERNANCE
   ============================================================ */
.governance-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.governance-hero {
    padding: 48px;
    text-align: center;
    margin-bottom: 32px;
}

.governance-icon {
    width: 64px; height: 64px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}

.governance-hero h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.governance-hero p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.governance-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.governance-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.governance-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.proposals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.proposal-card {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.proposal-id {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 10px;
    background: var(--bg-primary);
    border-radius: 20px;
}

.proposal-title {
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}

.proposal-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-executed {
    background: rgba(70, 219, 162, 0.1);
    color: var(--success);
}

.status-active {
    background: rgba(108, 142, 255, 0.1);
    color: var(--info);
}

/* ============================================================
   DOCS
   ============================================================ */
.docs-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.doc-card {
    padding: 32px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: block;
}

.doc-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.doc-card i {
    font-size: 28px;
    color: var(--purple-light);
    margin-bottom: 16px;
    display: block;
}

.doc-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.doc-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border-glass);
    padding: 48px 24px 24px;
    background: var(--bg-secondary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-brand .logo-icon.small { width: 24px; height: 24px; }
.footer-brand span { font-weight: 700; font-size: 16px; }
.footer-brand p { font-size: 13px; color: var(--text-muted); }

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-links div { display: flex; flex-direction: column; gap: 10px; }

.footer-links h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
    max-width: 380px;
}

.toast.toast-exit {
    animation: toastExit 0.3s ease forwards;
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastExit {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--info); }

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loading-overlay.hidden { display: none; }

.loading-spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .dashboard-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .network-badge span { display: none; }
    .btn-connect span { display: none; }
    
    .hero-stats { grid-template-columns: 1fr; }
    .hero-banner { padding: 60px 16px 40px; }
    
    .markets-header { flex-direction: column; align-items: flex-start; }
    .markets-tabs { width: 100%; }
    .tab-btn { flex: 1; text-align: center; }
    
    .market-table th, .market-table td {
        padding: 14px 12px;
        font-size: 13px;
    }
    .asset-name { display: none; }
    
    .dashboard-summary { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    
    .governance-stats { flex-direction: column; gap: 20px; }
    .docs-grid { grid-template-columns: 1fr; }
    
    .footer-content { flex-direction: column; }
    .footer-links { flex-wrap: wrap; gap: 32px; }
    
    .modal-content { max-width: 100%; margin: 0 10px; }
    
    .governance-hero { padding: 32px 20px; }
    .proposal-card { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .nav-container { padding: 0 16px; }
    .markets-container { padding: 0 12px 60px; }
    .dashboard-container { padding: 20px 12px 60px; }
    .table-wrapper { border-radius: var(--radius-md); }
    .btn-action { padding: 6px 12px; font-size: 12px; }
    .asset-icon { width: 28px; height: 28px; }
}

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

.page.active { animation: fadeIn 0.4s ease; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.network-dot { animation: pulse 2s ease-in-out infinite; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(255,255,255,0.03) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
