:root {
  --bg: #070b14;
  --card: #111827;
  --card2: #1a2332;
  --border: #2a3548;
  --accent: #6366f1;
  --accent2: #22d3ee;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --danger: #ef4444;
  --success: #22c55e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(ellipse at top, #141e38 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.login-card {
  max-width: 440px;
  margin: 60px auto 0;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
}

.brand { margin-bottom: 24px; }
.brand-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 12px var(--accent2);
  margin-bottom: 10px;
}
.brand h1 {
  font-size: 1.6rem;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}
.brand p { color: var(--muted); font-size: 14px; }

label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  font-size: 15px;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.25);
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: white;
  width: 100%;
}

.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { opacity: .55; cursor: not-allowed; }

.btn.secondary {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
}

.download-btn { width: 100%; margin-top: 12px; }

.mega { margin-top: 14px; }
.mega-btn { display: inline-block; text-align: center; text-decoration: none; width: 100%; margin-top: 8px; color: var(--text); }

.hint, .muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
}

.build-info {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
}

.build-info .label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.build-info .version {
  color: var(--accent2);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  word-break: break-all;
}

.build-info .updated {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.build-info .rdd-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  text-align: center;
  text-decoration: none;
}

.build-info .rdd-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
}

.guide a,
.notes a {
  color: var(--accent2);
  text-decoration: none;
}

.guide a:hover,
.notes a:hover {
  text-decoration: underline;
}

.msg.error { color: var(--danger); font-size: 14px; margin: 10px 0; }
.msg.success { color: var(--success); font-size: 14px; margin: 10px 0; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-header h1 { font-size: 1.5rem; color: var(--accent2); margin-bottom: 4px; }
.dash-header p { color: var(--muted); font-size: 14px; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
}

.card h2 {
  font-size: 1rem;
  color: var(--accent2);
  margin-bottom: 14px;
}

.license-box {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.unused { background: rgba(99,102,241,.2); color: var(--accent2); }
.badge.active { background: rgba(34,197,94,.2); color: var(--success); }

.guide { margin-top: 0; }

.tutorial {
  margin-bottom: 16px;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent2);
  font-size: 13px;
  text-decoration: none;
}

.video-link:hover {
  text-decoration: underline;
}

.steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps li {
  counter-increment: step;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 14px 52px;
  position: relative;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps li strong { display: block; margin-bottom: 4px; }
.steps li span { color: var(--muted); font-size: 13px; line-height: 1.5; }

code {
  background: #0b1220;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent2);
}

.notes {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.notes h3 { font-size: 14px; margin-bottom: 8px; color: var(--text); }
.notes ul { padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 28px;
}

.footer a {
  color: var(--accent2);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: none;
  z-index: 99;
  font-weight: 600;
}
#toast.show { display: block; }
#toast.ok { border-color: var(--success); color: var(--success); }
#toast.err { border-color: var(--danger); color: var(--danger); }
