:root {
  --bg: #060812;
  --bg2: #0b1020;
  --card: rgba(255,255,255,.075);
  --card2: rgba(255,255,255,.11);
  --stroke: rgba(255,255,255,.13);
  --text: #f8fbff;
  --muted: rgba(248,251,255,.66);
  --muted2: rgba(248,251,255,.45);
  --accent: #8b5cf6;
  --accent2: #22d3ee;
  --good: #34d399;
  --danger: #fb7185;
  --shadow: 0 26px 90px rgba(0,0,0,.42);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #eef4ff;
  --bg2: #f8fbff;
  --card: rgba(255,255,255,.78);
  --card2: rgba(255,255,255,.95);
  --stroke: rgba(20,35,64,.13);
  --text: #0d1323;
  --muted: rgba(13,19,35,.64);
  --muted2: rgba(13,19,35,.45);
  --accent: #2563eb;
  --accent2: #06b6d4;
  --shadow: 0 26px 80px rgba(30,58,138,.16);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 8% -10%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 34%),
    radial-gradient(circle at 92% 4%, color-mix(in srgb, var(--accent2) 24%, transparent), transparent 32%),
    linear-gradient(145deg, var(--bg), var(--bg2));
}

button, input, select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  opacity: .08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  z-index: -2;
  border-radius: 999px;
  filter: blur(62px);
  opacity: .45;
  pointer-events: none;
}

.glow-1 {
  width: 320px;
  height: 320px;
  top: 160px;
  left: -110px;
  background: var(--accent);
}

.glow-2 {
  width: 380px;
  height: 380px;
  right: -160px;
  top: 360px;
  background: var(--accent2);
}

.header {
  position: sticky;
  top: 12px;
  z-index: 10;
  width: min(1180px, calc(100% - 28px));
  margin: 12px auto 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg2) 78%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

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

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 950;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 18px 35px color-mix(in srgb, var(--accent) 35%, transparent);
}

.brand b {
  display: block;
  letter-spacing: -.03em;
}

.brand small {
  display: block;
  color: var(--muted2);
  font-size: 12px;
  font-weight: 800;
}

.nav {
  justify-self: center;
  display: flex;
  gap: 8px;
}

.nav a {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 850;
}

.nav a:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.theme-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.bot-link, .primary, .secondary, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 950;
  cursor: pointer;
}

.bot-link, .primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  box-shadow: 0 18px 38px color-mix(in srgb, var(--accent) 32%, transparent);
}

.secondary, .ghost {
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.07);
  color: var(--text);
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 110px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  align-items: center;
  gap: 28px;
  padding: 72px 0 42px;
}

.pill, .overline {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255,255,255,.07);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 18px 0 18px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: .91;
  letter-spacing: -.08em;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  max-width: 560px;
}

.stats div, .hero-card, .panel, .bot-section, .ad-placeholder {
  border: 1px solid var(--stroke);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.stats div {
  border-radius: 22px;
  padding: 16px;
}

.stats b {
  display: block;
  font-size: 28px;
  letter-spacing: -.05em;
}

.stats span {
  color: var(--muted);
  font-weight: 800;
}

.hero-card {
  min-height: 380px;
  border-radius: 42px;
  padding: 26px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 42%),
    var(--card);
}

.hero-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: var(--muted);
}

.hero-card-top b {
  color: var(--text);
  font-size: 28px;
  letter-spacing: -.05em;
}

.hero-rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 74px 0 18px;
}

.hero-rate-grid div {
  border: 1px solid var(--stroke);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255,255,255,.075);
}

.hero-rate-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.hero-rate-grid strong {
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.06em;
}

.hero-bank {
  border-radius: 999px;
  padding: 13px 15px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-weight: 850;
}

.ad-wrap {
  margin: 0 0 22px;
}

.ad-placeholder {
  border-radius: 28px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 96px;
  border-style: dashed;
}

.ad-placeholder b {
  display: block;
  font-size: 18px;
}

.ad-placeholder span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.ad-placeholder code {
  color: var(--muted2);
}

.panel, .bot-section {
  border-radius: 34px;
  padding: 24px;
  margin: 22px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2, .bot-section h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: -.07em;
}

.filters, .converter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.converter {
  grid-template-columns: 1fr 1fr;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 850;
  font-size: 13px;
}

.full {
  grid-column: 1 / -1;
}

select, input {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px 14px;
  outline: none;
  background: rgba(255,255,255,.08);
  color: var(--text);
}

select option {
  color: #101728;
}

input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent);
}

.status {
  color: var(--muted);
  margin-bottom: 14px;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.rate-card, .best-card {
  border: 1px solid var(--stroke);
  border-radius: 26px;
  padding: 18px;
  background: rgba(255,255,255,.065);
}

.rate-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rate-head b {
  font-size: 24px;
  letter-spacing: -.055em;
}

.rate-head small {
  color: var(--muted);
}

.badge {
  height: max-content;
  border-radius: 999px;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: color-mix(in srgb, var(--accent2) 70%, white);
  font-weight: 950;
  font-size: 12px;
}

.rate-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rate-values div, .best-line {
  border-radius: 18px;
  padding: 13px;
  background: rgba(0,0,0,.13);
}

.rate-values span, .best-line span {
  display: block;
  color: var(--muted2);
  font-size: 12px;
  font-weight: 850;
}

.rate-values strong, .best-line strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  letter-spacing: -.04em;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
  gap: 22px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-weight: 950;
  cursor: pointer;
}

.tab.active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.hint {
  color: var(--muted);
  line-height: 1.5;
}

.best-list {
  display: grid;
  gap: 12px;
}

.best-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.best-card-grid {
  display: grid;
  gap: 10px;
}

.convert-result {
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), rgba(255,255,255,.055));
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.05em;
  text-align: center;
}

.convert-result small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.bot-section {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
}

.bot-section p {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.6;
}

.big {
  min-height: 58px;
  border-radius: 22px;
}

.footer {
  width: min(1180px, calc(100% - 28px));
  margin: 30px auto;
  display: flex;
  justify-content: space-between;
  color: var(--muted2);
  font-weight: 850;
}

.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 900px) {
  .header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    display: none;
  }

  .bot-link {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 46px;
  }

  .hero-card {
    min-height: auto;
  }

  .filters, .rates-grid, .grid-two, .bot-section {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .ad-placeholder {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  main, .header, .footer {
    width: min(100% - 20px, 1180px);
  }

  .hero h1 {
    font-size: 46px;
  }

  .hero p {
    font-size: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .hero-rate-grid, .converter {
    grid-template-columns: 1fr;
  }

  .panel, .bot-section {
    padding: 18px;
    border-radius: 28px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
  }
}


/* PMR Finance avatar logo */
.brand-logo-img {
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent2) 34%, transparent);
  box-shadow:
    0 0 0 4px rgba(255,255,255,.035),
    0 18px 40px color-mix(in srgb, var(--accent) 28%, transparent);
}

.brand-logo-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
