:root {
  --bg: #07111f;
  --panel: rgba(10, 20, 38, 0.82);
  --panel-2: rgba(18, 31, 56, 0.88);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef4ff;
  --muted: #94a7c6;
  --primary: #4ea1ff;
  --primary-2: #7b6dff;
  --success: #27d79a;
  --warning: #ffb84d;
  --danger: #ff6f7d;
  --info: #57c7ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(78,161,255,0.15), transparent 30%),
    radial-gradient(circle at right, rgba(123,109,255,0.12), transparent 26%),
    linear-gradient(180deg, #07111f 0%, #081320 100%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 8px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 30px rgba(78,161,255,0.28);
}
.brand-title { font-weight: 700; font-size: 18px; }
.brand-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.main-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 16px 0 36px;
}
.span-2 { grid-column: span 2; }

.card, .card-subtle {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.card { padding: 22px; }
.card-subtle {
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  padding: 28px;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.12;
  margin: 12px 0 14px;
}
.hero p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 18px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.hero-stats div, .stat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 14px;
}
.hero-stats strong, .stat-box strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}
.hero-stats span, .stat-box span {
  color: var(--muted);
  font-size: 13px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #dce9ff;
}
.badge-success { color: #d2ffef; background: rgba(39,215,154,0.12); border-color: rgba(39,215,154,0.25); }
.badge-warning { color: #ffe5ba; background: rgba(255,184,77,0.12); border-color: rgba(255,184,77,0.25); }
.badge-info { color: #ddf5ff; background: rgba(87,199,255,0.12); border-color: rgba(87,199,255,0.25); }

.info-list {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #dce9ff;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-title-row h2 {
  margin: 0;
  font-size: 22px;
}

.profile-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.profile-items.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.invite-box,
.claim-box {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.inline-copy {
  display: flex;
  gap: 10px;
}

input, textarea, select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #88a0c4; }

.btn {
  border: 0;
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 30px rgba(78,161,255,0.24);
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn-danger {
  background: linear-gradient(135deg, #ff6f7d, #ff8556);
}
.full { width: 100%; }

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.task-card {
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  border-radius: 20px;
  padding: 18px;
}
.task-card h3 { margin: 0 0 10px; }
.task-card p {
  margin: 0 0 14px;
  color: var(--muted);
  min-height: 44px;
}
.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.task-proof {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tabs {
  display: flex;
  gap: 8px;
}
.tab {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.tab.active { background: rgba(78,161,255,0.15); border-color: rgba(78,161,255,0.32); }
.board-panel { display: none; }
.board-panel.active { display: block; }
.board-table {
  width: 100%;
  border-collapse: collapse;
}
.board-table th,
.board-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
  font-size: 14px;
}
.board-table th { color: #d8e6ff; }
.board-table td { color: var(--muted); }

.list-box {
  display: grid;
  gap: 10px;
}
.list-box.empty {
  color: var(--muted);
}
.list-item {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 14px;
}
.list-item-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.list-item small {
  color: var(--muted);
  display: block;
  margin-top: 8px;
  line-height: 1.6;
}

.check-list {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}
.checkin-status, .hint {
  color: var(--muted);
  margin-top: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 30px;
  color: var(--muted);
  font-size: 14px;
}
.footer a { color: #cfe5ff; }

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 18, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 0.18s ease;
  max-width: 340px;
}
#toast.show {
  opacity: 1;
  transform: translateY(0);
}

.bg-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.16;
  z-index: -1;
}
.bg-glow-1 {
  width: 260px;
  height: 260px;
  background: #4ea1ff;
  top: 40px;
  left: 10px;
}
.bg-glow-2 {
  width: 260px;
  height: 260px;
  background: #7b6dff;
  right: 0;
  top: 180px;
}

@media (max-width: 980px) {
  .main-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hero { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 20px, 100%); }
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero h1 { font-size: 30px; }
  .hero-stats,
  .task-grid,
  .profile-items,
  .profile-items.mini { grid-template-columns: 1fr; }
  .hero-cta,
  .inline-copy,
  .footer,
  .list-item-row { flex-direction: column; align-items: stretch; }
}
