@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #05050a;
  --card: #111118;
  --border: rgba(255,255,255,.08);
  --text: #e5e7eb;
  --muted: #8b92a5;
  --purple: #8b5cf6;
  --purple-dark: #6d28d9;
  --purple-soft: rgba(139,92,246,.16);
  --purple-border: rgba(139,92,246,.35);
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(139,92,246,.22), transparent 34%),
    radial-gradient(circle at 90% 40%, rgba(109,40,217,.18), transparent 32%),
    var(--bg);
}

.hidden { display: none !important; }

.cfg-header {
  height: 72px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(5,5,10,.72);
  backdrop-filter: blur(18px);
}

.cfg-brand,
.cfg-header nav {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.cfg-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;
}

.cfg-brand img {
  width: 36px;
  height: 36px;
}

.cfg-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  transition: color .2s;
}

.cfg-header nav a:hover { color: #fff; }

.cfg-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4rem 0;
}

.cfg-hero {
  max-width: 760px;
  margin-bottom: 2rem;
}

.cfg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1rem;
  padding: .45rem .9rem;
  border: 1px solid var(--purple-border);
  border-radius: 999px;
  color: #c4b5fd;
  background: var(--purple-soft);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cfg-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  margin-bottom: 1rem;
}

.cfg-hero p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 640px;
}

.cfg-alert {
  margin-bottom: 1rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--purple-border);
  background: var(--purple-soft);
  color: #ddd6fe;
}

.cfg-alert.error {
  border-color: rgba(248,113,113,.35);
  background: rgba(248,113,113,.12);
  color: #fecaca;
}

.cfg-card {
  background: rgba(17,17,24,.82);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.cfg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.cfg-card-head {
  margin-bottom: 1rem;
}

.cfg-card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cfg-card h2 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  margin-bottom: .35rem;
}

.cfg-card h2 i { color: var(--purple); }

.cfg-card p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.cfg-upload label {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cfg-upload input {
  width: 100%;
  margin-top: .42rem;
  padding: .8rem .9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0c0c12;
  color: #fff;
  font: inherit;
  outline: none;
}

.cfg-upload input:focus {
  border-color: var(--purple-border);
  box-shadow: 0 0 0 3px rgba(139,92,246,.12);
}

.cfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .75rem 1rem;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  font: inherit;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.cfg-btn:disabled {
  opacity: .6;
  cursor: wait;
}

.cfg-btn-ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: #ddd6fe;
}

.cfg-help code {
  display: block;
  margin-top: 1rem;
  padding: .75rem;
  border-radius: 10px;
  background: rgba(0,0,0,.28);
  color: #c4b5fd;
  font-size: .82rem;
  white-space: pre-wrap;
}

.cfg-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .85rem;
}

.cfg-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
}

.cfg-item-top {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .8rem;
}

.cfg-item h3 {
  font-size: .98rem;
  margin-bottom: .3rem;
}

.cfg-item span,
.cfg-item small {
  color: var(--muted);
  font-size: .75rem;
}

.cfg-code {
  color: #c4b5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

.cfg-locked {
  max-width: 520px;
  text-align: center;
}

.cfg-locked > i {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
  border-radius: 14px;
  color: #c4b5fd;
  background: var(--purple-soft);
  font-size: 1.5rem;
}

.cfg-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

@media (max-width: 760px) {
  .cfg-header {
    height: auto;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .cfg-grid {
    grid-template-columns: 1fr;
  }

  .cfg-card-head-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
