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

:root {
    --bg-dark: #060a12;
    --bg-panel: #0d1117;
    --bg-card: #141820;
    --border-color: #1e2435;
    --text-main: #e8eaf0;
    --text-muted: #6b7280;
    --success: #16c784;
    --danger: #ea3943;
    --accent: #3861fb;
    --accent-hover: #2b52e8;
    --accent-glow: rgba(56,97,251,0.25);
    --success-bg: rgba(22,199,132,0.08);
    --danger-bg: rgba(234,57,67,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* ==================== ANIMATIONS ==================== */
@keyframes slidein {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* ==================== LANDING & LOGIN ==================== */
.navbar {
    background: rgba(6,10,18,0.95);
    backdrop-filter: blur(20px);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo-icon {
    background: linear-gradient(135deg, var(--accent), #6c5ce7);
    color: white; width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; box-shadow: 0 4px 12px var(--accent-glow);
}
.logo-text { background: linear-gradient(135deg, #fff, #a0b4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { list-style: none; display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-main); }
.nav-btn { background: var(--accent) !important; padding: 8px 18px; border-radius: 8px; color: white !important; transition: background 0.2s, box-shadow 0.2s !important; }
.nav-btn:hover { background: var(--accent-hover) !important; box-shadow: 0 4px 16px var(--accent-glow) !important; }

.section { max-width: 1100px; margin: 40px auto; padding: 0 24px; }
.hero-container {
    text-align: center; margin-top: 100px;
    background: radial-gradient(ellipse at 50% 0%, rgba(56,97,251,0.12) 0%, transparent 70%);
    padding: 60px 0;
}
.hero-container h1 {
    font-size: 56px; font-weight: 800; line-height: 1.15; margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 40%, #7b9bff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { color: var(--text-muted); font-size: 18px; max-width: 640px; margin: 0 auto 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #5c7cfa);
    color: white; border: none; padding: 14px 28px; border-radius: 12px;
    font-weight: 700; cursor: pointer; font-size: 16px;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }

.form-container {
    max-width: 420px; margin: 80px auto;
    background: var(--bg-panel); padding: 40px;
    border-radius: 20px; border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.form-container h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.form-subtitle { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; }
.input-field {
    width: 100%; padding: 13px 16px; margin-bottom: 16px;
    background: var(--bg-dark); color: white;
    border: 1px solid var(--border-color); border-radius: 10px; outline: none;
    font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.input-field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,97,251,0.15); }
.full-width { width: 100%; }
.error-msg { color: var(--danger); margin-top: 8px; font-size: 13px; }
.hidden { display: none !important; }

/* ==================== CMC DASHBOARD ==================== */
.cmc-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.cmc-navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 28px;
    background: rgba(6,10,18,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
}
.cmc-nav-left { display: flex; align-items: center; gap: 28px; }
.cmc-logo { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; }
.cmc-logo svg { filter: drop-shadow(0 0 6px rgba(56,97,251,0.5)); }
.cmc-nav-link { color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 500; transition: color 0.2s; }
.cmc-nav-link:hover { color: var(--text-main); }
.cmc-nav-right { display: flex; align-items: center; gap: 16px; }
.portfolio-btn { color: var(--text-muted); cursor: pointer; font-size: 13px; }
.user-badge {
    background: linear-gradient(135deg, var(--accent), #6c5ce7);
    color: white; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.cmc-balance { color: var(--text-muted); font-size: 12px; background: var(--bg-card); padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-color); }
.cmc-balance span { color: var(--success); font-weight: 700; }
.btn-logout {
    background: transparent; border: 1px solid var(--border-color); color: var(--text-muted);
    padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600;
    transition: all 0.2s;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }

.cmc-breadcrumb { padding: 12px 28px; font-size: 12px; color: var(--text-muted); }
.cmc-breadcrumb span { color: var(--text-main); font-weight: 600; }

.cmc-main {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr) 330px;
    gap: 20px;
    padding: 16px 24px 80px;
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
}
.cmc-left-col {
    min-width: 320px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    padding-bottom: 40px;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 86px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1e2435 transparent;
}
.cmc-left-col::-webkit-scrollbar {
    width: 4px;
}
.cmc-left-col::-webkit-scrollbar-thumb {
    background: #1e2435;
    border-radius: 4px;
}
.cmc-left-col::-webkit-scrollbar-thumb:hover {
    background: #3861fb;
}
.cmc-center-col {
    min-width: 0;
    overflow: hidden;
}
.cmc-right-col {
    min-width: 320px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    padding-bottom: 40px;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 86px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1e2435 transparent;
}
.cmc-right-col::-webkit-scrollbar {
    width: 4px;
}
.cmc-right-col::-webkit-scrollbar-thumb {
    background: #1e2435;
    border-radius: 4px;
}
.cmc-right-col::-webkit-scrollbar-thumb:hover {
    background: #3861fb;
}
.cmc-card-stat {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #1e2435;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    box-sizing: border-box;
    width: 100%;
}

/* ==================== LEFT COL ==================== */
.coin-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.coin-title-row { display: flex; align-items: center; gap: 12px; }
.coin-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent), #6c5ce7);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 20px; box-shadow: 0 4px 16px var(--accent-glow);
}
.coin-title-row h1 { font-size: 22px; font-weight: 700; margin: 0; }
.coin-ticker {
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 2px 8px; border-radius: 6px; font-size: 11px; color: var(--text-muted);
}
.rank-badge {
    background: linear-gradient(135deg, #f7931a22, #f7931a44);
    color: #f7931a; border: 1px solid #f7931a44;
    padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700;
}

.coin-price-section { margin-bottom: 20px; }
.huge-price { font-size: 36px; font-weight: 800; margin-bottom: 8px; transition: color 0.3s; }
.price-change {
    display: inline-block; font-size: 14px; font-weight: 700;
    padding: 5px 12px; border-radius: 8px;
}
.success-text { color: var(--success) !important; }
.danger-text { color: var(--danger) !important; }

.stats-grid { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }
.stat-box { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.stat-label { color: var(--text-muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.info-icon { display: inline-flex; width: 14px; height: 14px; border: 1px solid var(--text-muted); border-radius: 50%; align-items: center; justify-content: center; font-size: 9px; }
.verified-icon { color: var(--accent); }
.stat-value { font-size: 13px; font-weight: 700; }
.stat-sub { font-size: 11px; color: var(--success); }

/* Trade Widget */
.buy-widget {
    background: var(--bg-panel); border-radius: 16px;
    padding: 20px; border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.buy-widget h3 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.input-group { margin-bottom: 10px; }
.cmc-input {
    width: 100%; padding: 11px 14px;
    background: var(--bg-dark); border: 1px solid var(--border-color);
    color: white; border-radius: 10px; outline: none;
    font-size: 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s;
}
.cmc-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,97,251,0.12); }
.cmc-input::placeholder { color: var(--text-muted); }

.trade-tabs { display: flex; gap: 8px; margin-bottom: 16px; background: var(--bg-dark); padding: 4px; border-radius: 10px; }
.trade-tab {
    flex: 1; padding: 8px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; border-radius: 8px;
    font-weight: 700; font-size: 13px; transition: all 0.2s; font-family: inherit;
}
.trade-tab.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }
.trade-tab.active#tabSell { background: var(--danger); box-shadow: 0 2px 8px rgba(234,57,67,0.3); }

.btn-buy-full {
    background: linear-gradient(135deg, var(--accent), #5c7cfa);
    color: white; border: none; width: 100%; padding: 13px;
    border-radius: 10px; font-weight: 700; cursor: pointer; font-size: 14px;
    font-family: inherit; transition: all 0.2s;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-buy-full:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-buy-full.sell-mode {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    box-shadow: 0 4px 16px rgba(234,57,67,0.25);
}
.btn-buy-full.sell-mode:hover { box-shadow: 0 8px 24px rgba(234,57,67,0.4); }
.status-msg { margin-top: 12px; font-size: 12px; text-align: center; min-height: 18px; }

/* ==================== CENTER COL ==================== */
.tabs-row { display: flex; gap: 24px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; }
.tab { padding-bottom: 12px; color: var(--text-muted); font-weight: 600; cursor: pointer; font-size: 14px; position: relative; transition: color 0.2s; }
.tab.active { color: var(--text-main); }
.tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--accent); border-radius: 2px; }
.tab:hover { color: var(--text-main); }

.chart-wrapper {
    background: var(--bg-panel); border-radius: 16px;
    border: 1px solid var(--border-color); padding: 20px;
    height: 480px; margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.markets-section { margin-top: 8px; }
.cmc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmc-table th {
    color: var(--text-muted); font-weight: 600; text-align: left;
    padding: 10px 12px; border-bottom: 1px solid var(--border-color);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
}
.cmc-table td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cmc-table tr:hover td { background: rgba(255,255,255,0.025); }
.exchange-name { display: flex; align-items: center; }
.pair-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 12px; }
.pair-link:hover { text-decoration: underline; }
.mkt-price { font-weight: 700; font-size: 13px; transition: color 0.3s; }

/* ==================== RIGHT COL ==================== */
.community-widget {
    background: var(--bg-panel); border-radius: 16px;
    border: 1px solid var(--border-color); padding: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.community-header { display: flex; gap: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; padding-bottom: 4px; }
.post-card { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.post-card:last-child { border-bottom: none; padding-bottom: 0; }
.highlight-post {
    background: linear-gradient(135deg, rgba(56,97,251,0.08), rgba(108,92,231,0.06));
    padding: 14px; border-radius: 12px; border: 1px solid rgba(56,97,251,0.2);
    margin-bottom: 14px;
}
.badge-new {
    background: linear-gradient(135deg, var(--success), #00b894);
    color: #000; font-size: 9px; padding: 2px 7px; border-radius: 4px;
    font-weight: 800; margin-left: 8px;
}
.post-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.highlight-post p { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-weight: 800; font-size: 14px;
}
.author-info { font-size: 13px; font-weight: 600; }
.username-tag { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.post-body { font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.hashtag { color: var(--accent); cursor: pointer; font-weight: 600; }
.hashtag:hover { text-decoration: underline; }

/* Live Trades Feed */
#liveTradesFeed .live-trade-item:hover { background: rgba(255,255,255,0.05) !important; }

/* Red dot pulse */
.live-dot {
    width: 8px; height: 8px; background: var(--danger);
    border-radius: 50%; display: inline-block; margin-right: 6px;
    animation: pulse 1.5s infinite;
}

/* ==================== PRO CHART UI ==================== */
.chart-container-pro {
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.chart-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
    flex-wrap: wrap;
    gap: 8px;
}
.chart-topbar-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chart-topbar-right { display: flex; align-items: center; gap: 8px; }

.chart-type-btn {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.2s;
    user-select: none;
}
.chart-type-btn:hover { color: var(--text-main); border-color: var(--border-color); }
.chart-type-btn.active { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }

.chart-separator { width: 1px; height: 18px; background: var(--border-color); margin: 0 4px; }

.ohlc-display { font-size: 12px; font-family: 'Inter', monospace; }

.timeframe-group { display: flex; gap: 2px; background: var(--bg-dark); padding: 3px; border-radius: 8px; }
.tf-btn {
    padding: 4px 10px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; border-radius: 6px;
    font-size: 12px; font-weight: 600; font-family: inherit;
    transition: all 0.2s;
}
.tf-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.tf-btn.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px var(--accent-glow); }

.chart-with-toolbar { display: flex; }

.chart-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid var(--border-color);
    min-width: 40px;
}
.toolbar-btn {
    width: 30px; height: 30px;
    border: none; background: transparent;
    color: var(--text-muted); cursor: pointer;
    border-radius: 6px; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.toolbar-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-main); }
.toolbar-btn.active { background: rgba(56,97,251,0.2); color: var(--accent); }
.toolbar-sep { width: 20px; height: 1px; background: var(--border-color); margin: 4px 0; }

/* ==================== WALLET PANEL ==================== */
.wallet-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.wallet-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.wallet-val   { font-size: 13px; font-weight: 700; text-align: right; }

/* ==================== NEWS PANEL ==================== */
.news-panel { padding: 8px 0; }
.news-item {
    padding: 18px 0; border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease;
}
.news-item:last-child { border-bottom: none; }
.news-badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700; margin-bottom: 8px;
    background: rgba(234,57,67,0.15); color: var(--danger);
    border: 1px solid rgba(234,57,67,0.3);
}
.news-badge-blue { background: rgba(56,97,251,0.15) !important; color: var(--accent) !important; border-color: rgba(56,97,251,0.3) !important; }
.news-badge-green { background: rgba(22,199,132,0.15) !important; color: var(--success) !important; border-color: rgba(22,199,132,0.3) !important; }
.news-title { font-size: 15px; font-weight: 700; margin-bottom: 5px; line-height: 1.4; }
.news-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.news-body { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ==================== ABOUT PANEL ==================== */
.about-panel { padding: 8px 0; }
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; margin-top: 8px;
}
.about-card {
    background: var(--bg-card); border-radius: 12px;
    padding: 18px; border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}
.about-card:hover { border-color: var(--accent); }
.about-card-icon { font-size: 24px; margin-bottom: 10px; }
.about-card-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.about-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.wallet-provider-btn { display:flex; align-items:center; gap:14px; width:100%; padding:14px 16px; background:#141820; border:1px solid #1e2435; color:#fff; border-radius:12px; cursor:pointer; font-family:inherit; transition:all 0.2s; text-align:left; } .wallet-provider-btn:hover { border-color:#3861fb; background:#1e2435; transform:translateX(2px); }
.quick-amt-btn{padding:6px 12px;background:var(--bg-card);border:1px solid var(--border-color);color:var(--text-muted);border-radius:6px;font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;transition:all 0.2s;} .quick-amt-btn.active,.quick-amt-btn:hover{background:var(--accent);color:white;border-color:var(--accent);}

/* ===== MEGA MENU ===== */
.cmc-nav-item { position: relative; }
.cmc-nav-item:hover .mega-menu { display: flex; opacity: 1; transform: translateY(0); pointer-events: all; }
.mega-menu {
    display: none; opacity: 0; transform: translateY(-8px);
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-8px);
    background: #0d1117; border: 1px solid #1e2435; border-radius: 16px;
    padding: 20px; gap: 32px; min-width: 680px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.8); z-index: 9999;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none; /* mega-menu-hidden */
}
.cmc-nav-item:hover .mega-menu { display: flex; opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: all; }
.mega-col { min-width: 160px; }
.mega-col-title { font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.mega-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background 0.15s; text-decoration: none; }
.mega-item:hover { background: rgba(255,255,255,0.06); }
.mega-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.mega-item-label { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.mega-item-label .badge-new { margin-left: 6px; padding: 1px 6px; background: rgba(56,97,251,0.2); color: #3861fb; border-radius: 4px; font-size: 10px; font-weight: 700; }
.mega-item:hover .mega-item-label { color: white; }
.mega-mini { min-width: 480px; }
.mega-mini .mega-col { min-width: 120px; }

/* ===== MEGA MENU ===== */
.mega-menu{display:none;background:#0d1117;border:1px solid #1e2435;border-radius:16px;padding:20px;gap:24px;box-shadow:0 16px 48px rgba(0,0,0,0.8);z-index:9999;}
.mega-col{min-width:150px;}
.mega-col-title{font-size:11px;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:0.08em;margin-bottom:10px;padding:0 8px;}
.mega-item{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:10px;cursor:pointer;transition:background 0.12s;text-decoration:none;}
.mega-item:hover{background:rgba(255,255,255,0.07);}
.mega-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;color:white;}
.mega-item-label{font-size:13px;font-weight:600;color:#e2e8f0;}

/* ===== TRADE HISTORY STYLES ===== */
.th-filter {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #1e2435;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.th-filter:hover { border-color: #3861fb; color: #e2e8f0; }
.th-filter.active { background: #3861fb; border-color: #3861fb; color: white; }

/* ===== PRICE COLOR UTILITIES ===== */
.price-up { color: #16c784 !important; }
.price-down { color: #ea3943 !important; }
.price-neutral { color: #a1a7bb !important; }

/* Price change badge */
.chg-up { color: #16c784; font-weight: 700; }
.chg-down { color: #ea3943; font-weight: 700; }

/* Coin logo fallback */
.coin-logo-fallback {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #3861fb, #16c784);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: white; flex-shrink: 0;
}

/* DexScan-style header OHLC */
.ohlc-pos { color: #16c784; font-weight: 700; font-size: 12px; }
.ohlc-neg { color: #ea3943; font-weight: 700; font-size: 12px; }

/* Buy/Sell badges */
.badge-buy-green { 
    display:inline-flex;align-items:center;gap:4px;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(22,199,132,0.15); border: 1px solid rgba(22,199,132,0.3);
    color: #16c784; font-size: 12px; font-weight: 700;
}
.badge-sell-red {
    display:inline-flex;align-items:center;gap:4px;
    padding: 3px 10px; border-radius: 6px;
    background: rgba(234,57,67,0.15); border: 1px solid rgba(234,57,67,0.3);
    color: #ea3943; font-size: 12px; font-weight: 700;
}

/* Animated price flash */
@keyframes flashGreen { 0%,100%{background:transparent;} 50%{background:rgba(22,199,132,0.15);} }
@keyframes flashRed { 0%,100%{background:transparent;} 50%{background:rgba(234,57,67,0.15);} }
.flash-green { animation: flashGreen 0.6s ease; }
.flash-red { animation: flashRed 0.6s ease; }

/* ===== GLOBAL PRICE COLOR SYSTEM ===== */
.pos, .price-up, .success-text { color: #16c784 !important; }
.neg, .price-down, .danger-text { color: #ea3943 !important; }

/* Candlestick OHLC info line colors */
.ohlc-display span { font-family: 'Inter', monospace; font-size: 12px; }

/* Huge price blink on tick */
.huge-price { transition: color 0.3s ease; }

/* Market table row flash */
@keyframes rowFlashGreen {
  0% { background: transparent; }
  30% { background: rgba(22,199,132,0.12); }
  100% { background: transparent; }
}
@keyframes rowFlashRed {
  0% { background: transparent; }
  30% { background: rgba(234,57,67,0.12); }
  100% { background: transparent; }
}
.flash-green { animation: rowFlashGreen 0.7s ease !important; }
.flash-red   { animation: rowFlashRed 0.7s ease !important; }

/* % badge inline */
.pct-badge {
    display: inline-flex; align-items: center; gap: 2px;
    font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.pct-badge.up  { color: #16c784; }
.pct-badge.dn  { color: #ea3943; }

/* ===== CRITICAL Z-INDEX FIX ===== */
#landingScreen { position: relative; z-index: 1; pointer-events: all !important; }
#landingScreen * { pointer-events: auto; }
.hero-container { position: relative; z-index: 2; pointer-events: all; }
.hero-actions button { position: relative; z-index: 10; pointer-events: all !important; cursor: pointer !important; }
#mainNav { position: relative; z-index: 200; pointer-events: all; }
#mainNav * { pointer-events: auto; }
.mega-menu[style*="display:none"], .mega-menu.hidden { display: none !important; }
.mega-menu { pointer-events: auto; }
/* Fix: dashboard hidden means truly no interaction */
.hidden { display: none !important; }

@keyframes blobFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-20px) scale(1.05); }
    66% { transform: translate(-20px,15px) scale(0.97); }
}
@keyframes pulse {
    0%,100% { opacity:1; transform:scale(1); }
    50% { opacity:0.5; transform:scale(1.3); }
}

/* ===== CHART LAYOUT FIX ===== */
.chart-container-pro {
    display: flex;
    flex-direction: column;
    border: 1px solid #1e2435;
    border-radius: 12px;
    overflow: hidden;
    background: #0d1117;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.chart-container-pro.hidden,
#panel-news.hidden,
#panel-about.hidden,
#panel-markets.hidden,
.hidden {
    display: none !important;
}

/* ===== PRO FULLSCREEN CHART MODE ===== */
.chart-container-pro.fullscreen-mode {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 999999 !important;
    background: #080c14 !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 10px 16px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 0 60px rgba(0,0,0,0.95) !important;
}

.chart-container-pro.fullscreen-mode .chart-with-toolbar {
    flex: 1 1 auto !important;
    height: calc(100vh - 170px) !important;
    min-height: calc(100vh - 170px) !important;
}

.chart-container-pro.fullscreen-mode #tvChart {
    height: 100% !important;
    min-height: calc(100vh - 170px) !important;
}

.chart-container-pro.fullscreen-mode #tvVolume {
    height: 80px !important;
    min-height: 80px !important;
}

.chart-with-toolbar {
    display: flex !important;
    position: relative;
    overflow: hidden;
}
.chart-toolbar {
    width: 36px !important;
    min-width: 36px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 8px 0 !important;
    gap: 4px !important;
    background: #0d1117 !important;
    border-right: 1px solid #1e2435 !important;
    z-index: 10 !important;
}
.toolbar-btn {
    width: 28px !important;
    height: 28px !important;
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    transition: all 0.15s !important;
}
.toolbar-btn:hover, .toolbar-btn.active {
    background: rgba(56,97,251,0.15) !important;
    color: #3861fb !important;
}
#tvChart { flex: 1 !important; min-width: 0 !important; }
.tf-btn {
    padding: 4px 8px !important;
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    transition: all 0.15s !important;
    font-family: inherit !important;
}
.tf-btn:hover { color: white !important; background: rgba(255,255,255,0.06) !important; }
.tf-btn.active { color: white !important; background: #3861fb !important; }
.chart-type-btn {
    padding: 5px 12px !important;
    background: transparent !important;
    border: none !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    transition: all 0.15s !important;
    font-family: inherit !important;
}
.chart-type-btn:hover { color: white !important; }
.chart-type-btn.active { color: white !important; background: #3861fb !important; }

/* ===== INDEPENDENT COLUMN SCROLLING (CMC Style) ===== */
.cmc-content-grid {
    display: grid !important;
    grid-template-columns: 280px 1fr 320px !important;
    gap: 16px !important;
    align-items: start !important; /* critical: don't stretch columns */
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 16px 16px 0 !important;
}
/* Left sidebar: sticky + independent scroll */
.cmc-left-col {
    position: sticky !important;
    top: 64px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #1e2435 transparent !important;
    padding-bottom: 16px !important;
}
/* Center: normal scroll with page */
.cmc-center-col {
    min-width: 0 !important;
    overflow: visible !important;
}
/* Right sidebar: sticky + independent scroll */
.cmc-right-col {
    position: sticky !important;
    top: 64px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #1e2435 transparent !important;
    padding-bottom: 16px !important;
}
/* Webkit scrollbar styling */
.cmc-left-col::-webkit-scrollbar,
.cmc-right-col::-webkit-scrollbar { width: 4px; }
.cmc-left-col::-webkit-scrollbar-track,
.cmc-right-col::-webkit-scrollbar-track { background: transparent; }
.cmc-left-col::-webkit-scrollbar-thumb,
.cmc-right-col::-webkit-scrollbar-thumb { background: #1e2435; border-radius: 4px; }
/* Page body scrolls normally */
body { overflow-y: auto !important; }

/* ===== ANTI-BLEED: Prevent sidebar text from showing in chart area ===== */
.cmc-content-grid {
    overflow: hidden !important;
}
.chart-container-pro {
    overflow: hidden !important;
    position: relative !important;
    z-index: 2 !important;
    isolation: isolate !important;
}
.chart-with-toolbar {
    overflow: hidden !important;
    isolation: isolate !important;
}
.cmc-left-col {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1 !important;
}
/* Prevent left col stats text bleeding through chart gap */
.cmc-left-col .stat-box,
.cmc-left-col .stat-value,
.cmc-left-col .stat-sub {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}
/* Chart toolbar: absolutely NO overflow outside its container */
.chart-toolbar {
    overflow: hidden !important;
    z-index: 5 !important;
    position: relative !important;
}
/* LightWeight Chart: GPU-accelerated rendering to prevent flicker */
#tvChart, #tvVolume {
    will-change: transform !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}
/* Prevent chart content area from spilling into sidebar */
.cmc-center-col {
    overflow: hidden !important;
    min-width: 0 !important;
}

/* ===== LOCKED TOPBAR LAYOUT (CMC Style - DO NOT CHANGE) ===== */
/* Row 1: Price/MktCap + Chart type + TV + arrows + OHLC */
/* Row 2: Indicators + Timeframes */
.chart-container-pro > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
#ohlcDisplay {
    font-family: 'Inter', 'Roboto Mono', monospace !important;
    font-size: 12px !important;
    letter-spacing: 0.01em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ==================== NOVA PRO MODAL SYSTEM ==================== */
.nova-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 13, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nova-modal-card {
    background: #0d1117;
    border: 1px solid rgba(56, 97, 251, 0.3);
    border-radius: 20px;
    width: 680px;
    max-width: 96vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(56, 97, 251, 0.15);
    position: relative;
    animation: slidein 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #e8eaf0;
}
.nova-modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid #1e2435;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}
.nova-modal-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nova-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(56, 97, 251, 0.3);
}
.nova-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}
.nova-modal-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}
.nova-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #1e2435;
    color: #a1a7bb;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s;
}
.nova-modal-close:hover {
    background: rgba(234, 57, 67, 0.15);
    border-color: rgba(234, 57, 67, 0.4);
    color: #ea3943;
    transform: scale(1.05);
}
.nova-modal-body {
    padding: 24px 28px;
}

/* Indicators Modal Checklist */
.indicator-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #1e2435;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
}
.indicator-row:hover {
    background: rgba(56, 97, 251, 0.06);
    border-color: rgba(56, 97, 251, 0.3);
}
.indicator-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #3861fb;
    cursor: pointer;
}

/* Mega menu dropdown fixes */
.cmc-nav-link {
    user-select: none;
    cursor: pointer !important;
}
.mega-menu {
    border: 1px solid rgba(56, 97, 251, 0.3) !important;
    background: rgba(13, 17, 23, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 97, 251, 0.15) !important;
}


 . d i a m o n d - b t n   {   b o r d e r - c o l o r :   # f 7 9 3 1 a ;   c o l o r :   # f 7 9 3 1 a ;   b a c k g r o u n d :   r g b a ( 2 4 7 ,   1 4 7 ,   2 6 ,   0 . 1 ) ;   a n i m a t i o n :   p u l s e   2 s   i n f i n i t e ;   } 
 . d i a m o n d - b t n : h o v e r   {   b a c k g r o u n d :   # f 7 9 3 1 a ;   c o l o r :   w h i t e ;   } 
 @ k e y f r a m e s   p u l s e   {   0 %   {   b o x - s h a d o w :   0   0   0   0   r g b a ( 2 4 7 ,   1 4 7 ,   2 6 ,   0 . 4 ) ;   }   7 0 %   {   b o x - s h a d o w :   0   0   0   1 0 p x   r g b a ( 2 4 7 ,   1 4 7 ,   2 6 ,   0 ) ;   }   1 0 0 %   {   b o x - s h a d o w :   0   0   0   0   r g b a ( 2 4 7 ,   1 4 7 ,   2 6 ,   0 ) ;   }   } 
  
 

.diamond-btn { border-color: #f7931a; color: #f7931a; background: rgba(247, 147, 26, 0.1); animation: pulse 2s infinite; }
.diamond-btn:hover { background: #f7931a; color: white; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(247, 147, 26, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(247, 147, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(247, 147, 26, 0); } }

/* ==================== CMC GLOBAL REAL-TIME SEARCH ==================== */
.cmc-search-container {
    position: relative;
    min-width: 240px;
    max-width: 300px;
}
.cmc-search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 17, 23, 0.92);
    border: 1px solid rgba(56, 97, 251, 0.25);
    border-radius: 10px;
    padding: 6px 12px;
    cursor: text;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.cmc-search-input-wrapper:hover {
    border-color: rgba(56, 97, 251, 0.5);
    background: rgba(13, 17, 23, 1);
}
.cmc-search-input-wrapper:focus-within {
    border-color: #3861fb;
    box-shadow: 0 0 0 3px rgba(56, 97, 251, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4);
    background: #0d1117;
}
.cmc-search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    width: 100%;
}
.cmc-search-input-wrapper input::placeholder {
    color: #6b7280;
    font-size: 12px;
}
.search-key-hint {
    font-size: 10px;
    font-weight: 700;
    color: #a1a7bb;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    user-select: none;
}
.search-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 480px;
    overflow-y: auto;
    background: rgba(13, 17, 23, 0.98);
    border: 1px solid rgba(56, 97, 251, 0.35);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(56, 97, 251, 0.15);
    z-index: 99999;
    padding: 8px;
    backdrop-filter: blur(24px);
    animation: fadeInDown 0.18s ease-out;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-dropdown-header {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}
.search-coin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.search-coin-item:hover, .search-coin-item.active {
    background: rgba(56, 97, 251, 0.15);
    transform: translateX(3px);
}
.search-coin-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.search-coin-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}
.search-coin-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-coin-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-coin-sub {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}
.search-coin-rank {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #a1a7bb;
}
.search-coin-right {
    text-align: right;
    flex-shrink: 0;
}
.search-coin-price {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}
.search-coin-change {
    font-size: 11px;
    font-weight: 600;
}
.search-coin-change.up { color: #16c784; }
.search-coin-change.down { color: #ea3943; }

/* FUTURES LEVERAGE ACTIVE BUTTON */
.lev-btn.lev-active {
    background: linear-gradient(135deg, #3861fb, #5c7cfa) !important;
    color: #ffffff !important;
    border-color: #3861fb !important;
    font-weight: 800 !important;
    box-shadow: 0 0 12px rgba(56, 97, 251, 0.45);
}

/* GLOBAL MODAL & OVERLAY SYSTEM */
.modal, .modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 10, 18, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.modal-content, .modal-box {
    background: #0d1117;
    border: 1px solid #1e2435;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 97, 251, 0.15);
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* RESPONSIVE BREAKPOINTS (TABLET & MOBILE) */
@media (max-width: 1024px) {
    .cmc-main {
        flex-direction: column !important;
    }
    .cmc-left-col, .cmc-center-col, .cmc-right-col {
        width: 100% !important;
        max-width: 100% !important;
    }
    .cmc-search-container {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .cmc-navbar {
        padding: 0 14px !important;
        height: auto !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    .cmc-nav-left, .cmc-nav-right {
        width: 100% !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .cmc-search-container {
        width: 100% !important;
    }
    .search-dropdown-menu {
        width: 100% !important;
        right: 0 !important;
        left: 0 !important;
    }
    .status-bar {
        padding: 4px 10px !important;
        font-size: 10px !important;
    }
    .tabs-row {
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 480px) {
    .huge-price {
        font-size: 24px !important;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .btn-trade {
        font-size: 13px !important;
        padding: 10px !important;
    }
}

/* ==================== CMC API MEGA DROPDOWN & DEVELOPER HUB ==================== */
.cmc-api-dropdown {
    display: none;
    position: absolute;
    top: 36px;
    left: -80px;
    width: 520px;
    background: #141724;
    border: 1px solid #232738;
    border-radius: 18px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: 18px;
    z-index: 99999;
    backdrop-filter: blur(24px);
    animation: fadeIn 0.15s ease-out;
}
.cmc-api-cols {
    display: flex;
    gap: 16px;
}
.cmc-api-col {
    flex: 1;
    min-width: 220px;
}
.cmc-api-col-title {
    font-size: 11px;
    color: #858ca2;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 8px;
}
.cmc-api-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #cfd6e4;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cmc-api-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(4px);
}
.cmc-api-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.cmc-api-label {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.1px;
}
.cmc-api-divider {
    height: 1px;
    background: #232738;
    margin: 8px 6px;
}

/* Developer Studio Tabs in Modal */
.api-studio-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #1e2435;
    padding-bottom: 12px;
    margin-bottom: 18px;
    overflow-x: auto;
}
.api-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #a1a7bb;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}
.api-tab-btn:hover {
    color: white;
    background: rgba(255,255,255,0.04);
}
.api-tab-btn.active {
    color: white;
    background: #1e2435;
    border-color: #3861fb;
    box-shadow: 0 2px 10px rgba(56,97,251,0.2);
}
.api-code-block {
    background: #080c14;
    border: 1px solid #1e2435;
    border-radius: 12px;
    padding: 14px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    color: #e2e8f0;
    position: relative;
    overflow-x: auto;
}

/* ==================== UNIVERSAL NOVA PRO MODAL ==================== */
.nova-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}
.nova-modal-card {
    background: #0d111c;
    border: 1px solid #232738;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: slidein 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.nova-modal-card.wide-modal {
    max-width: 880px;
}
.nova-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #1e2435;
    background: #111524;
}
.nova-modal-title-box {
    display: flex;
    align-items: center;
    gap: 14px;
}
.nova-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.nova-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0;
}
.nova-modal-subtitle {
    font-size: 12.5px;
    color: #a1a7bb;
    margin-top: 2px;
}
.nova-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a1a7bb;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}
.nova-modal-close:hover {
    background: rgba(234, 57, 67, 0.2);
    color: #ea3943;
    border-color: #ea3943;
}
.nova-modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    color: #e2e8f0;
}

/* ==================== CMC MEGA MENU & API DROPDOWN ==================== */
.cmc-nav-item:hover:not(.is-closed) > .mega-menu:not(.is-closed),
.mega-menu.force-show:not(.is-closed) {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

.cmc-nav-item.is-closed .mega-menu,
.mega-menu.is-closed,
.mega-menu.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.mega-menu {
    display: none;
    background: #171924;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    padding: 18px 20px;
    z-index: 10000;
    position: absolute;
}

.mega-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #a1a7bb;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.15s;
    z-index: 100;
}
.mega-close-btn:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}
.cmc-api-dropdown {
    min-width: 440px;
    background: #181b2a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
    padding: 16px 18px;
}
.cmc-api-cols {
    display: grid;
    grid-template-columns: 210px 190px;
    gap: 16px;
    width: 100%;
}
.cmc-api-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cmc-api-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #858ca2;
    padding: 4px 10px 8px 10px;
}
.cmc-api-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}
.cmc-api-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}
.cmc-api-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.cmc-api-icon svg {
    display: block;
}
.cmc-api-label {
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f3f7;
    white-space: nowrap;
}
.cmc-api-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 10px;
}

/* API Studio Tabs & Components in Modal */
.api-studio-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #1e2435;
    padding-bottom: 12px;
    margin-bottom: 18px;
    overflow-x: auto;
}
.api-tab-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #a1a7bb;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.api-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.api-tab-btn.active {
    background: #3861fb;
    color: #ffffff;
    border-color: #3861fb;
    box-shadow: 0 4px 12px rgba(56, 97, 251, 0.35);
}
.api-code-block {
    background: #080c14;
    border: 1px solid #1e2435;
    border-radius: 10px;
    padding: 14px 16px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #e2e8f0;
}

/* ==================== PRICE FLASH ANIMATIONS ==================== */
@keyframes flashGreen {
    0% { background-color: rgba(22, 199, 132, 0.45); color: #16c784; transform: scale(1.02); }
    100% { background-color: transparent; transform: scale(1); }
}

@keyframes flashRed {
    0% { background-color: rgba(234, 57, 67, 0.45); color: #ea3943; transform: scale(1.02); }
    100% { background-color: transparent; transform: scale(1); }
}

.flash-up {
    animation: flashGreen 0.75s ease-out;
    border-radius: 4px;
}

.flash-down {
    animation: flashRed 0.75s ease-out;
    border-radius: 4px;
}

/* ==================== OPERATIONAL LATENCY BADGE ==================== */
.latency-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #16c784;
    background: rgba(22, 199, 132, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(22, 199, 132, 0.25);
    white-space: nowrap;
}

.latency-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16c784;
    box-shadow: 0 0 6px #16c784;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* GOOGLE SIGN IN & REGISTER BUTTON */
.btn-google-custom {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-family: inherit;
    margin-bottom: 6px;
}
.btn-google-custom:hover {
    background: #f9fafb;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}
.btn-google-custom:active {
    transform: translateY(0);
}

/* ==================== NOVA COMPREHENSIVE LAYOUT & MEGA-MENU MASTER FIX ==================== */

/* --- WRAPPER SAFETY --- */
.cmc-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
}

/* --- CMC DASHBOARD NAVBAR (OVERFLOW: VISIBLE IS MANDATORY FOR DROPDOWNS) --- */
.cmc-navbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    height: 58px !important;
    min-height: 58px !important;
    background: rgba(6, 10, 18, 0.98) !important;
    border-bottom: 1px solid var(--border-color) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    overflow: visible !important; /* CRITICAL: Never set overflow hidden/auto or dropdowns get clipped! */
    flex-wrap: nowrap !important;
}

.cmc-nav-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

.cmc-nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 1 !important;
    flex-wrap: nowrap !important;
}

/* Compact search container so navbar fits easily */
.cmc-search-container {
    width: 160px !important;
    min-width: 120px !important;
    max-width: 220px !important;
    transition: width 0.2s ease !important;
}
.cmc-search-container:focus-within {
    width: 200px !important;
}
.cmc-search-input-wrapper {
    padding: 4px 8px !important;
    border-radius: 8px !important;
}
.cmc-search-input-wrapper input {
    font-size: 12px !important;
}

/* Compact status and action buttons */
.latency-badge {
    padding: 3px 8px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
}

.cmc-nav-right > a,
.cmc-nav-right > button {
    padding: 5px 8px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.cmc-balance {
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.user-badge {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.btn-logout {
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 7px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* --- MEGA MENU BASE & DROPDOWNS --- */
.mega-menu {
    position: absolute !important;
    z-index: 10001 !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    background: #0d1117 !important;
    border: 1px solid #1e2435 !important;
    border-radius: 14px !important;
    pointer-events: auto !important;
}

/* EKOSISTEM DROPDOWN: BEAUTIFUL VERTICAL 4-CARD STACK (NEVER ROW!) */
#mm-ekosistem {
    width: 320px !important;
    min-width: 320px !important;
    max-width: 330px !important;
    display: none;
    flex-direction: column !important;
    padding: 14px !important;
    gap: 8px !important;
    top: 36px !important;
    left: 0 !important;
}

#mm-ekosistem.force-show,
.cmc-nav-item:hover > #mm-ekosistem:not(.is-closed) {
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#mm-ekosistem > a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    transition: all 0.18s ease !important;
}

#mm-ekosistem > a:hover {
    transform: translateX(4px) !important;
    background: rgba(56, 97, 251, 0.15) !important;
    border-color: rgba(56, 97, 251, 0.4) !important;
}

/* --- CMC DASHBOARD 3-COLUMN MASTER GRID --- */
.cmc-main {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) 300px !important;
    gap: 16px !important;
    padding: 14px 18px 60px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    align-items: start !important;
}

.cmc-left-col {
    min-width: 280px !important;
    max-width: 310px !important;
    width: 100% !important;
    position: sticky !important;
    top: 70px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.cmc-center-col {
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.cmc-right-col {
    min-width: 280px !important;
    max-width: 310px !important;
    width: 100% !important;
    position: sticky !important;
    top: 70px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

.chart-container-pro {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.chart-with-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

#tvChart, #tvVolume {
    width: 100% !important;
    max-width: 100% !important;
}

/* --- RESPONSIVE BREAKPOINTS --- */

/* Screens (< 1550px): Collapse action button texts into neat icons so user balances and profile never overflow */
@media (max-width: 1550px) {
    .cmc-action-btn .nav-text {
        display: none !important;
    }
    .cmc-action-btn {
        padding: 5px 8px !important;
        font-size: 13px !important;
    }
}

/* Medium Screens (< 1400px): Compact buttons in navbar to fit everything */
@media (max-width: 1400px) {
    .cmc-main {
        grid-template-columns: 280px minmax(0, 1fr) 280px !important;
        gap: 12px !important;
        padding: 10px 14px 50px !important;
    }
    .cmc-left-col, .cmc-right-col {
        min-width: 260px !important;
        max-width: 280px !important;
    }
    .cmc-search-container {
        width: 130px !important;
    }
    #mainNav {
        padding: 0 16px !important;
    }
}

/* Laptops / Scaled displays (< 1180px): Right column moves below center column */
@media (max-width: 1180px) {
    .cmc-main {
        grid-template-columns: 280px minmax(0, 1fr) !important;
        gap: 14px !important;
    }
    .cmc-right-col {
        grid-column: 1 / -1 !important;
        max-width: 100% !important;
        min-width: 0 !important;
        position: static !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    /* Compact navbar icons for narrow desktop */
    #liveLatencyDisplay { display: none !important; }
}

/* Tablets / Mobile (< 850px): Single Column */
@media (max-width: 850px) {
    .cmc-main {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 8px 8px 40px !important;
    }
    .cmc-left-col {
        grid-row: 1 !important;
        position: static !important;
        max-height: none !important;
        max-width: 100% !important;
    }
    .cmc-center-col {
        grid-row: 2 !important;
    }
    .cmc-right-col {
        grid-row: 3 !important;
        grid-column: 1 !important;
    }
    .cmc-navbar {
        padding: 0 10px !important;
    }
}

/* --- LANDING PAGE EKOSISTEM GRID --- */
@media (max-width: 1000px) {
    #landingScreen .esg-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 600px) {
    #landingScreen .esg-features-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- TICKER ANIMATION FIX --- */
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}
