/* CLIPMANIA Web — sistem desain monokrom, dark-first. */

:root {
  --bg: #050506;
  --bg-2: #0a0a0c;
  --panel: #0d0d10;
  --panel-2: #121216;
  --line: #202026;
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #f4f4f6;
  --muted: #93939d;
  --accent: #ffffff;
  --ok: #d7d7db;
  --warn: #a9a9b3;
  --bad: #e6e6ea;
  --glass: rgba(255, 255, 255, 0.035);
  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a.link { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
img { display: block; }
code { font-family: var(--mono); }

.container { width: min(1100px, 92vw); margin: 0 auto; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.accent { color: var(--accent); }

/* ---------------------------------------------------------------- Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner { display: flex; align-items: center; gap: 20px; height: 56px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.14em; font-size: 13px; }
.brand img { border-radius: 6px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.nav > a:hover { color: var(--text); background: var(--glass); }
.nav-form { display: inline-flex; margin-left: 6px; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  font-size: 16px;
  padding: 4px 10px;
  cursor: pointer;
}

/* ---------------------------------------------------------------- Main */
.main { flex: 1; padding: 40px 0 64px; }

.footer { border-top: 1px solid var(--line-soft); padding: 22px 0; font-size: 13px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Hero */
.hero { padding: 72px 0 26px; }
.kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 22px;
}
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--muted); max-width: 640px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 52px 0 0;
}
.hero-stats > div {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  backdrop-filter: blur(8px);
}
.hero-stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 6px 0 0; font-size: 14.5px; }

/* ---------------------------------------------------------------- Sections */
.section { margin-top: 64px; }
.section-title {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

.grid { display: grid; gap: 14px; }
.grid.features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.steps li {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.cta-band {
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 46px 24px;
}
.cta-band h2 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.02em; margin: 0 0 8px; }
.cta-band .btn { margin-top: 16px; }

/* ---------------------------------------------------------------- Cards */
.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 16.5px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card-title { font-size: 14px; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }

.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.stat-num { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }

/* ---------------------------------------------------------------- Page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 4px 0 0; font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; }
.page-head .kicker { margin: 0; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  font-family: inherit;
}
.btn-solid { background: var(--accent); color: #08080a; }
.btn-solid:hover { opacity: 0.88; }
.btn-outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: #3a3a42; background: var(--glass); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--glass); }
.btn-ghost.danger:hover { color: #fff; background: rgba(255, 255, 255, 0.09); }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- Forms */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.field > span { color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

input, select {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus { border-color: #4a4a54; }
input::placeholder { color: #5c5c66; }

.search-form { display: flex; gap: 8px; align-items: center; }
.search-form input { min-width: 240px; }

/* ---------------------------------------------------------------- Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table-compact td, .table-compact th { padding: 9px 10px; font-size: 13.5px; }
.table-scroll { overflow-x: auto; }
.inline-form { display: inline; }
.action-row { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Badges */
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.badge-ok { background: rgba(255, 255, 255, 0.92); color: #0a0a0c; border-color: transparent; }
.badge-warn { background: var(--glass); color: var(--text); }
.badge-bad { background: transparent; color: var(--muted); border-color: var(--line); }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 6px;
}

.code-inline { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- Flash */
.flash {
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 9px;
  padding: 11px 15px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-success { border-color: rgba(255, 255, 255, 0.35); }
.flash-error { border-color: #6b6b76; background: rgba(255, 255, 255, 0.06); }
.flash-info { border-color: var(--line); }

/* ---------------------------------------------------------------- Auth */
.auth-wrap { display: flex; justify-content: center; padding: 44px 0; }
.auth-card { width: min(420px, 100%); }
.auth-title { margin: 6px 0 6px; font-size: 28px; letter-spacing: -0.02em; }
.auth-card .muted { margin-top: 0; }
.auth-card .stack { margin-top: 18px; }
.auth-card .small { margin-top: 16px; }

/* ---------------------------------------------------------------- License */
.license-card { max-width: 640px; margin-bottom: 16px; }
.license-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.license-code {
  font-family: var(--mono);
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: 0.1em;
  margin: 0 0 12px;
  user-select: all;
}

/* ---------------------------------------------------------------- KV lists */
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 8px 18px; margin: 16px 0; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.stat-big { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 6px; }

/* ---------------------------------------------------------------- Misc */
.notfound { text-align: center; padding: 70px 0; }
.notfound h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -0.02em; margin: 8px 0; }
.notfound .btn { margin-top: 18px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.pager-links { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 860px) {
  .grid.features, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 10px 4vw 16px;
    gap: 2px;
  }
  .nav.open { display: flex; }
  .nav > a { padding: 11px 12px; }
  .nav-form { margin: 6px 0 0; }
  .nav-form .btn { width: 100%; }
}

@media (max-width: 560px) {
  .grid.features, .grid.cols-4 { grid-template-columns: 1fr; }
  .search-form { width: 100%; }
  .search-form input { min-width: 0; flex: 1; }
}
