:root {
  --bg: #0b0f14;
  --card: #121a24;
  --text: #e8eef7;
  --muted: #93a4b8;
  --accent: #ffd166;
  --rekor: #ff6b6b;
  --eur: #5b9dff;
  --usd: #6ee7b7;
  --gold: #f4c95d;
  --silver: #c0c9d6;
  --btc: #f7931a;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2740 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 0%, #2a1830 0%, transparent 50%), var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(255, 209, 102, 0.08), transparent 40%);
}

.hero {
  text-align: center;
  padding: 3rem 1.25rem 1.5rem;
  position: relative;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0;
  line-height: 1.05;
}

.tagline {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.1rem;
  color: var(--accent);
}

.subtagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-width {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  box-sizing: border-box;
}

.status {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 26, 36, 0.75);
  color: var(--muted);
  text-align: center;
}

.status.live {
  color: var(--usd);
  border-color: rgba(110, 231, 183, 0.35);
}

.status.stale {
  color: var(--accent);
  border-color: rgba(255, 209, 102, 0.35);
}

.status.error {
  color: var(--rekor);
  border-color: rgba(255, 107, 107, 0.35);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}

.card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.5s ease both;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--stripe, var(--accent));
}

.card.rekor {
  border-color: rgba(255, 107, 107, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.2), var(--shadow);
}

.card.rekor::after {
  content: "🎉";
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  font-size: 1.25rem;
  animation: wiggle 1.2s ease-in-out infinite;
}

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

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.pair {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.15);
  color: var(--rekor);
  border: 1px solid rgba(255, 107, 107, 0.4);
  white-space: nowrap;
}

.current {
  margin: 1rem 0 0.35rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 600;
}

.unit {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 0.25rem;
}

.rekor-block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.rekor-block strong {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
}

.footer {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .joke {
  color: var(--accent);
  margin-top: 0.75rem;
}

.card[data-id="EUR_TRY"] {
  --stripe: var(--eur);
}
.card[data-id="USD_TRY"] {
  --stripe: var(--usd);
}
.card[data-id="XAU_TRY"] {
  --stripe: var(--gold);
}
.card[data-id="XAG_TRY"] {
  --stripe: var(--silver);
}
.card[data-id="BTC_TRY"] {
  --stripe: var(--btc);
}

.grid-hint {
  margin: -0.5rem auto 1rem;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grid-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.15);
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.card-cta {
  margin: 0.85rem 0 0;
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card:hover .card-cta,
.card:focus-visible .card-cta {
  background: rgba(255, 209, 102, 0.18);
  border-color: rgba(255, 209, 102, 0.45);
}

.card-cta-icon {
  display: flex;
  flex-shrink: 0;
  opacity: 0.95;
}

.card-cta-text {
  flex: 1;
}

.card-cta-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.chart-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(920px, 96vw);
  width: 100%;
}

.chart-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.chart-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chart-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.chart-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.chart-close {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.chart-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 220px;
  aspect-ratio: 2.2 / 1;
  touch-action: none;
}

#chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(8, 12, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  white-space: nowrap;
}

.chart-tooltip-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.chart-tooltip-price {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.chart-loading,
.chart-error {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
}

.chart-error {
  color: var(--rekor);
}

.chart-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.seo-intro {
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  text-align: left;
}

.seo-intro p {
  margin: 0;
  max-width: none;
}

.seo-intro strong {
  color: var(--text);
}

.seo-searches {
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 0 1.25rem;
}

.seo-searches h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.seo-search-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.seo-search-list strong {
  color: var(--text);
}

.seo-faq {
  margin-top: 2rem;
  padding-bottom: 2rem;
}

.seo-faq h2 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem;
  color: var(--accent);
}

.seo-faq details {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  background: rgba(18, 26, 36, 0.6);
}

.seo-faq summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  list-style: none;
}

.seo-faq summary::-webkit-details-marker {
  display: none;
}

.seo-faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
}

.seo-faq details[open] summary::after {
  content: "−";
}

.seo-faq p {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-nav {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.hero--compact {
  padding-bottom: 0.5rem;
}

.hero-link {
  color: inherit;
  text-decoration: none;
}

.hero-link:hover {
  color: var(--accent);
}

.legal-page {
  padding-bottom: 3rem;
}

.legal-page h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.5rem;
  color: var(--accent);
}

.legal-page p,
.legal-intro {
  color: var(--muted);
  line-height: 1.65;
}

.legal-page a {
  color: var(--usd);
}

.legal-updated {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
