/* ===== Variables ===== */
:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --text: #ffffff;
  --text-muted: #888888;
  --accent: #ff6b35;
  --accent-hover: #ff8555;
  --accent-dim: rgba(255, 107, 53, 0.15);
  --border: #252525;
  --positive: #22c55e;
  --negative: #ef4444;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== Background Tweets (Hero) ===== */
.bg-tweets {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.bg-tweet {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: clamp(220px, 30vw, 420px);
  max-height: clamp(280px, 40vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  opacity: 0.42;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
}

/* Aynı hız, eşit aralıklı (45°) - iç içe girmez, uyumlu hareket */
.bg-tweet:nth-child(1) { animation: bg-orbit 100s linear infinite; }
.bg-tweet:nth-child(2) { animation: bg-orbit 100s linear infinite; animation-delay: -12.5s; }
.bg-tweet:nth-child(3) { animation: bg-orbit 100s linear infinite; animation-delay: -25s; }
.bg-tweet:nth-child(4) { animation: bg-orbit 100s linear infinite; animation-delay: -37.5s; }
.bg-tweet:nth-child(5) { animation: bg-orbit 100s linear infinite; animation-delay: -50s; }
.bg-tweet:nth-child(6) { animation: bg-orbit 100s linear infinite; animation-delay: -62.5s; }
.bg-tweet:nth-child(7) { animation: bg-orbit 100s linear infinite; animation-delay: -75s; }
.bg-tweet:nth-child(8) { animation: bg-orbit 100s linear infinite; animation-delay: -87.5s; }

/* Düzgün daire, 8 nokta - hepsi aynı yörünge, eşit mesafede (r=30) */
@keyframes bg-orbit {
  0% { transform: translate(-50%, -50%) translate(30vw, 0); }
  12.5% { transform: translate(-50%, -50%) translate(21.2vw, 21.2vh); }
  25% { transform: translate(-50%, -50%) translate(0, 30vh); }
  37.5% { transform: translate(-50%, -50%) translate(-21.2vw, 21.2vh); }
  50% { transform: translate(-50%, -50%) translate(-30vw, 0); }
  62.5% { transform: translate(-50%, -50%) translate(-21.2vw, -21.2vh); }
  75% { transform: translate(-50%, -50%) translate(0, -30vh); }
  87.5% { transform: translate(-50%, -50%) translate(21.2vw, -21.2vh); }
  100% { transform: translate(-50%, -50%) translate(30vw, 0); }
}

/* Mobile: bg tweet'leri tamamen gizle - orbit/grid mobilde kötü görünüyor */
@media (max-width: 768px) {
  .bg-tweets {
    display: none !important;
  }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-header {
  height: 40px;
  width: auto;
  border-radius: 6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.nav-cta {
  color: var(--accent) !important;
  font-weight: 600;
}

.nav-cta:hover {
  color: var(--accent-hover) !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
}

.hero-content {
  max-width: 900px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.live-ticker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.ticker-item:hover {
  border-color: var(--accent);
}

.ticker-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.ticker-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
}

.ticker-change {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.ticker-change.positive { color: var(--positive); }
.ticker-change.negative { color: var(--negative); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.stat-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

.stat-card-large .stat-value {
  font-size: 1.75rem;
}

.stat-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.stat-value-suffix {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== Fee Vault ===== */
.fee-vault-section {
  margin-top: 2.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 12px;
  text-align: center;
}

.fee-vault-title {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.fee-vault-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
}

.fee-vault-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ===== MSTR Section (Live Markets içinde) ===== */
.mstr-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.mstr-section-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.mstr-section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.markets-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.fee-vault-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 10px;
  margin-bottom: 2rem;
}

.fee-vault-inline-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.fee-vault-inline-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.mstr-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.mstr-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.mstr-stat-card:hover {
  border-color: var(--accent);
}

.mstr-stat-card.mstr-underwater {
  border-color: rgba(239, 68, 68, 0.4);
}

.mstr-stat-card.mstr-underwater:hover {
  border-color: var(--negative);
}

.mstr-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.mstr-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.mstr-underwater .mstr-value {
  color: var(--negative);
}

.mstr-change {
  display: block;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.mstr-change.positive { color: var(--positive); }
.mstr-change.negative { color: var(--negative); }

.chart-comparison {
  margin-top: 1rem;
}

.chart-comparison h3 {
  margin-bottom: 1rem;
}

/* ===== Market Timeframe Groups ===== */

/* ===== Sections ===== */
section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ===== Feed ===== */
.feed {
  border-top: 1px solid var(--border);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feed-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.feed-item:hover {
  border-color: var(--accent);
}

.feed-tweet {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.feed-tweet-text {
  margin: 0 0 0.5rem 0;
}

.feed-tweet a {
  color: var(--accent);
}

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.feed-meta span {
  color: var(--text-muted);
}

.feed-meta .amount {
  color: var(--accent);
  font-weight: 600;
}

.feed-meta .value {
  color: var(--text);
}

.feed-tweet-link {
  color: var(--accent);
}

.feed-proof {
  margin-top: 1rem;
}

.feed-proof a {
  color: var(--accent);
  font-size: 0.9rem;
}

.feed-proof a:hover {
  text-decoration: underline;
}

/* ===== Live Markets ===== */
.live-markets {
  border-top: 1px solid var(--border);
}

.markets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.market-section-title {
  width: 100%;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.market-section-title:first-child {
  margin-top: 0;
}

/* Her timeframe grubu dikey sütun: 24h, 6h, 1h, 5m yan yana, tile'lar alt alta */
.market-timeframe-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 180px;
  flex: 1 1 180px;
}

.market-timeframe-group .market-timeframe-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.market-timeframe-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s;
  min-width: 0;
  overflow: hidden;
}

.market-card:hover {
  border-color: var(--accent);
}

.market-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.market-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  word-break: break-word;
  overflow-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.market-value.positive { color: var(--positive); }
.market-value.negative { color: var(--negative); }

.market-change {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.market-change.positive { color: var(--positive); }
.market-change.negative { color: var(--negative); }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.chart-container h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}

.chart-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.chart-container canvas {
  max-height: 300px;
}

/* ===== Saylor ===== */
.saylor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.saylor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.saylor-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tweet-preview {
  font-size: 0.95rem;
  line-height: 1.6;
}

.tweet-preview p {
  color: var(--text-muted);
}

.tweet-preview a {
  color: var(--accent);
}

.saylor-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-ca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ca-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.ca-link:hover {
  text-decoration: underline;
}

.copy-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 107, 53, 0.25);
}

.footer-twitter {
  color: var(--accent);
  font-weight: 500;
}

.footer-twitter:hover {
  text-decoration: underline;
}

.footer-tagline {
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero-stats,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .saylor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .live-ticker {
    flex-direction: column;
    gap: 1rem;
  }

  .market-timeframe-group {
    min-width: 100%;
    flex: 1 1 100%;
  }
  .header {
    padding: 1rem 1.25rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 6rem 1.25rem 3rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

  .feed-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-ca {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .market-timeframe-group {
    min-width: 100%;
  }
  .logo-header {
    height: 32px;
  }

  .stat-value {
    font-size: 1.25rem !important;
  }

  .stat-card-large .stat-value {
    font-size: 1.4rem !important;
  }
}
