:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #7d8590;
  --green: #3fb950;
  --green-dim: #238636;
  --blue: #58a6ff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── HEADER ── */
.header {
  background: rgba(22,27,34,.95);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.logo svg { fill: currentColor; }
.logo:hover { opacity: .75; }
.search {
  flex: 1;
  max-width: 460px;
  position: relative;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: .2s;
}
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(88,166,255,.2); }
.search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  fill: var(--muted);
  pointer-events: none;
}
.nav { display: flex; gap: 8px; margin-left: auto; }
.nav button {
  height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .18s;
}
.nav .ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.nav .ghost:hover { background: #1c2128; }
.nav .primary {
  background: var(--green-dim);
  border: 1px solid rgba(240,246,252,.1);
  color: #fff;
}
.nav .primary:hover { background: var(--green); }

@media (max-width: 640px) {
  .header { padding: 12px 16px; }
  .search, .nav { display: none; }
}

/* ── MAIN ── */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: up .35s ease-out;
}

@keyframes up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ring */
.ring-wrap { position: relative; width: 160px; height: 160px; }
.ring-wrap svg {
  width: 160px;
  height: 160px;
  transform: rotate(-90deg);
}
.ring-bg  { fill: none; stroke: #21262d; stroke-width: 9; }
.ring-arc {
  fill: none;
  stroke: url(#g);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset .12s linear;
  filter: drop-shadow(0 0 8px rgba(63,185,80,.45));
}
.ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ring-secs {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.ring-pct {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* label */
.label {
  text-align: center;
}
.label h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -.02em;
}
.label p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 30ch;
  margin: 0 auto;
}

/* button */
.dl-btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green-dim);
  border: 1px solid rgba(240,246,252,.1);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
  position: relative;
  overflow: hidden;
}
.dl-btn svg { fill: currentColor; }
.dl-btn:hover {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(63,185,80,.2), 0 6px 20px rgba(35,134,54,.35);
  transform: translateY(-1px);
}
.dl-btn:active { transform: translateY(0); }

/* info */
.hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 18px 16px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-left svg { fill: #6e7681; }
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { font-size: 12px; color: #808080; }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}