/* ===========================
   CSS VARIABLES & RESET
   =========================== */
:root {
  --bg: #0b0e11;
  --bg2: #13171d;
  --bg3: #1a1f28;
  --card: #161b24;
  --card-hover: #1e2430;
  --border: #232a35;
  --border2: #2a3340;
  --text: #e8edf4;
  --text2: #8b98a8;
  --text3: #5a6474;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --accent-glow: rgba(59,130,246,0.15);
  --green: #10b981;
  --green2: #34d399;
  --red: #ef4444;
  --red2: #f87171;
  --orange: #f7931a;
  --purple: #8b5cf6;
  --header-h: 64px;
  --ticker-h: 34px;
  --market-bar-h: 48px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="light"] {
  --bg: #f4f6f9;
  --bg2: #ffffff;
  --bg3: #eef0f4;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: #e1e7ef;
  --border2: #d0d8e4;
  --text: #0f1923;
  --text2: #4a5568;
  --text3: #718096;
  --accent-glow: rgba(59,130,246,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
}

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

html { scroll-behavior: smooth; font-size: 16px; scrollbar-gutter: stable; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent2); }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   TICKER BAR
   =========================== */
.ticker-bar {
  background: var(--accent);
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ticker-label {
  flex-shrink: 0;
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-content {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
}

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

/* ===========================
   HEADER
   =========================== */
.header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  position: sticky;
  top: var(--ticker-h);
  z-index: 900;
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s;
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.logo-icon {
  width: 38px;
  height: 38px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Flame Coin logo — theme-aware circle fill */
.logo-bg, .logo-inner { fill: #f5f3ee; }
[data-theme="light"] .logo-bg,
[data-theme="light"] .logo-inner { fill: #14110d; }

.logo-main { font-size: 20px; font-weight: 800; color: var(--text); }
.logo-accent { font-size: 20px; font-weight: 800; color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-item {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.nav-item:hover, .nav-item.active {
  color: var(--text);
  background: var(--bg3);
}

.nav-item.active { color: var(--accent); }
.nav-item .arrow { font-size: 10px; margin-left: 2px; }

.nav-item.has-dropdown { user-select: none; }
.nav-item .arrow { font-size: 9px; margin-left: 3px; transition: transform .2s; display: inline-block; }
.nav-item.has-dropdown:hover .arrow { transform: rotate(180deg); }

/* ── Dropdown base ── */
/* Bridge element: keeps hover state while cursor moves from nav item to dropdown */
.nav-item.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 16px;
  /* invisible — just extends the hover area */
}

.dropdown {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04);
  z-index: 500;
  /* Close delay bumped to .35s — cursor can travel across the gap without closing */
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .35s;
}
.dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.nav-item.has-dropdown:hover .dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}

/* ── Markets dropdown ── */
.dd-markets { min-width: 270px; left: 0; transform: translateX(0) translateY(-8px); }
.dd-markets::before { left: 40px; transform: translateX(0) rotate(45deg); }

/* ── Topics mega-menu ── */
.dd-topics { min-width: 270px; left: 0; display: block !important; transform: translateX(0) translateY(-8px); }
.dd-topics::before { left: 40px; transform: translateX(0) rotate(45deg); }

/* override hover transform for both fixed-left dropdowns */
.nav-item.has-dropdown:hover .dd-markets,
.nav-item.has-dropdown:hover .dd-topics {
  transform: translateX(0) translateY(0);
}

.dd-topics-header {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text3); font-weight: 700;
  padding: 4px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ── Dropdown items ── */
.dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}
.dd-item:hover { background: var(--bg2); }

/* Coin icon circle — supports both emoji text and <img> logos */
.dd-coin-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
/* Real logo image inside the coin icon circle */
.dd-coin-icon img {
  width: 26px; height: 26px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
}

.dd-emoji { font-size: 20px; width: 38px; text-align: center; flex-shrink: 0; line-height: 1; }
.dd-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; color: var(--text); }
.dd-desc { font-size: 11px; color: var(--text3); line-height: 1.35; }
.dd-divider { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* Legacy compatibility */
.dropdown a:not(.dd-item) {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text2);
  transition: all 0.15s;
  text-decoration: none;
}
.dropdown a:not(.dd-item):hover { background: var(--bg2); color: var(--text); }

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-wrap:focus-within { border-color: var(--accent); }

.search-input {
  background: none;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  width: 180px;
}

.search-input::placeholder { color: var(--text3); }

.search-btn {
  padding: 8px 12px;
  color: var(--text3);
  transition: color 0.2s;
}

.search-btn:hover { color: var(--accent); }

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.theme-toggle:hover { background: var(--border); }

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.btn-subscribe {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-subscribe:hover {
  background: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 6px;
}

.burger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===========================
   MARKET BAR
   =========================== */
.market-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  height: var(--market-bar-h);
  overflow: hidden;
}

.market-bar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 16px;
}

.market-stats-label {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.market-cap-val {
  font-weight: 600;
  color: var(--text);
}

.coins-ticker {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.coins-ticker::-webkit-scrollbar { display: none; }

.coin-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}

.coin-item:hover { background: var(--bg3); }

.coin-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* Injected CoinGecko logo images */
.coin-sym-badge img,
.coin-sym-badge .cg-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}
.coin-row .cg-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.coins-ticker .cg-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 3px;
}

