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

:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel2: #1e222b;
  --text: #e7e9ee;
  --muted: #9aa1ad;
  --accent: #3a7d3a;
  --border: #2a2f3a;
}

html, body { height: 100%; }

body {
  background: radial-gradient(1200px 600px at 50% -100px, #1b2030 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 700; font-size: 20px; letter-spacing: 0.3px; }

.lang { display: flex; gap: 6px; }

.lang-btn {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
}
.lang-btn.active { color: #fff; border-color: var(--accent); background: var(--panel2); }

.layout {
  display: flex;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  align-items: flex-start;
}

.side-rail {
  flex: 0 0 180px;
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-ad {
  min-height: 250px;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.wrap {
  flex: 1 1 auto;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero { text-align: center; padding: 8px 0 4px; }
.hero h1 { font-size: 28px; margin-bottom: 8px; }
.subtitle { color: var(--muted); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}
.card h2 { font-size: 18px; margin-bottom: 14px; }

.steps { padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }

.progress {
  height: 12px;
  background: var(--panel2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #4fae4f);
  transition: width 0.3s ease;
}
.progress-label { color: var(--muted); font-size: 14px; margin: 8px 0 14px; }

.btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }

.code-box {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 26px;
  letter-spacing: 2px;
  text-align: center;
  background: var(--panel2);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 14px;
  word-break: break-all;
}
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; text-align: center; }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .side-rail { display: none; }
  .layout { padding: 20px 14px 50px; }
}
