:root {
    --primary-color: #00f2ff;
    --primary-glow: rgba(0, 242, 255, 0.5);
    --secondary-color: #7000ff;
    --bg-dark: #050505;
    --bg-card: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
}

/* ══════════════════════════════════════════ */
/* RESET & BASE */
/* ══════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ══════════════════════════════════════════ */
/* GLOBAL LOGO FIX */
/* ══════════════════════════════════════════ */
header .logo img,
.logo img {
    height: 90px !important;
    width: auto !important;
    mix-blend-mode: lighten !important;
    object-fit: contain;
}

.sidebar .logo img {
    height: 70px !important;
}

.mobile-top-bar .logo img {
    height: 110px !important;
    max-height: 110px !important;
    margin-left: -15px;
    object-position: center;
}

/* ══════════════════════════════════════════ */
/* HEADER & NAVIGATION */
/* ══════════════════════════════════════════ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: 0.3s;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

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

.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ══════════════════════════════════════════ */
/* BUTTONS */
/* ══════════════════════════════════════════ */
.btn {
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    border: none;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #fff;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: rgba(0, 242, 255, 0.05);
}

/* ══════════════════════════════════════════ */
/* HERO SECTION */
/* ══════════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 60px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    z-index: -1;
    opacity: 0.5;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to left, black, transparent);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
}

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

.hero p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 600px;
}

/* ══════════════════════════════════════════ */
/* COMMON SECTIONS */
/* ══════════════════════════════════════════ */
section {
    padding: 80px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 15px;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 24px;
    transition: 0.4s;
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

/* ══════════════════════════════════════════ */
/* STATS STRIP */
/* ══════════════════════════════════════════ */
.stats-strip {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    overflow: hidden;
}

.stats-track {
    display: flex;
    white-space: nowrap;
    animation: scroll 40s linear infinite;
}

.stat-item {
    padding: 0 40px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    gap: 10px;
}

.stat-up { color: #00ff88; }
.stat-down { color: #ff3b3b; }

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════ */
/* MARKET TABLE RESPONSIVENESS */
/* ══════════════════════════════════════════ */
.market-table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.market-table-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 600px) {
    .market-table th:nth-child(4), 
    .market-table td:nth-child(4) {
        display: none; /* Hide High/Low column on mobile */
    }
    .market-table th, .market-table td {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
    .market-table {
        min-width: 100%; /* Remove forced scroll */
    }
}

.market-table th, .market-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

/* ══════════════════════════════════════════ */
/* PRICING GRID */
/* ══════════════════════════════════════════ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 50px 35px;
    border-radius: 32px;
    text-align: center;
    transition: 0.4s;
    display: flex;
    flex-direction: column;
}

.price-card.featured {
    border-color: var(--primary-color);
    background: rgba(0, 242, 255, 0.04);
    position: relative;
}

@media (min-width: 1024px) {
    .price-card.featured {
        transform: scale(1.05);
    }
}

/* ══════════════════════════════════════════ */
/* ACTIVITY STATS */
/* ══════════════════════════════════════════ */
.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: center;
}

@media (max-width: 968px) {
    .activity-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .activity-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* ══════════════════════════════════════════ */
/* MOBILE MENU & RESPONSIVE BREAKPOINTS */
/* ══════════════════════════════════════════ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2100;
    padding: 10px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.4s;
    border-radius: 2px;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1024px) {
    header {
        padding: 15px 4%;
    }
    
    header nav, header .auth-buttons {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-bg {
        width: 100%;
        opacity: 0.3;
    }
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: #050505;
    z-index: 2000;
    padding: 120px 10% 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav a {
    text-decoration: none;
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    transition: 0.3s;
}

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

.mobile-auth {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Animation Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease-out;
}

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

/* ══════════════════════════════════════════ */
/* FOOTER RESPONSIVE */
/* ══════════════════════════════════════════ */

/* ══════════════════════════════════════════ */
/* DASHBOARD RESPONSIVENESS (GLOBAL) */
/* ══════════════════════════════════════════ */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #111116;
    border-bottom: 1px solid var(--glass-border);
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    z-index: 2001;
    backdrop-filter: blur(10px);
}

@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
        padding-top: 60px;
        overflow-x: hidden;
    }
    
    .sidebar {
        position: fixed !important;
        left: -280px !important; /* Move further out */
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        z-index: 3000 !important;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background: #0d0d12 !important;
        border-right: 1px solid var(--glass-border) !important;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
        padding-top: 80px !important; /* Space for mobile close button if needed */
    }
    
    .sidebar.active {
        left: 0 !important;
    }
    
    /* Overlay when sidebar is active */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(4px);
        z-index: 2999;
    }
    .sidebar-overlay.active { display: block; }
    
    .main-content {
        padding: 20px 20px 90px 20px !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .mobile-top-bar {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr !important;
    }

    .chart-section {
        height: 350px !important;
    }
}

@media (max-width: 600px) {
    .stat-card .value {
        font-size: 1.5rem !important;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ══════════════════════════════════════════ */
/* MOBILE BOTTOM NAVIGATION FOOTER (REVISED) */
/* ══════════════════════════════════════════ */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(13, 13, 18, 0.96);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    z-index: 2500;
    justify-content: space-around;
    align-items: flex-end; /* Align items to bottom to allow center button to overflow */
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    transition: 0.3s;
    flex: 1;
    height: 100%;
    padding-bottom: 8px;
}

.mobile-bottom-item i,
.mobile-bottom-item svg {
    width: 22px !important;
    height: 22px !important;
    margin-bottom: 4px;
    transition: 0.3s;
    display: inline-block !important;
}

.mobile-bottom-item span {
    font-size: 0.68rem;
}

.mobile-bottom-item:hover,
.mobile-bottom-item.active {
    color: var(--primary-color);
}

.mobile-bottom-item.active i,
.mobile-bottom-item.active svg {
    stroke: var(--primary-color) !important;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

/* Floating Center Trade Button */
.mobile-bottom-trade-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    padding-bottom: 6px;
    position: relative;
}

.mobile-bottom-trade-btn {
    width: 50px;
    height: 50px;
    background: #00ff88; /* Bright green */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000; /* Black icon */
    text-decoration: none;
    box-shadow: 0 -3px 15px rgba(0, 255, 136, 0.4), 0 4px 15px rgba(0, 255, 136, 0.2);
    position: absolute;
    top: -20px; /* Float above the navigation bar */
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2501;
}

.mobile-bottom-trade-btn i,
.mobile-bottom-trade-btn svg {
    width: 26px !important;
    height: 26px !important;
    stroke: #000000 !important;
    fill: #000000 !important; /* Solid lightning bolt */
    display: inline-block !important;
}

.mobile-bottom-trade-btn:hover,
.mobile-bottom-trade-btn.active {
    transform: scale(1.1);
    background: #00ffaa;
    box-shadow: 0 -3px 20px rgba(0, 255, 170, 0.6), 0 4px 20px rgba(0, 255, 170, 0.3);
}

.mobile-bottom-trade-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-top: 32px; /* Shift text down to leave room for the floating button */
    transition: 0.3s;
}

.mobile-bottom-trade-wrapper.active .mobile-bottom-trade-label {
    color: #00ff88;
}

@media (max-width: 992px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Make sure pages have extra padding at the bottom so content is not hidden behind the fixed bottom nav! */
    body {
        padding-bottom: 80px !important;
    }
}