.coin-sym {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text2);
}

.coin-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.3s;
}

.coin-change {
  font-size: 12px;
  font-weight: 500;
}

.market-bar-more {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

/* ===========================
   UP / DOWN COLORS
   =========================== */
.up { color: var(--green); }
.down { color: var(--red); }
.change-cell.up { color: var(--green); }
.change-cell.down { color: var(--red); }

/* ===========================
   BADGES
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-bitcoin { background: rgba(247,147,26,0.15); color: #f7931a; }
.badge-ethereum { background: rgba(98,126,234,0.15); color: #627eea; }
.badge-defi { background: rgba(123,63,228,0.15); color: #9b73f0; }
.badge-nft { background: rgba(236,72,153,0.15); color: #ec4899; }
.badge-regulation { background: rgba(234,179,8,0.15); color: #eab308; }
.badge-altcoin { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-mining { background: rgba(100,116,139,0.15); color: #94a3b8; }
.badge-solana { background: rgba(153,69,255,0.15); color: #9945ff; }
.badge-hot { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ===========================
   SENTIMENT
   =========================== */
.sentiment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.sentiment.bullish { color: var(--green); }
.sentiment.bearish { color: var(--red); }
.sentiment.neutral { color: var(--text3); }
.sentiment.small { font-size: 11px; }

/* ===========================
   HERO SECTION
   =========================== */
.hero {
  padding: 32px 20px;
}

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

.hero-main {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-main:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-main-img-wrap {
  display: block;
  height: 320px;
  overflow: hidden;
  position: relative;
}

.hero-img-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-img-btc {
  background: url('https://images.unsplash.com/photo-1518546305927-5a555bb7020d?w=900&q=80&fit=crop') center/cover no-repeat;
}

.hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.5) 100%);
}

.hero-img-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.btc-chart-mock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 20px;
  opacity: 0.8;
}

.btc-chart-mock svg {
  width: 100%;
  height: 100%;
}

.hero-price-badge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(247,147,26,0.3);
  width: fit-content;
}

.price-coin {
  font-size: 14px;
  font-weight: 700;
  color: #f7931a;
}

.price-val {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.price-chg {
  font-size: 14px;
  font-weight: 600;
}

.hero-main-body {
  padding: 24px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hero-main-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.hero-main-title a:hover { color: var(--accent2); }

.hero-main-desc {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.author-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-wrap.small { gap: 8px; }

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

/* Real portrait photo inside author avatar */
.author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}

.author-avatar.small {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.author-avatar.small img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.author-avatar.large {
  width: 72px;
  height: 72px;
  font-size: 28px;
}
.author-avatar.large img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

.author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: block;
}

.author-name.small { font-size: 12.5px; }

.article-date {
  font-size: 12.5px;
  color: var(--text3);
  display: block;
}

.article-date.small { font-size: 11.5px; }

.share-btns { display: flex; gap: 8px; }

.share-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text2);
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Hero secondary cards */
.hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  overflow: hidden;
  transition: all 0.2s;
  flex: 1;
}

