/* CANLIK.com — dark gold finance theme */

:root {
  --bg: #070a10;
  --bg-2: #0c111b;
  --surface: #121925;
  --surface-2: #182233;
  --border: #2a3548;
  --text: #f3f0e7;
  --muted: #9aa3b5;
  --gold: #d4af37;
  --gold-2: #f0d078;
  --gold-dim: rgba(212, 175, 55, 0.14);
  --live: #3dff8a;
  --up: #3dff8a;
  --down: #ff6b6b;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: "Montserrat", system-ui, sans-serif;
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  z-index: -2;
}

.bg-chart {
  position: fixed;
  right: -5%;
  top: 8%;
  width: min(55vw, 640px);
  height: 420px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background:
    linear-gradient(120deg, transparent 20%, rgba(212, 175, 55, 0.18), transparent 70%),
    radial-gradient(circle at 70% 40%, rgba(61, 255, 138, 0.08), transparent 50%);
  clip-path: polygon(8% 78%, 18% 62%, 28% 68%, 40% 48%, 52% 55%, 64% 32%, 76% 40%, 88% 18%, 100% 28%, 100% 100%, 0 100%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 10, 16, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.brand-text strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--gold-2);
}

.brand-text span {
  color: var(--text);
  font-weight: 600;
}

.brand-text em {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.nav-links {
  display: none;
  gap: 1.25rem;
  margin-left: 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--gold-2);
}

.live-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(61, 255, 138, 0.35);
  background: rgba(61, 255, 138, 0.08);
  color: var(--live);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.7);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(61, 255, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0); }
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.hero-coin {
  width: min(280px, 70vw);
  filter: drop-shadow(0 24px 40px rgba(212, 175, 55, 0.22));
  animation: float 5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-copy {
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff2c4 0%, var(--gold) 45%, #9a7420 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.05;
}

.hero-copy h1 span {
  color: #e8e2d2;
  background: none;
  -webkit-text-fill-color: #e8e2d2;
}

.tagline {
  margin: 0.75rem 0 0.4rem;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  color: #c8cdd8;
  font-weight: 500;
}

.asset-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-live {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--live);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-live time {
  margin-left: 0.4rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  font-weight: 500;
}

/* Ticker */
.ticker-wrap {
  border-block: 1px solid var(--border);
  background: rgba(18, 25, 37, 0.85);
  overflow: hidden;
}

.ticker {
  height: 46px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  width: max-content;
  animation: marquee 32s linear infinite;
  padding-inline: 1rem;
  font-size: 0.86rem;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

.ticker-item .name {
  color: var(--gold-2);
  font-weight: 700;
}

.ticker-item .price {
  font-variant-numeric: tabular-nums;
}

.ticker-item .chg.up { color: var(--up); }
.ticker-item .chg.down { color: var(--down); }

.flash-up { animation: flashUp 0.55s ease; }
.flash-down { animation: flashDown 0.55s ease; }

@keyframes flashUp {
  from { background: rgba(61, 255, 138, 0.22); }
  to { background: transparent; }
}
@keyframes flashDown {
  from { background: rgba(255, 107, 107, 0.22); }
  to { background: transparent; }
}

/* Sections */
.section {
  padding: 2.75rem 0;
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--gold-2);
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.rates-table th,
.rates-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.rates-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
}

.rates-table td {
  font-variant-numeric: tabular-nums;
}

.rates-table tr:last-child td {
  border-bottom: 0;
}

.rates-table tbody tr {
  transition: background 0.2s ease;
}

.rates-table tbody tr:hover {
  background: rgba(212, 175, 55, 0.06);
}

.pair-name {
  font-weight: 700;
}

.pair-code {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.chg.up { color: var(--up); font-weight: 600; }
.chg.down { color: var(--down); font-weight: 600; }

.skeleton-row td {
  color: var(--muted);
  text-align: center !important;
  padding: 2rem !important;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(212, 175, 55, 0.08), transparent 42%),
    var(--surface);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  min-height: 120px;
}

.card h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gold-2);
}

.card .meta {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.card .value {
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card .delta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.skeleton-card {
  background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* Converter */
.converter-grid .section-head {
  margin-bottom: 1rem;
}

.converter {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.converter label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.converter input,
.converter select {
  width: 100%;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  padding: 0 0.85rem;
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
}

.converter input:focus,
.converter select:focus {
  outline: 2px solid rgba(212, 175, 55, 0.45);
  border-color: var(--gold);
}

.converter-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: end;
}

.swap-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--gold-dim);
  color: var(--gold-2);
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.2s ease;
}

.swap-btn:hover {
  background: rgba(212, 175, 55, 0.25);
}

.swap-btn.spin {
  transform: rotate(180deg);
}

.converter-result {
  border-radius: 10px;
  padding: 1rem;
  background: var(--gold-dim);
  border: 1px solid rgba(212, 175, 55, 0.28);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold-2);
}

/* Footer */
.site-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  background: #05070c;
  padding: 2rem 0 2.5rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-brand img {
  border-radius: 50%;
}

.footer-brand strong {
  color: var(--gold-2);
}

.footer-brand p,
.footer-note,
.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (min-width: 720px) {
  .nav-links { display: flex; }
  .hero-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 2rem;
    min-height: 420px;
  }
  .hero-copy { text-align: left; }
  .hero-coin { width: min(340px, 100%); }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-coin,
  .ticker-track,
  .live-dot {
    animation: none !important;
  }
}
