:root {
  --bg: #090909;
  --surface: #101010;
  --surface-2: #151515;
  --surface-3: #1b1b1b;
  --border: #262626;
  --border-light: #333;
  --text: #f2f2f2;
  --muted: #858585;
  --dim: #555;
  --accent: #c8102e;
  --accent-bright: #ed1c3d;
  --font: "Manrope", sans-serif;
  --mono: "DM Mono", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: .10;
  pointer-events: none;
  z-index: -1;
}

.ambient-one {
  background: #a50d28;
  top: 100px;
  left: -260px;
}

.ambient-two {
  background: #68101e;
  right: -300px;
  top: 420px;
}

.topbar {
  height: 76px;
  max-width: 1240px;
  margin: auto;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 7px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(200,16,46,.22);
}

.brand-light {
  color: #777;
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot, .live-indicator span, .footer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #49b77a;
  box-shadow: 0 0 10px rgba(73,183,122,.35);
}

.status-text {
  color: #777;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.2px;
}

.page {
  width: min(100% - 48px, 960px);
  margin: auto;
  padding: 88px 0 72px;
}

.intro {
  margin-bottom: 42px;
  animation: rise-in .7s cubic-bezier(.2,.7,.2,1) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a0a0a0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  margin-bottom: 19px;
}

.eyebrow span {
  width: 21px;
  height: 1px;
  background: var(--accent-bright);
}

h1 {
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: -3.8px;
  font-weight: 700;
}

h1 span {
  color: #777;
}

.subtitle {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: .1px;
}

.converter-panel {
  background: linear-gradient(145deg, rgba(20,20,20,.98), rgba(13,13,13,.98));
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 24px 80px rgba(0,0,0,.24);
  animation: rise-in .75s .08s cubic-bezier(.2,.7,.2,1) both;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.panel-label {
  color: #999;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
}

.panel-description {
  color: #686868;
  font-size: 12px;
  margin-top: 8px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8c8c8c;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.live-indicator span {
  width: 6px;
  height: 6px;
}

.conversion-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  padding: 29px 0 24px;
}

.field-group {
  min-width: 0;
}

.field-group label {
  display: block;
  color: #999;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  height: 47px;
  padding: 0 38px 0 14px;
  appearance: none;
  outline: none;
  color: #dedede;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.select-wrap select:focus {
  border-color: #71303c;
  background: #191416;
}

.select-wrap select option {
  background: #151515;
  color: #eee;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-58%);
  color: #888;
  pointer-events: none;
  font-size: 18px;
}

.input-wrap, .result-wrap {
  height: 65px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  background: #0b0b0b;
  border: 1px solid #303030;
  border-radius: 7px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-wrap:focus-within {
  border-color: #8e263a;
  box-shadow: 0 0 0 3px rgba(200,16,46,.09);
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4f4f4;
  font-family: var(--mono);
  font-size: 19px;
  letter-spacing: .3px;
}

.input-wrap input::placeholder {
  color: #454545;
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0;
}

.clear-input, .copy-button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #777;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.clear-input {
  font-size: 22px;
}

.clear-input:hover, .copy-button:hover {
  color: #fff;
  background: #252525;
}

.result-wrap {
  justify-content: space-between;
  border-color: #3b252a;
  background: linear-gradient(110deg, rgba(65,14,25,.22), #0b0b0b 75%);
}

.result-wrap output {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f3dce0;
  font-family: var(--mono);
  font-size: 19px;
  line-height: 1.5;
  max-height: 55px;
  overflow-y: auto;
}

.result-wrap output.empty {
  color: #555;
}

.result-wrap output.error {
  color: #ed657a;
  font-size: 13px;
  font-family: var(--font);
}

.copy-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-hint {
  min-height: 16px;
  margin-top: 9px;
  color: #666;
  font-size: 10px;
}

.swap-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  align-self: center;
  margin-top: 23px;
  color: #aaa;
  background: #191919;
  border: 1px solid #303030;
  border-radius: 50%;
  cursor: pointer;
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .35s ease;
}

.swap-button span {
  font-size: 20px;
  line-height: 1;
}

.swap-button:hover {
  color: #fff;
  border-color: #873044;
  background: #28151a;
  transform: rotate(180deg);
}

.message-row {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 6px;
}

.message-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #aaa;
  border: 1px solid #555;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 10px;
}