.hero-card:hover {
  background: var(--card-hover);
  border-color: var(--border2);
  transform: translateX(3px);
}

.hero-card-img {
  width: 90px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.eth-card { background: url('https://images.unsplash.com/photo-1622630998477-20aa696ecb05?w=200&q=75&fit=crop') center/cover no-repeat; }
.defi-card { background: url('https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=200&q=75&fit=crop') center/cover no-repeat; }
.reg-card { background: url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?w=200&q=75&fit=crop') center/cover no-repeat; }
.sol-card { background: url('https://images.unsplash.com/photo-1559526324-593bc073d938?w=200&q=75&fit=crop') center/cover no-repeat; }

.hero-card-img svg {
  width: 90px;
  height: 50px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.defi-icon, .reg-icon, .sol-icon {
  font-size: 28px;
  z-index: 1;
}

.hero-card-body {
  padding: 12px 14px;
  flex: 1;
}

.hero-card-body h3 {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 6px;
  margin-bottom: 8px;
}

.hero-card-body h3 a:hover { color: var(--accent2); }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-author { font-size: 11.5px; color: var(--text2); font-weight: 500; }
.card-time { font-size: 11px; color: var(--text3); }

/* ===========================
   MAIN LAYOUT
   =========================== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding-bottom: 40px;
}

/* ===========================
   CATEGORY TABS
   =========================== */
.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.tab-btn:hover, .tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===========================
   SECTION TITLES
   =========================== */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.view-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.view-all:hover { color: var(--accent2); }

/* ===========================
   NEWS GRID
   =========================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.news-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}

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

.news-card-img-wrap { display: block; }

.news-card-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.img-btc2 { background: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?w=400&q=80&fit=crop') center/cover no-repeat; }
.img-defi2 { background: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=400&q=80&fit=crop') center/cover no-repeat; }
.img-reg2 { background: url('https://images.unsplash.com/photo-1529107386315-e1a2ed48a620?w=400&q=80&fit=crop') center/cover no-repeat; }
.img-eth2 { background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=400&q=80&fit=crop') center/cover no-repeat; }
.img-nft2 { background: url('https://images.unsplash.com/photo-1527576539890-dfa815648363?w=400&q=80&fit=crop') center/cover no-repeat; }
.img-sol2 { background: url('https://images.unsplash.com/photo-1559526324-593bc073d938?w=400&q=80&fit=crop') center/cover no-repeat; }
.img-mining2 { background: url('https://images.unsplash.com/photo-1574375927938-d5a98e8ffe85?w=400&q=80&fit=crop') center/cover no-repeat; }

.chart-mini {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 10px 8px;
}

.chart-mini svg { width: 100%; }

.defi-visual {
  position: relative;
  width: 80px;
  height: 80px;
}

.defi-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(123,63,228,0.5);
}

.c1 { width: 80px; height: 80px; top: 0; left: 0; animation: pulse 3s ease-in-out infinite; }
.c2 { width: 55px; height: 55px; top: 12px; left: 12px; border-color: rgba(139,92,246,0.6); animation: pulse 3s ease-in-out infinite 0.5s; }
.c3 { width: 30px; height: 30px; top: 25px; left: 25px; background: rgba(139,92,246,0.3); border-color: rgba(139,92,246,0.8); animation: pulse 3s ease-in-out infinite 1s; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.reg-visual { font-size: 48px; }

/* Hide placeholder decorations now that real photos are used */
.img-btc2 .chart-mini,
.img-defi2 .defi-visual,
.img-reg2 .reg-visual { display: none; }

/* Dark overlay on hero cards for text readability with real photos */
.eth-card, .defi-card, .reg-card, .sol-card { position: relative; }
.eth-card::after, .defi-card::after, .reg-card::after, .sol-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}
.eth-card svg, .eth-card > * { position: relative; z-index: 1; }
.defi-card .defi-icon,
.reg-card .reg-icon,
.sol-card .sol-icon { display: none; }

.news-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.news-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 10px;
}

.news-card-title a:hover { color: var(--accent2); }

.news-card-excerpt {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===========================
   NEWS LIST
   =========================== */
.news-list { display: flex; flex-direction: column; gap: 0; }

.news-list-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.news-list-item:hover { background: var(--bg3); margin: 0 -12px; padding: 18px 12px; border-radius: var(--radius-sm); border-bottom-color: transparent; }

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

.news-list-img-wrap { flex-shrink: 0; }

.news-list-img {
  width: 110px;
  height: 78px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  background-size: cover !important;
  background-position: center !important;
  flex-shrink: 0;
}

.eth-list { background: url('https://images.unsplash.com/photo-1622630998477-20aa696ecb05?w=220&q=75&fit=crop') center/cover no-repeat; }
.nft-list { background: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=220&q=75&fit=crop') center/cover no-repeat; }
.sol-list { background: url('https://images.unsplash.com/photo-1559526324-593bc073d938?w=220&q=75&fit=crop') center/cover no-repeat; }
.mining-list { background: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?w=220&q=75&fit=crop') center/cover no-repeat; }
.aave-list { background: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?w=220&q=75&fit=crop') center/cover no-repeat; }
.reg-list { background: url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?w=220&q=75&fit=crop') center/cover no-repeat; }
.btc-list { background: url('https://images.unsplash.com/photo-1518546305927-5a555bb7020d?w=220&q=75&fit=crop') center/cover no-repeat; }
.defi-list { background: url('https://images.unsplash.com/photo-1639762681485-074b7f938ba0?w=220&q=75&fit=crop') center/cover no-repeat; }

.news-list-body { flex: 1; }

.news-list-body h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 8px 0;
}

.news-list-body h3 a:hover { color: var(--accent2); }

.news-list-body p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text3);
  font-size: 12px;
  flex-wrap: wrap;
}

.read-time { font-size: 12px; color: var(--text3); }

.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 0 40px;
}

.btn-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 44px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.22s;
  min-width: 220px;
}

.btn-load-more .lm-count {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text3);
  transition: color 0.2s;
}

