:root {
  --bg-color: #090b10;
  --card-bg: rgba(19, 23, 34, 0.88);
  --border-color: rgba(139, 92, 246, 0.28);
  --neon-purple: #8b5cf6;
  --neon-blue: #3b82f6;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.12), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 20px 64px;
  flex: 1;
}

.hidden {
  display: none !important;
}

/* HERO CARD */
.hero-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-bottom: 44px;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eab308;
}

.dot.synced {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.dot.fallback {
  background: #3b82f6;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 30%, #a78bfa 70%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.subtitle a,
.inline-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.subtitle a:hover,
.inline-link:hover {
  text-decoration: underline;
}

/* Ô NHẬP USERNAME MỞ KHÓA */
.gate-box {
  max-width: 560px;
  margin: 0 auto;
  background: #0d111a;
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 14px;
  padding: 20px;
}

.gate-label {
  display: block;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.gate-label strong {
  color: #c4b5fd;
}

.gate-form {
  display: flex;
  gap: 10px;
}

.gate-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 11px 14px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.gate-form input:focus {
  border-color: var(--neon-purple);
}

.gate-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 1.2em;
}

/* KHUNG LỆNH CHỌN TAB WINDOWS / MACOS SAU KHI MỞ KHÓA */
.center-link-wrapper {
  margin: 0 auto;
  max-width: 740px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.terminal-card {
  background: #0b0e14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.os-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.os-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.os-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}

.os-tab.active {
  color: #ffffff;
}

.os-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
}

.terminal-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px;
  text-align: left;
}

.prompt-symbol {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #a78bfa;
  user-select: none;
  flex-shrink: 0;
}

.terminal-body code {
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #f1f5f9;
  word-break: break-word;
}

.copy-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.copy-icon-btn:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
  color: #ffffff;
}

.copy-icon-btn.copied {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

.unlocked-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #4ade80;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline {
  display: inline-block;
  color: var(--text-main);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--neon-purple);
  background: rgba(139, 92, 246, 0.12);
}

/* CÁC BƯỚC HƯỚNG DẪN */
.steps-section h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--neon-purple);
}

.step-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.step-number {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 8px;
}

.step-card > p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.step-card code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 5px;
  color: #c4b5fd;
}

/* LƯỚI 4 Ô CHỪA SẴN ẢNH */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.screenshot-slot {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.screenshot-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-box {
  min-height: 140px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  border: 2px dashed rgba(139, 92, 246, 0.4);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  gap: 6px;
}

.placeholder-box strong {
  color: #c4b5fd;
  font-family: monospace;
}

@media (max-width: 600px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

/* MỤC RECOMMEND EXTENSIONS Ở BƯỚC 5 */
.recommend-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.recommend-box h4 {
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 14px;
}

.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.ext-item {
  background: #0d111a;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 12px;
  padding: 14px;
  transition: border-color 0.2s, transform 0.2s;
}

.ext-item:hover {
  border-color: var(--neon-blue);
  transform: translateY(-2px);
}

.ext-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #c4b5fd;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.ext-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  white-space: nowrap;
}

.ext-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* TRANG QUẢN LÝ /xem_nhung_ai */
.admin-card {
  text-align: left;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}

.stat-pill {
  background: #0d111a;
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.stat-pill strong {
  color: #a78bfa;
  font-size: 1.1rem;
  margin-left: 6px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d111a;
}

.visitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.visitor-table th,
.visitor-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.visitor-table th {
  background: rgba(139, 92, 246, 0.14);
  color: #c4b5fd;
  font-weight: 600;
}

.visitor-table tr:last-child td {
  border-bottom: none;
}

.visitor-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.empty-row {
  text-align: center !important;
  color: var(--text-muted);
  padding: 28px !important;
}

/* THANH NGANG FOOTER KHÁC MÀU */
.dev-footer {
  width: 100%;
  background: linear-gradient(90deg, #17122b 0%, #1e1b4b 50%, #111c33 100%);
  border-top: 1px solid rgba(139, 92, 246, 0.4);
  text-align: center;
  padding: 16px 20px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #c4b5fd;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .gate-form {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary {
    width: 100%;
  }
}
/* Ô THÔNG BÁO AN TOÀN CỠ LỚN TRƯỚC BƯỚC 1 */
.safety-notice {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(59, 130, 246, 0.12));
  border: 2px solid rgba(52, 211, 153, 0.55);
  border-radius: 18px;
  padding: 28px 26px;
  margin-bottom: 28px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.12);
}

.safety-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.safety-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.safety-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #6ee7b7;
}

.safety-text {
  font-size: 1.05rem;
  color: #f1f5f9;
  line-height: 1.7;
  margin-bottom: 14px;
}

.safety-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-points li {
  font-size: 1rem;
  color: #cbd5e1;
  padding-left: 24px;
  position: relative;
}

.safety-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34d399;
  font-weight: 700;
}

.safety-points strong {
  color: #ffffff;
}
/* NÚT TẢI NỔI INLINE "TẠI ĐÂY" */
.btn-download-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 4px 14px;
  margin: 0 4px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
  vertical-align: middle;
}

.btn-download-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.75);
  opacity: 0.96;
}
/* THU GỌN KHOẢNG CÁCH HERO KHI ĐÃ DỜI KHUNG NHẬP TÊN XUỐNG DƯỚI */
.hero-compact .subtitle {
  margin-bottom: 0;
}

/* KHUNG NHẬP TÊN & LẤY LỆNH GIỮA BƯỚC 4 VÀ BƯỚC 5 */
.unlock-card {
  background: var(--card-bg);
  border: 2px solid rgba(139, 92, 246, 0.55);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.18);
}

.unlock-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 18px;
}

/* Ô THÔNG BÁO CHỮ TO ĐÙNG Ở CUỐI TRANG */
.marketplace-notice {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(239, 68, 68, 0.14));
  border: 2px solid rgba(251, 191, 36, 0.7);
  border-radius: 20px;
  padding: 34px 28px;
  margin-top: 32px;
  text-align: center;
  box-shadow: 0 16px 42px rgba(245, 158, 11, 0.18);
}

.marketplace-notice-badge {
  display: inline-block;
  background: rgba(251, 191, 36, 0.2);
  color: #fde68a;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.marketplace-notice-text {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.5;
  color: #ffffff;
}

.marketplace-notice-text strong {
  color: #fcd34d;
}

@media (max-width: 600px) {
  .marketplace-notice-text {
    font-size: 1.25rem;
  }
}