:root {
  --bg: #0f172a;
  --bg-alt: #020617;
  --card-bg: #020617;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-strong: rgba(56, 189, 248, 0.35);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --danger: #f97373;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.7);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 50%, #000 100%);
  color: var(--text);
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.site-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Header / nav */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  /* force non-sticky */
  position: static !important;
  top: auto !important;
}


.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, #facc15, #f97316 45%, #7c2d12 100%);
  box-shadow: 0 8px 25px rgba(248, 250, 252, 0.15);
  position: relative;
}

.brand-icon::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 42, 0.7);
  transform: rotate(-18deg);
}

.brand-text-main {
  font-weight: 650;
  letter-spacing: 0.03em;
  font-size: 1.1rem;
}

.brand-text-sub {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.15s ease-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-links a span.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.nav-links a:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
}

.nav-links a.nav-active {
  color: var(--text);
  border-color: var(--accent-strong);
  background: rgba(8, 47, 73, 0.7);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

/* Hero / layout */

.hero {
  margin-top: 32px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 24px;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.0rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.hero-highlight {
  color: #facc15;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 32rem;
}

.hero-chip-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip {
  font-size: 0.75rem;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--muted);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.8));
}

.hero-panel {
  border-radius: 24px;
  padding: 18px 18px 22px;
  background: radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-panel-heading {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(226, 232, 240, 0.9);
  margin-bottom: 10px;
}

.hero-panel-mock {
  margin-top: 6px;
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-panel-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.hero-panel-time {
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.hero-panel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.hero-panel-pill {
  font-size: 0.7rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: rgba(226, 232, 240, 0.9);
}

.hero-panel-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.33), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Card grid */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
  padding: 16px 16px 18px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease-out;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card h2 {
  font-size: 1.0rem;
  margin: 0 0 6px;
}

.card p {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0 0 10px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.pill {
  font-size: 0.7rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.card a.card-link {
  text-decoration: none;
  color: var(--accent);
  font-size: 0.8rem;
}

.card a.card-link:hover {
  text-decoration: underline;
}

/* Tool shell */

.tool-shell {
  max-width: 640px;
  margin: 32px auto 0;
  padding: 20px 18px 24px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: var(--shadow-soft);
}

.tool-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.tool-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.tool-tagline {
  font-size: 0.8rem;
  color: var(--muted);
}

.tool-body {
  margin-top: 10px;
}

.tool-footer {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-soft {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  color: var(--muted);
}

/* Timer display */

.timer-display {
  font-size: 3.0rem;
  letter-spacing: 0.14em;
  text-align: center;
  padding: 14px 8px;
  border-radius: 18px;
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 1));
  border: 1px solid rgba(148, 163, 184, 0.55);
  margin-bottom: 14px;
}

/* Buttons */

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  padding: 7px 18px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.08s ease-out, box-shadow 0.1s ease-out, background 0.15s;
}

.coin-spin {
  animation: coinFlip 0.8s ease-in-out;
}

@keyframes coinFlip {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(540deg) scale(1.3); }
  100% { transform: rotateY(1080deg) scale(1); }
}


.btn:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.9);
}

.btn-primary {
  background: linear-gradient(120deg, #22c55e, #16a34a);
  border-color: rgba(22, 163, 74, 0.9);
}

.btn-primary:hover {
  background: linear-gradient(120deg, #4ade80, #16a34a);
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: linear-gradient(120deg, #f97373, #ef4444);
  border-color: rgba(248, 113, 113, 0.95);
}

/* Inputs */

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.field {
  flex: 1;
  min-width: 120px;
}

.label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 3px;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  font-size: 0.85rem;
}

input[type="number"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.6);
}

/* Footer */

.site-footer {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(31, 41, 55, 1);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 22px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-panel {
    order: -1;
  }
}
