:root {
  --bg: #f3f6f4;
  --bg-2: #e7efea;
  --ink: #10231c;
  --muted: #5b6f66;
  --line: rgba(16, 35, 28, 0.12);
  --brand: #0f7a5f;
  --brand-2: #19a37d;
  --accent: #e85d04;
  --accent-2: #f48c06;
  --card: rgba(255, 255, 255, 0.72);
  --shadow: 0 20px 50px rgba(16, 35, 28, 0.08);
  --radius: 22px;
  --font-display: "Sora", sans-serif;
  --font-body: "Outfit", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
.container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(25, 163, 125, 0.28), transparent 60%),
    radial-gradient(700px 420px at 90% 0%, rgba(244, 140, 6, 0.22), transparent 55%),
    radial-gradient(600px 400px at 50% 100%, rgba(15, 122, 95, 0.12), transparent 50%),
    linear-gradient(180deg, #f7faf8 0%, #eef4f0 100%);
}
.bg-mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(16,35,28,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(16,35,28,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(243, 246, 244, 0.75);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--accent) 100%);
  box-shadow: 0 10px 24px rgba(15, 122, 95, 0.28);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px 12px 8px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  border-right: 3px solid transparent;
  border-top: 3px solid transparent;
  transform: rotate(-45deg);
}
.brand-text em {
  font-style: normal;
  color: var(--brand);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-weight: 500;
}
.nav a:not(.btn):hover { color: var(--brand); }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.25rem;
  font-weight: 650;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 122, 95, 0.28);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 28px rgba(232, 93, 4, 0.25);
}
.btn-ghost {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.hero {
  padding: 4.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 1rem;
}
.hero-copy h1 span {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.live-counter {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: floatIn .8s ease both;
}
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22,163,74,.6);
  animation: pulse 1.6s infinite;
}
.live-counter strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}
.muted { color: var(--muted); }
.tiny { font-size: .88rem; }

.hero-visual {
  position: relative;
  min-height: 420px;
  border-radius: 36px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(15,122,95,.92), rgba(16,35,28,.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 40 40'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: var(--shadow);
  animation: rise .9s ease both;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: auto -20% -20% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(244,140,6,.55), transparent 70%);
  filter: blur(10px);
}
.platform-orbit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.orbit-ring {
  width: 78%;
  aspect-ratio: 1;
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 50%;
  animation: spin 28s linear infinite;
  position: relative;
}
.chip {
  position: absolute;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  font-weight: 600;
  font-size: .92rem;
}
.chip:nth-child(1) { top: 8%; left: 38%; }
.chip:nth-child(2) { top: 42%; right: -2%; }
.chip:nth-child(3) { bottom: 12%; left: 34%; }
.chip:nth-child(4) { top: 42%; left: -4%; }
.orbit-core {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 36px;
  background: linear-gradient(145deg, #fff, #d9f3ea);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: 0 20px 40px rgba(0,0,0,.18);
  animation: bob 3.5s ease-in-out infinite;
}

.section { padding: 3.5rem 0; }
.section-head {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.035em;
  margin: 0 0 .6rem;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 1.4rem;
}
.converter-panel { padding: 1.5rem; }
.form-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: .8rem;
}
.field label {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: .9rem 1rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(25,163,125,.15);
}
.notice {
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  background: rgba(15,122,95,.08);
  border: 1px solid rgba(15,122,95,.15);
  color: var(--ink);
  font-size: .92rem;
}
.alert {
  padding: .9rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-weight: 500;
}
.alert-error { background: #ffe8e5; color: #9f1d1d; border: 1px solid #ffc9c2; }
.alert-success { background: #e7f8ef; color: #0f6a42; border: 1px solid #b7ebcf; }
.alert-info { background: #eef6ff; color: #1e4f8a; border: 1px solid #c9dffc; }

.result-card {
  margin-top: 1.2rem;
  display: none;
  gap: 1rem;
  align-items: center;
}
.result-card.show { display: grid; grid-template-columns: 120px 1fr; }
.result-card img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 14px;
  background: #dfe8e3;
}
.progress {
  display: none;
  margin-top: 1rem;
}
.progress.show { display: block; }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(16,35,28,.08);
  overflow: hidden;
}
.progress-bar > span {
  display: block;
  height: 100%;
  width: 30%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  animation: indeterminate 1.2s ease-in-out infinite;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.step {
  padding: 1.3rem;
  border-radius: 20px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(15,122,95,.12);
  color: var(--brand);
  font-weight: 700;
  margin-bottom: .8rem;
}
.step h3 {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1rem;
}
.platforms span {
  padding: .55rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: .92rem;
}

.auth-wrap {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 3rem 0;
}
.auth-card {
  width: min(440px, 100%);
  padding: 1.8rem;
}
.auth-card h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0 0 .4rem;
}
.stack { display: grid; gap: .9rem; margin-top: 1.2rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.2rem;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}
.stat {
  padding: 1rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
th, td {
  text-align: left;
  padding: .75rem .5rem;
  border-bottom: 1px solid var(--line);
}
th { color: var(--muted); font-weight: 600; }
.badge {
  display: inline-flex;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}
.badge-ok { background: #dcfce7; color: #166534; }
.badge-fail { background: #fee2e2; color: #991b1b; }
.badge-wait { background: #ffedd5; color: #9a3412; }

.legal {
  padding: 3rem 0 4rem;
}
.legal article {
  max-width: 760px;
}
.legal h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
.legal h2 { margin-top: 1.8rem; }
.legal p, .legal li { color: var(--muted); }

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.45);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}
.footer-grid h4 {
  margin: 0 0 .7rem;
  font-family: var(--font-display);
}
.footer-grid a {
  display: block;
  color: var(--muted);
  margin-bottom: .35rem;
}
.footer-grid a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 720px;
  margin-inline: auto;
  background: #10231c;
  color: #eff7f2;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.cookie-banner a { color: #9ae6c3; text-decoration: underline; }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-banner .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }

.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  background: #0d1a15;
  color: #e8f2ed;
}
.admin-side {
  padding: 1.4rem 1rem;
  border-right: 1px solid rgba(255,255,255,.08);
  background: #0b1612;
}
.admin-side a {
  display: block;
  padding: .7rem .85rem;
  border-radius: 12px;
  margin-bottom: .3rem;
  color: #c5d8cf;
}
.admin-side a:hover, .admin-side a.active {
  background: rgba(25,163,125,.18);
  color: #fff;
}
.admin-main { padding: 1.5rem; }
.admin-main .panel {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  color: #e8f2ed;
}
.admin-main .stat {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
  color: #e8f2ed;
}
.admin-main th, .admin-main td { border-color: rgba(255,255,255,.08); }
.admin-main .muted { color: #9db5aa; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.admin-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(25,163,125,.25), transparent),
    #0d1a15;
  color: #e8f2ed;
}
.admin-login-body .panel {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
  width: min(400px, calc(100% - 2rem));
}
.admin-login-body input {
  background: rgba(0,0,0,.25);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); }
  70% { box-shadow: 0 0 0 12px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes floatIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes indeterminate {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}

@media (max-width: 900px) {
  .hero-grid, .dashboard-grid, .footer-grid, .steps, .form-row, .stat-grid, .admin-shell {
    grid-template-columns: 1fr;
  }
  .nav {
    position: fixed;
    inset: 74px 1rem auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .hero-visual { min-height: 320px; }
  .result-card.show { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
}