.btn-load-more:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
}

.btn-load-more:hover .lm-count { color: rgba(255,255,255,0.75); }

.btn-load-more.loading {
  opacity: 0.7;
  pointer-events: none;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   SIDEBAR
   =========================== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

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

.widget-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.widget-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* Market Sentiment Gauge */
.market-sentiment { margin-bottom: 16px; }

.gauge-bar {
  height: 8px;
  background: linear-gradient(90deg, var(--red), #f59e0b, var(--green));
  border-radius: 4px;
  position: relative;
  margin-bottom: 6px;
}

.gauge-fill { display: none; }

.gauge-needle {
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  background: var(--text);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: var(--shadow-sm);
}

.gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text3);
}

.gauge-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Coin list in widget */
.coin-list { display: flex; flex-direction: column; gap: 2px; }

.coin-row {
  display: flex;
  align-items: center;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background 0.15s;
  gap: 10px;
}

.coin-row:hover { background: var(--bg3); }

.coin-info { display: flex; align-items: center; gap: 10px; flex: 1; }

.coin-rank {
  width: 20px;
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  text-align: center;
}

.coin-name { font-size: 13px; font-weight: 600; }
.coin-sym-small { font-size: 11px; color: var(--text3); }

.coin-sparkline { width: 60px; }
.coin-sparkline svg { width: 100%; }

.coin-data { text-align: right; }
.coin-price-sm { font-size: 13px; font-weight: 600; }
.coin-chg { font-size: 12px; font-weight: 500; }

/* Trending widget */
.trending-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trending-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}

.trending-list li:hover { background: var(--bg3); }

.trend-num {
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.trending-list a {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text2);
  transition: color 0.2s;
}

.trending-list a:hover { color: var(--accent2); }

/* Newsletter */
.widget-newsletter {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border: none;
  text-align: center;
}

.newsletter-icon { font-size: 36px; margin-bottom: 10px; }

.widget-newsletter h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.widget-newsletter p {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
  line-height: 1.5;
}

.newsletter-form { display: flex; flex-direction: column; gap: 8px; }

