:root {
  --primary: #0A2463;
  --primary-light: #123a8f;
  --secondary: #00B4D8;
  --up: #00B894;
  --down: #FF6B6B;
  --bg: #f4f6fb;
  --bg-card: #ffffff;
  --text: #1b2430;
  --text-muted: #667085;
  --border: #e2e8f0;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(10, 36, 99, 0.06);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.muted { color: var(--text-muted); }
.up { color: var(--up); }
.down { color: var(--down); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo .logo-dot { color: var(--secondary); }

.main-nav { display: flex; gap: 18px; margin-right: auto; }
.main-nav a {
  color: var(--text);
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { text-decoration: none; color: var(--secondary); }
.main-nav a.active { color: var(--secondary); border-bottom-color: var(--secondary); }

.header-tools { display: flex; align-items: center; gap: 12px; }

.search-form { position: relative; display: flex; align-items: center; }
.search-form input[type="search"] {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 34px 7px 14px;
  width: 220px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}
.search-form button {
  position: absolute;
  right: 4px;
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-size: 1rem;
  cursor: pointer;
}

.suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
  overflow: hidden;
}
.suggest a {
  display: block;
  padding: 8px 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.suggest a:hover { background: var(--bg); text-decoration: none; }

.dark-toggle {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
}

.ticker {
  background: var(--primary);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  font-size: 0.9rem;
}
.ticker-track { display: inline-block; animation: ticker 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { margin-right: 36px; }
.ticker-item.up { color: #7fffcb; }
.ticker-item.down { color: #ffb3b3; }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

main.container { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }

.sentiment-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.sentiment-card h2 { margin-top: 0; font-size: 1.05rem; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.85; }
.sentiment-text { font-size: 1.15rem; margin: 8px 0; }
.sentiment-updated { opacity: 0.7; font-size: 0.85rem; margin: 0; }

.home-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 24px; }
.home-section h1 { margin-top: 0; }
.home-section h2 { margin-top: 0; font-size: 1.1rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.top-list { list-style: none; margin: 0; padding: 0; }
.top-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.top-list li:last-child { border-bottom: 0; }
.top-company { font-weight: 700; color: var(--text); min-width: 90px; }
.top-count { color: var(--text-muted); font-size: 0.85rem; }
.top-price { margin-left: auto; font-weight: 600; }

.gl-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.gl-item:last-child { border-bottom: 0; }
.gl-name a { color: var(--text); font-weight: 600; }
.gl-price { margin-left: auto; }
.gl-change { font-weight: 700; }

.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }

.news-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}
.news-card h3 { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.35; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--secondary); }
.news-meta { display: flex; gap: 12px; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.news-snippet { flex: 1; margin: 0 0 10px; }
.news-more { font-weight: 600; font-size: 0.9rem; }

.crypto-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.coin-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.coin-name { font-weight: 700; }
.coin-price { margin-left: auto; font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.table-wrap { overflow-x: auto; }

.symbol-link { font-weight: 600; }

.news-detail h1 { margin: 8px 0 12px; line-height: 1.25; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); }
.news-body { font-size: 1.05rem; margin: 18px 0; }
.news-link-external { font-size: 0.9rem; }
.related-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 18px 0; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.related-list li a { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 4px 12px; font-weight: 600; }
.archive-months { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.archive-months a { font-weight: 600; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 20px 0;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--text-muted); }

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
  .main-nav { order: 3; width: 100%; justify-content: space-between; margin-right: 0; }
  .header-tools { margin-left: auto; }
  .grid-2 { grid-template-columns: 1fr; }
  .search-form input[type="search"] { width: 150px; }
}