:root {
  --bg: #0f1420;
  --panel: #171e2e;
  --panel-2: #1f2838;
  --accent: #ff5a5f;
  --accent-2: #33d17a;
  --text: #eef1f7;
  --text-dim: #9aa4b8;
  --border: #2a3346;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans TC", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.demo-banner {
  background: #4a2b0a;
  color: #ffcf8b;
  text-align: center;
  padding: 6px 12px;
  font-size: 13px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.topnav nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topnav nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}

.topnav nav a:hover { color: var(--text); }

.cta-link {
  background: var(--accent);
  color: white !important;
  padding: 6px 14px;
  border-radius: 6px;
}

.admin-link {
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
}

.who { color: var(--text); font-size: 14px; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 20px 60px; }

.hero {
  background: linear-gradient(135deg, #1f2838, #10141f);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 32px;
  margin-bottom: 32px;
}

.hero h1 { font-size: 30px; margin: 0 0 10px; }
.hero p { color: var(--text-dim); margin: 0; }

.category-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.category-bar a {
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}

.category-bar a.active,
.category-bar a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.section-title {
  font-size: 18px;
  margin: 30px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform .15s ease;
}

.card:hover { transform: translateY(-3px); }

.card-thumb {
  height: 130px;
  background: linear-gradient(135deg, #2a3346, #171e2e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
}

.badge-live {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-upcoming {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.card-body { padding: 12px 14px; }
.card-body h3 { font-size: 14px; margin: 0 0 6px; }
.card-meta { font-size: 12px; color: var(--text-dim); display: flex; justify-content: space-between; }

.player {
  background: #000;
  border-radius: 12px;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 15px;
  border: 1px solid var(--border);
  flex-direction: column;
  gap: 8px;
}

.live-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .live-layout { grid-template-columns: 1fr; }
}

.side-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.host-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #06301a;
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.product-item:first-of-type { border-top: none; }

.buy-btn {
  background: var(--accent-2);
  color: #06301a;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: not-allowed;
  opacity: .8;
}

.form-card {
  max-width: 420px;
  margin: 20px auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.form-card h2 { margin-top: 0; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }

.form-row input, .form-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
}

.phone-row { display: flex; gap: 8px; }
.phone-row select { flex: 0 0 90px; }

.submit-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.form-error {
  background: #3a1a1a;
  color: #ffb3b3;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.form-success {
  background: #16331f;
  color: #9de8b0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

.form-note { font-size: 12px; color: var(--text-dim); margin-top: 14px; text-align: center; }
.form-note a { color: var(--accent); }

table.member-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

table.member-table th, table.member-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

table.member-table th {
  background: var(--panel-2);
  color: var(--text-dim);
  font-weight: 600;
}

.stat-row {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.stat-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.stat-box .num { font-size: 24px; font-weight: 700; }
.stat-box .label { font-size: 12px; color: var(--text-dim); }

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  padding: 20px;
  border-top: 1px solid var(--border);
}