.newsletter-form input {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 13px;
  outline: none;
  text-align: center;
  backdrop-filter: blur(10px);
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }

.newsletter-form button {
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}

.newsletter-form button:hover { transform: scale(1.02); }

.newsletter-note {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}

/* Movers widget */
.movers-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.mover-tab {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.mover-tab.active, .mover-tab:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.mover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.mover-name {
  width: 44px;
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.mover-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--bg3);
  border-radius: 3px;
  overflow: hidden;
}

.mover-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.mover-bar.up { background: var(--green); }
.mover-bar.down { background: var(--red); }

.mover-chg {
  font-size: 12px;
  font-weight: 600;
  width: 52px;
  text-align: right;
  flex-shrink: 0;
}

/* ===========================
   ANALYSIS SECTION
   =========================== */
.analysis-section {
  padding-bottom: 48px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
}

.analysis-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
}

.analysis-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border2);
}

.analysis-card.featured-analysis {
  border-left: 3px solid var(--accent);
}

.analysis-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: 14px;
}

.analysis-tag.opinion { background: rgba(139,92,246,0.15); color: var(--purple); }
.analysis-tag.guide { background: rgba(16,185,129,0.15); color: var(--green); }

.analysis-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}

.analysis-card h3 a:hover { color: var(--accent2); }

