:root {
  --bg:            #120F1A;
  --bg-elevated:   #1C1728;
  --bg-card:       #221B32;
  --border:        rgba(242, 204, 77, 0.16);
  --text:          #EAE6F2;
  --text-muted:    #A699BF;
  --accent:        #F2CC4D;
  --accent-hover:  #FFE28A;
  --error:         #F26D6D;
  --success:       #7FD99A;
  --font-display:  'Cinzel', 'Georgia', serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
}

a { color: var(--accent); }

/* --- Header ------------------------------------------------ */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.nav-cta {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }

/* --- Hero ---------------------------------------------------- */

.hero {
  padding: clamp(56px, 10vw, 120px) clamp(16px, 5vw, 64px);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(242, 204, 77, 0.08), transparent 60%),
    var(--bg);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5rem);
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 12px;
  text-wrap: balance;
}

.tagline {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  margin: 0 0 32px;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
  color: #1A1408;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(242, 204, 77, 0.25); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-block { width: 100%; }

/* --- Features ------------------------------------------------- */

.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 64px) clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.feature-card h3 {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* --- Signup ---------------------------------------------------- */

.signup {
  padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 64px);
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.signup-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(28px, 5vw, 40px);
}

.signup-card h2 {
  font-family: var(--font-display);
  color: var(--accent);
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.signup-sub {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 0.9rem;
}

#register-form { display: flex; flex-direction: column; gap: 6px; }

#register-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

#register-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
#register-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.username-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.username-row input { flex: 1; min-width: 0; }

.tag-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.tag-badge.assigned { color: var(--accent); border-color: var(--border); }

.btn-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-tag:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-tag:active:not(:disabled) { transform: rotate(90deg); }
.btn-tag:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-tag svg { pointer-events: none; }

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

#submit-btn { margin-top: 22px; }

.form-message {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 0.9rem;
  text-align: center;
}
.form-message.error   { color: var(--error); }
.form-message.success { color: var(--success); }

.signup-note {
  margin: 20px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Footer ------------------------------------------------------ */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px clamp(16px, 5vw, 64px);
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.api-status::before {
  content: "●";
  margin-right: 6px;
  color: var(--text-muted);
}
.api-status.online::before  { color: var(--success); }
.api-status.offline::before { color: var(--error); }

@media (max-width: 480px) {
  .site-footer { flex-direction: column; text-align: center; }
}
