:root {
  --bg: #0f172a;
  --bg2: #111827;
  --card: rgba(255,255,255,.08);
  --card2: rgba(255,255,255,.12);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --line: rgba(255,255,255,.14);
  --accent: #38bdf8;
  --accent2: #22c55e;
  --danger: #fb7185;
  --shadow: rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(56,189,248,.22), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(34,197,94,.16), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg2));
  min-height: 100vh;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  pointer-events: none;
}

.nav {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  font-size: 20px;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  box-shadow: 0 12px 30px rgba(56,189,248,.25);
  position: relative;
}

.logo:after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,.75);
}

nav {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,.06);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 999px;
}

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

main {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
  gap: 32px;
  align-items: center;
}

.hero-text { max-width: 780px; }

h1 {
  margin: 20px 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .92;
  letter-spacing: -0.075em;
}

.narrow h1 {
  font-size: clamp(38px, 6vw, 64px);
}

h2 {
  margin: 20px 0 14px;
  letter-spacing: -0.045em;
  font-size: 26px;
}

p, li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #bbf7d0;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.28);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 750;
}

.badge:before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent2);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(34,197,94,.12);
}

.card, .panel, .status-list, .converter {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 26px 80px var(--shadow);
  backdrop-filter: blur(18px);
}

.card { padding: 24px; }

.card-top {
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  padding-bottom: 16px;
}

.card-top strong, .metric strong, .status-row strong {
  color: #bbf7d0;
}

.metric, .status-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.metric span, .status-row span { color: var(--muted); }

.converter {
  margin-top: 42px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
}

.dropzone {
  min-height: 260px;
  border: 1.5px dashed rgba(255,255,255,.24);
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: .2s ease;
}

.dropzone.active,
.dropzone:hover {
  border-color: rgba(56,189,248,.65);
  background: rgba(56,189,248,.08);
}

.dropzone input { display: none; }

.drop-icon {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: rgba(56,189,248,.15);
  display: grid;
  place-items: center;
  color: #bae6fd;
  font-size: 34px;
  margin: 0 auto 16px;
}

.settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

select, input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}

select option {
  background: #111827;
  color: white;
}

input[type="range"] {
  width: 100%;
}

.buttons, .settings .btn {
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 17px;
  border-radius: 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,.07);
  font-weight: 750;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-color: transparent;
}

.results {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.notice {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 15px 16px;
  color: var(--muted);
}

.result {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  border-radius: 18px;
  padding: 12px;
}

.result.error {
  color: var(--danger);
  display: block;
}

.preview {
  width: 76px;
  height: 60px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.result-info span {
  color: var(--soft);
  font-size: 14px;
}

.grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.panel { padding: 24px; }

.icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(56,189,248,.13);
  color: #bae6fd;
  font-weight: 850;
  margin-bottom: 18px;
}

.narrow { max-width: 860px; }

.status-list {
  padding: 8px 24px;
  margin: 28px 0;
}

code {
  background: rgba(255,255,255,.09);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 8px;
  color: #e0f2fe;
}

footer {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .nav, footer {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    flex-wrap: wrap;
    border-radius: 18px;
  }

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

  main { padding-top: 34px; }

  h1 { font-size: 42px; }

  .result {
    grid-template-columns: 64px 1fr;
  }

  .result .btn {
    grid-column: 1 / -1;
  }
}
