
* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #10100f;
  --panel: #191816;
  --panel-raised: #201e1a;
  --line: #39352e;
  --text: #f3eee4;
  --muted: #a49b8d;
  --subtle: #70685d;
  --accent: #c83b3b;
  --accent-light: #f07878;
  --input: #11110f;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(200, 59, 59, 0.10), transparent 42%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 42px 22px 30px;
}

.header {
  text-align: left;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.bitcoin-symbol {
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
}

.header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(29px, 6vw, 39px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.header p {
  margin: 12px 0 0;
  color: var(--accent-light);
  font-size: 10px;
  line-height: 1.7;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.converter {
  width: 100%;
}

.currency-card {
  width: 100%;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--panel-raised), var(--panel) 72%);
  transition: border-color 160ms ease, transform 160ms ease;
}

.currency-card:focus-within {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.currency-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.currency-code {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.currency-name {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source {
  color: var(--accent-light);
  font-size: 9px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: right;
  white-space: nowrap;
}

.market-price {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.market-price span {
  color: var(--subtle);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.market-price strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.amount-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 0 2px;
  border: 0;
  outline: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-align: right;
  appearance: none;
}

.amount-input:focus {
  outline: none;
}

.amount-input::placeholder {
  color: #615b51;
}

.amount-input::selection {
  background: var(--accent);
  color: #17130e;
}

.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.amount-input[type="number"] {
  appearance: textfield;
}

.connector {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connector span {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent-light);
  font-size: 18px;
}

.status {
  min-height: 18px;
  margin-top: 22px;
  color: var(--accent-light);
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer p {
  max-width: 430px;
  margin: 0 auto;
  color: var(--subtle);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .app {
    padding: 28px 15px 22px;
  }

  .header {
    margin-bottom: 27px;
  }

  .bitcoin-symbol {
    font-size: 36px;
  }

  .currency-card {
    padding: 16px;
  }

  .currency-header {
    gap: 10px;
  }

  .currency-code {
    font-size: 23px;
  }

  .source {
    font-size: 8px;
    white-space: normal;
  }

  .amount-input {
    font-size: 29px;
  }

  .connector {
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