.message-row p {
  color: #888;
  font-size: 11px;
}

.message-row.is-error {
  border-color: rgba(237,101,122,.22);
  background: rgba(200,16,46,.06);
}

.message-row.is-error .message-icon {
  color: #ed657a;
  border-color: #a83a4d;
}

.message-row.is-error p {
  color: #e17a89;
}

.message-row.is-success .message-icon {
  color: #72c99a;
  border-color: #397b55;
}

.message-row.is-success p {
  color: #8fbd9f;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
}

.panel-footer > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
}

.footer-dot {
  width: 5px;
  height: 5px;
}

.reset-button {
  padding: 7px 0 7px 10px;
  color: #888;
  background: none;
  border: 0;
  font-size: 11px;
  cursor: pointer;
  transition: color .2s ease;
}

.reset-button span {
  margin-left: 5px;
  color: var(--accent-bright);
}

.reset-button:hover {
  color: #fff;
}

.quick-section {
  margin-top: 55px;
  animation: rise-in .8s .16s cubic-bezier(.2,.7,.2,1) both;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 17px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.section-note {
  color: #626262;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding-bottom: 3px;
}

.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.example-card {
  min-width: 0;
  padding: 17px 18px;
  text-align: left;
  background: #101010;
  border: 1px solid #242424;
  border-radius: 9px;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.example-card:hover {
  transform: translateY(-4px);
  border-color: #71303c;
  background: #151113;
}

.example-type {
  display: block;
  color: #888;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .7px;
}

.example-type span {
  color: var(--accent-bright);
  margin: 0 4px;
}

.example-card strong {
  display: block;
  margin-top: 13px;
  color: #eee;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 400;
}

.example-result {
  display: block;
  margin-top: 5px;
  color: #777;
  font-family: var(--mono);
  font-size: 11px;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 42px;
  padding: 21px 0;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.info-number {
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 10px;
  padding-top: 2px;
}

.info-item strong {
  display: block;
  color: #c9c9c9;
  font-size: 11px;
  font-weight: 600;
}

.info-item p {
  margin-top: 4px;
  color: #666;
  font-family: var(--mono);
  font-size: 9px;
}

.footer {
  max-width: 1240px;
  margin: auto;
  padding: 23px 34px 28px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: #555;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 10;
  padding: 11px 17px;
  color: #eee;
  background: #202020;
  border: 1px solid #383838;
  border-radius: 7px;
  box-shadow: 0 10px 35px rgba(0,0,0,.35);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(17px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .topbar {
    height: 65px;
    padding: 0 21px;
  }

  .page {
    width: min(100% - 36px, 560px);
    padding: 65px 0 55px;
  }

  h1 {
    letter-spacing: -2.5px;
  }

  .converter-panel {
    padding: 21px 17px;
  }

  .conversion-grid {
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
    gap: 9px;
  }

  .swap-button {
    width: 34px;
    height: 34px;
  }

  .select-wrap select {
    padding-left: 9px;
    padding-right: 25px;
    font-size: 10px;
  }

  .select-arrow {
    right: 8px;
  }

  .input-wrap, .result-wrap {
    height: 58px;
    padding: 0 9px;
  }

  .input-wrap input, .result-wrap output {
    font-size: 15px;
  }

  .field-hint {
    font-size: 9px;
  }

  .examples {
    gap: 8px;
  }

  .example-card {
    padding: 14px 11px;
  }

  .example-type {
    font-size: 8px;
  }

  .example-card strong {
    font-size: 17px;
  }

  .info-strip {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 19px;
  }

  .footer {
    padding: 20px;
    font-size: 8px;
  }
}

@media (max-width: 390px) {
  .conversion-grid {
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
    gap: 6px;
  }

  .swap-button {
    width: 30px;
    height: 30px;
  }

  .swap-button span {
    font-size: 17px;
  }

  .select-wrap select {
    font-size: 9px;
  }

  .example-type {
    font-size: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}