.analysis-card p {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.analysis-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.author-title {
  font-size: 11px;
  color: var(--text3);
  display: block;
}

/* ===========================
   MARKET TABLE
   =========================== */
.market-table-section {
  padding-bottom: 48px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}

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

.market-table thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.market-table thead th:hover { color: var(--text); }

.market-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.market-table tbody tr:last-child { border-bottom: none; }

.market-table tbody tr:hover { background: var(--bg3); }

.market-table td {
  padding: 12px 16px;
  white-space: nowrap;
}

.rank {
  font-size: 13px;
  color: var(--text3);
  font-weight: 500;
}

.coin-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coin-sym-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.btc-badge { background: rgba(247,147,26,0.2); color: #f7931a; }
.eth-badge { background: rgba(98,126,234,0.2); color: #627eea; }
.bnb-badge { background: rgba(240,185,11,0.2); color: #f0b90b; }
.xrp-badge { background: rgba(0,148,218,0.2); color: #0094da; }
.sol-badge { background: rgba(153,69,255,0.2); color: #9945ff; }
.doge-badge { background: rgba(197,163,83,0.2); color: #c5a353; }
.avax-badge { background: rgba(232,65,66,0.2); color: #e84142; }
.link-badge { background: rgba(55,91,210,0.2); color: #375bd2; }
.ada-badge { background: rgba(0,51,173,0.2); color: #0033ad; }
.dot-badge { background: rgba(230,0,122,0.2); color: #e6007a; }

.coin-full-name { font-size: 14px; font-weight: 600; }
.coin-ticker { font-size: 12px; color: var(--text3); }

.price-cell { font-weight: 600; }

.table-spark { width: 80px; display: block; }

/* ===========================
   CATEGORIES SECTION
   =========================== */
.categories-section {
  padding-bottom: 48px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

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

.cat-icon {
  font-size: 28px;
  line-height: 1;
}

.cat-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.cat-count {
  font-size: 11px;
  color: var(--text3);
}

.cat-bitcoin:hover { border-color: rgba(247,147,26,0.5); background: rgba(247,147,26,0.05); }
.cat-ethereum:hover { border-color: rgba(98,126,234,0.5); background: rgba(98,126,234,0.05); }
.cat-defi:hover { border-color: rgba(123,63,228,0.5); background: rgba(123,63,228,0.05); }
.cat-nft:hover { border-color: rgba(236,72,153,0.5); background: rgba(236,72,153,0.05); }
.cat-regulation:hover { border-color: rgba(234,179,8,0.5); background: rgba(234,179,8,0.05); }
.cat-altcoin:hover { border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.05); }
.cat-mining:hover { border-color: rgba(100,116,139,0.5); background: rgba(100,116,139,0.05); }
.cat-web3:hover { border-color: rgba(59,130,246,0.5); background: rgba(59,130,246,0.05); }

/* ===========================
   FOOTER NEWSLETTER STRIP
   =========================== */
.footer-newsletter {
  background: linear-gradient(135deg, #0c1220 0%, #111827 50%, #0f172a 100%);
  border-top: 1px solid rgba(59,130,246,0.18);
  border-bottom: 1px solid var(--border);
  padding: 36px 0;
}
.fn-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  justify-content: space-between;
}
.fn-text {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.fn-icon { font-size: 36px; line-height: 1; }
.fn-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: #f0f4f8;
  margin-bottom: 4px;
}
.fn-text p { font-size: 13.5px; color: var(--text2); }
.fn-form {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.fn-form input {
  padding: 12px 18px;
  border-radius: 9px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 14px;
  width: 260px;
  outline: none;
  transition: border 0.2s, background 0.2s;
  font-family: inherit;
}
.fn-form input:focus {
  border-color: var(--accent);
  background: rgba(59,130,246,0.06);
}
.fn-form button {
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.fn-form button:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}
.fn-privacy {
  font-size: 11.5px;
  color: var(--text3);
  margin-top: 8px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: #070a0f;
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .footer-logo { margin-bottom: 16px; }

.footer-desc {
  font-size: 13.5px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 10px;
  max-width: 280px;
}

.footer-est {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 18px;
  opacity: 0.7;
  letter-spacing: 0.3px;
}

.footer-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 22px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer-stat-item { text-align: center; }
.footer-stat-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent2);
  display: block;
}
.footer-stat-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-links { display: flex; gap: 9px; }

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: all 0.2s;
}
.social-link svg { width: 15px; height: 15px; flex-shrink: 0; }
.social-link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.social-link.tw:hover  { background: #000;    color: #fff; border-color: #333; }
.social-link.tg:hover  { background: #0088cc; color: #fff; border-color: #0088cc; }
.social-link.yt:hover  { background: #ff0000; color: #fff; border-color: #ff0000; }
.social-link.dc:hover  { background: #5865f2; color: #fff; border-color: #5865f2; }
.social-link.email:hover { background: #3b82f6; color: #fff; }

.footer-email-link {
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
  letter-spacing: .01em;
}
.footer-email-link:hover { color: var(--accent); }

.footer-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px;
  color: #10b981;
  margin-top: 14px;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-links-group h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}

.footer-links-group a {
  font-size: 14px;
  color: var(--text2);
  transition: color 0.15s;
  line-height: 1.3;
}
.footer-links-group a:hover { color: #e8edf4; }

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text3);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text3);
  font-size: 13px;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: var(--text2); }

.disclaimer-note {
  width: 100%;
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.04);
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .fn-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .fn-form { flex-direction: column; }
  .fn-form input { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 440px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ===========================
   BACK TO TOP
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 500;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent2);
  transform: translateY(-2px);
}

/* ===========================
   PRICE FLASH ANIMATION
   =========================== */
.price-flash-up {
  animation: flashUp 0.5s ease;
}

.price-flash-down {
  animation: flashDown 0.5s ease;
}

@keyframes flashUp {
  0% { color: var(--green); }
  100% { color: var(--text); }
}

@keyframes flashDown {
  0% { color: var(--red); }
  100% { color: var(--text); }
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1200px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .footer-top .footer-links-group:last-child { display: none; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-secondary { flex-direction: row; flex-wrap: wrap; }
  .hero-card { flex: 1 1 calc(50% - 6px); }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
  .analysis-grid { grid-template-columns: 1fr 1fr; }
  .analysis-card.featured-analysis { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: fixed; top: calc(var(--ticker-h) + var(--header-h)); left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 12px; z-index: 800; gap: 4px; }
  .burger-btn { display: flex; }
  .search-wrap { display: none; }
  .btn-subscribe { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-card { flex: 1 1 100%; }
  .hero-main-img-wrap { height: 200px; }
  .hero-main-title { font-size: 20px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .market-stats-label { display: none; }
}

@media (max-width: 480px) {
  .hero { padding: 16px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .ticker-bar { height: 28px; }
  .header { height: 56px; }
  --ticker-h: 28px;
  --header-h: 56px;
}
