:root {
  color-scheme: dark;
  --bg: #090d14;
  --bg-2: #111827;
  --surface: rgba(17, 24, 39, 0.86);
  --surface-2: rgba(22, 30, 43, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --surface-card: rgba(255, 255, 255, 0.075);
  --ink: #f8fafc;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(245, 205, 120, 0.24);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.12);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.13);
  --amber: #facc15;
  --amber-soft: rgba(250, 204, 21, 0.13);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.13);
  --gold: #e7b95b;
  --gold-2: #f5d28a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { width: 100%; overflow-x: hidden; scroll-behavior: smooth; }
body {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% -10%, rgba(231, 185, 91, .22), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(96, 165, 250, .14), transparent 28%),
    linear-gradient(180deg, #070a10 0%, var(--bg) 42%, #0d1320 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, p { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 10, 16, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-row,
.shell {
  width: min(1240px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.brand-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.compact-brand-row { justify-content: flex-start; }

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(145deg, #111827, #1f2937 55%, #3b2b12);
  box-shadow: inset 0 0 0 1px rgba(245, 210, 138, .22), 0 12px 30px rgba(0, 0, 0, .34);
  padding: 10px;
}

.brand-mark i { width: 5px; border-radius: 999px 999px 2px 2px; }
.brand-mark i:nth-child(1) { height: 13px; background: #d9a441; }
.brand-mark i:nth-child(2) { height: 23px; background: #4ade80; }
.brand-mark i:nth-child(3) { height: 17px; background: #fb7185; }

.brand strong {
  display: block;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: -.03em;
}
.brand small { display: block; margin-top: 4px; color: var(--muted); font-weight: 700; }

.toolbar,
.market-tabs,
.quick-picks {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.badge,
.stat-chip,
.time-pill,
.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.stat-chip, .time-pill {
  color: var(--muted);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
}
.badge-ok { color: var(--green); background: var(--green-soft); }
.badge-warn { color: var(--amber); background: var(--amber-soft); }
.badge-down { color: var(--red); background: var(--red-soft); }
.rank-pill { margin-right: 7px; color: #1f2937; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.muted { color: var(--muted); font-size: 13px; }

.shell { margin-top: 24px; margin-bottom: 54px; }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-copy,
.search-card,
.ticker-panel,
.control-band,
.summary-grid article,
.panel,
.crypto-cards,
.site-foot {
  background: linear-gradient(180deg, rgba(17,24,39,.92), rgba(13,19,31,.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(24px, 3.4vw, 42px);
  background:
    radial-gradient(circle at 86% 18%, rgba(245, 210, 138, .24), transparent 33%),
    linear-gradient(135deg, rgba(10,14,22,.98), rgba(22,30,43,.96) 58%, rgba(44,32,13,.88));
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hero-copy::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(231,185,91,.30), transparent 68%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 7px 12px;
  border: 1px solid rgba(245,210,138,.32);
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(245,210,138,.08);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .02em;
}
.hero-copy h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  font-size: clamp(32px, 4.7vw, 58px);
  line-height: .96;
  letter-spacing: -.06em;
}
.hero-copy p {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin-top: 15px;
  color: rgba(255,255,255,.76);
  font-size: 16px;
  line-height: 1.55;
}

.search-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.search-card label,
.toolbar label {
  display: grid;
  gap: 7px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
}
.search-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
input[type="search"],
select {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(255,255,255,.06);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}
select option { color: #111827; background: #fff; }
input[type="search"]::placeholder { color: #8b96a8; }
input[type="search"]:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(231, 185, 91, .12);
}
#searchButton,
.quick-picks button,
.market-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: var(--text);
  padding: 0 14px;
  font-weight: 850;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
#searchButton { height: 46px; border-radius: 15px; color: var(--gold-2); }
.quick-picks button:hover,
.market-tab:hover { border-color: rgba(245,210,138,.44); transform: translateY(-1px); background: rgba(245,210,138,.08); }

.ticker-panel { padding: 16px; margin-bottom: 14px; }
.section-title-row,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-title-row { margin-bottom: 12px; }
.section-title-row h2,
.section-header h2 { font-size: 19px; line-height: 1.15; color: var(--ink); }
.section-title-row p,
.section-header p { margin-top: 5px; color: var(--muted); font-size: 13px; }

.ticker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}
.ticker-item {
  min-width: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
.ticker-item span,
.summary-grid span,
.crypto-card span,
.crypto-card small { color: var(--muted); font-size: 12px; font-weight: 780; }
.ticker-item strong {
  display: block;
  margin: 7px 0;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.ticker-item small { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-up-border { border-color: rgba(74, 222, 128, .36); }
.trend-down-border { border-color: rgba(251, 113, 133, .36); }

.control-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px;
}
.market-tab.active {
  border-color: rgba(245,210,138,.74);
  background: linear-gradient(135deg, #f5d28a, #d8a441);
  color: #17120a;
  box-shadow: 0 10px 22px rgba(231,185,91,.14);
}
.toolbar { justify-content: flex-end; }
.toolbar label { min-width: 190px; }

.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.summary-grid article { padding: 16px; }
.summary-grid span { display: block; margin-bottom: 9px; }
.summary-grid strong { display: block; color: var(--ink); font-size: 18px; line-height: 1.25; letter-spacing: -.02em; }
.summary-grid small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

.panel { overflow: hidden; margin-bottom: 14px; }
.section-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
}
.table-wrap { width: 100%; overflow: visible; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td {
  min-width: 0;
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
th {
  background: rgba(255,255,255,.045);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}
td { font-size: 14px; }
td span:not(.price-pill):not(.trend-arrow):not(.rank-pill):not(.time-pill) { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
td.numeric, th.numeric { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(245,210,138,.035); }
.source-cell strong { display: flex; align-items: center; min-width: 0; }
tr.best-buy td:nth-child(3), tr.best-sell td:nth-child(4), tr.best-spread td:nth-child(5) { font-weight: 950; }
tr.best-buy td:nth-child(3) { background: linear-gradient(90deg, transparent, rgba(74, 222, 128, .08)); }
tr.best-sell td:nth-child(4), tr.best-spread td:nth-child(5) { background: linear-gradient(90deg, transparent, rgba(231, 185, 91, .08)); }

.price-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 86px;
  max-width: 100%;
  font-weight: 950;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-pill strong { font: inherit; }
.trend-arrow { font-size: 12px; font-weight: 950; }
.trend-up { color: var(--green) !important; }
.trend-down { color: var(--red) !important; }
.trend-flat, .empty { color: var(--muted) !important; }
.empty { text-align: center; padding: 28px 16px; }

.crypto-board { margin-top: 14px; }
.compact-header { border-radius: var(--radius) var(--radius) 0 0; }
.crypto-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.crypto-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.04));
}
.crypto-card div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.crypto-card span, .crypto-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crypto-card strong, .crypto-card b { font-size: 15px; font-variant-numeric: tabular-nums; }
.crypto-card b { justify-self: start; }
.empty-card { grid-column: 1 / -1; }
.site-foot { padding: 14px 16px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 1080px) {
  .hero-panel { grid-template-columns: 1fr; }
  .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crypto-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control-band { align-items: flex-start; flex-direction: column; }
  .toolbar, .market-tabs { width: 100%; }
  .toolbar label { flex: 1 1 240px; }
}

@media (max-width: 760px) {
  .brand-row, .shell { width: min(100% - 22px, 1240px); }
  .brand-row { padding: 12px 0; }
  .hero-copy, .search-card, .ticker-panel, .control-band, .section-header { padding: 14px; }
  .hero-copy h1 { font-size: 34px; }
  .search-input-wrap { grid-template-columns: 1fr; }
  #searchButton { width: 100%; }
  .ticker, .summary-grid, .crypto-cards { grid-template-columns: 1fr; }
  .market-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-tab { width: 100%; }
  .toolbar { display: grid; grid-template-columns: 1fr; }
  .toolbar label, select { width: 100%; min-width: 0; }
  table, thead, tbody, tr, th, td { display: block; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; padding: 10px; background: rgba(255,255,255,.035); }
  tr {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(255,255,255,.055);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    overflow: hidden;
  }
  td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
  }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 900; text-align: left; }
  td.source-cell, td[data-label="Ürün"] { display: block; text-align: left; }
  td.source-cell::before, td[data-label="Ürün"]::before { display: none; }
  td.numeric { text-align: right; }
  .source-cell strong { justify-content: flex-start; }
  .price-pill { min-width: 0; }
  .empty { display: block; text-align: center; }
}

@media (max-width: 420px) {
  .hero-copy h1 { font-size: 30px; }
  .market-tabs { grid-template-columns: 1fr; }
}
