
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a28;
  --surface3: #222236;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --text-muted: #5a5a70;
  --accent: #ff6b35;
  --accent2: #4ecdc4;
  --accent3: #ffe66d;
  --up: #22c55e;
  --down: #ef4444;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── Reading Progress Bar ─── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 200;
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── Header / Nav ─── */
.site-header {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border-bottom: 2px solid var(--accent);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-rss { color: var(--accent) !important; font-size: 0.8rem; }

/* ─── Ticker ─── */
.ticker {
  background: var(--accent);
  color: #000;
  padding: 0.5rem 0;
  font-weight: 700;
  font-size: 0.8rem;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.ticker-content { display: inline-block; animation: ticker 90s linear infinite; }
.ticker-content:hover { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* ─── Main Layout ─── */
.container { max-width: 1400px; margin: 0 auto; padding: 2rem; }

/* ─── Market Indicators Bar ─── */
.market-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 2rem;
  padding: 0;
  scrollbar-width: thin;
}
.market-item {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.market-item:last-child { border-right: none; }
.market-name { font-size: 0.7rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.market-value { font-size: 1rem; font-weight: 800; margin: 0.15rem 0; }
.market-change { font-size: 0.75rem; font-weight: 700; }
.market-change.up { color: var(--up); }
.market-change.down { color: var(--down); }
.market-change.neutral { color: var(--text-dim); }

/* ─── News Dashboard ─── */
.news-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.dashboard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.dashboard-panel:hover { border-color: var(--accent); }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.panel-header-left { display: flex; align-items: center; gap: 0.6rem; }
.panel-category-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.panel-title { font-size: 0.85rem; font-weight: 700; }
.panel-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  white-space: nowrap;
}
.panel-link:hover { color: var(--accent); }

.panel-news {
  list-style: none;
  padding: 0.75rem 1.25rem 1rem;
}
.panel-news li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}
.panel-news li:last-child { border-bottom: none; }
.panel-news li strong { color: var(--accent3); }

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.section-header h2 { font-size: 1.2rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
.section-header .badge {
  font-size: 0.65rem; font-weight: 700; background: var(--accent); color: #000;
  padding: 0.15rem 0.5rem; border-radius: 4px; white-space: nowrap;
}
.section-header .line { flex: 1; height: 1px; background: var(--border); }
.section-date { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.1);
}
.card-category {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.card-category.strategy { background: var(--accent2); }
.card-category.enterprise { background: #6c5ce7; color: #fff; }
.card-category.saas { background: var(--accent); }
.card-category.crypto { background: #f7931a; color: #000; }
.card-category.research { background: var(--text-dim); color: #000; }

.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.card-summary { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 0.75rem; line-height: 1.6; }
.card-highlights { list-style: none; margin-bottom: 0.75rem; }
.card-highlights li {
  font-size: 0.82rem; color: var(--text-dim); padding: 0.2rem 0;
  padding-left: 0.8rem; position: relative; line-height: 1.5;
}
.card-highlights li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.card-highlights li strong { color: var(--accent3); }
.card-meta { color: var(--text-dim); font-size: 0.8rem; display: flex; gap: 1rem; }

/* ─── Hero ─── */
.hero { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; margin-bottom: 3rem; }
.hero-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.hero-main:hover { border-color: var(--accent); }
.hero-main::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.hero-main .card-title { font-size: 1.8rem; }
.hero-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* ─── Article Grid ─── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* ─── Daily Report Banner ─── */
.daily-report-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border: 1px solid var(--accent2);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s;
}
.daily-report-banner:hover {
  border-color: var(--accent3);
  box-shadow: 0 0 30px rgba(78, 205, 196, 0.15);
}
.daily-badge {
  background: var(--accent3);
  color: #000;
  font-weight: 900;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

/* ═══ Article Page Layout ═══ */
.article-layout {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ─── TOC Sidebar ─── */
.article-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.toc-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}
.toc-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.15rem; }
.toc-list a {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  line-height: 1.4;
}
.toc-list a:hover { color: var(--text); background: var(--surface2); }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); background: var(--surface2); }
.toc-list .toc-h3 { padding-left: 1.2rem; font-size: 0.73rem; }

/* ─── Article Content ─── */
.article-main { min-width: 0; }

.article-content {
  max-width: 100%;
}

.article-content h1 { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.3; }
.article-content h2 {
  font-size: 1.4rem; font-weight: 700; margin: 2.5rem 0 1rem;
  color: var(--accent); padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.article-content h3 {
  font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.75rem;
  color: var(--accent2); scroll-margin-top: 80px;
}

.article-content p { margin-bottom: 1rem; }
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.article-content th {
  background: var(--surface2); padding: 0.75rem 1rem; text-align: left;
  font-weight: 700; border-bottom: 2px solid var(--accent); white-space: nowrap;
}
.article-content td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.article-content tr:hover td { background: var(--surface2); }
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--surface2);
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
  font-style: italic;
}
.article-content ul, .article-content ol { margin: 1rem 0 1rem 1.5rem; }
.article-content li { margin-bottom: 0.4rem; }
.article-content a { color: var(--accent2); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.article-content a:hover { border-color: var(--accent2); }
.article-content strong { color: var(--accent3); }
.article-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.article-content code { background: var(--surface2); padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.85rem; }

.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent); text-decoration: none; font-weight: 600; margin-bottom: 2rem;
}
.article-meta-bar {
  display: flex; gap: 1rem; align-items: center;
  color: var(--text-dim); font-size: 0.85rem; margin-bottom: 2rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}

/* ─── Back to Top ─── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 90;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent3); transform: translateY(-2px); }

/* ─── Mobile TOC Toggle ─── */
.toc-mobile-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 1.5rem;
  width: 100%;
  text-align: left;
}
.toc-mobile-toggle::after { content: ' ▾'; }
.toc-mobile-toggle.open::after { content: ' ▴'; }

/* ─── Footer ─── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4rem;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { display: none; position: static; max-height: none; order: 2; }
  .article-toc.mobile-open { display: block; }
  .toc-mobile-toggle { display: block; order: 1; }
  .article-main { order: 3; }
  .news-dashboard { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 1rem; }
  .article-grid { grid-template-columns: 1fr; }
  .daily-report-banner { flex-direction: column; gap: 1rem; text-align: center; }
  .container { padding: 1rem; }
  .market-bar { flex-wrap: wrap; }
  .market-item { min-width: calc(33% - 1px); }
}
@media (max-width: 480px) {
  .market-item { min-width: calc(50% - 1px); }
}
