:root {
  --bg: #050505;
  --panel: rgba(255,255,255,.055);
  --panel-2: rgba(255,255,255,.085);
  --text: #f8fafc;
  --muted: #a1a1aa;
  --line: rgba(255,255,255,.12);
  --soft: rgba(255,255,255,.18);
  --danger: #f87171;
  --green: #4ade80;
  --yellow: #facc15;
  --purple: #7c3aed;
  --blue: #60a5fa;
  --card-radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { background:
  radial-gradient(circle at 20% 0%, rgba(124,58,237,.22), transparent 32rem),
  radial-gradient(circle at 85% 15%, rgba(96,165,250,.13), transparent 30rem),
  #050505;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

.navbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(20px); background: rgba(5,5,5,.78); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display:flex; align-items:center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.logo { width: 34px; height: 34px; border-radius: 12px; display:grid; place-items:center; background: linear-gradient(135deg, #7c3aed, #60a5fa); box-shadow: 0 14px 32px rgba(124,58,237,.35); }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.nav-link { color: var(--muted); font-size: 14px; padding: 8px 10px; border-radius: 999px; transition: .18s ease; }
.nav-link:hover, .nav-link.active { color: white; background: var(--panel-2); }
.user-pill { display:flex; align-items:center; gap: 8px; border: 1px solid var(--line); background: var(--panel); padding: 6px 10px; border-radius: 999px; color: white; font-size: 14px; }
.avatar { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; background: linear-gradient(135deg, #9333ea, #3b82f6); display:grid; place-items:center; font-weight:700; }
.avatar.large { width: 80px; height: 80px; font-size: 30px; }
.logout { background: transparent; border: 1px solid var(--line); color: white; border-radius: 999px; padding: 8px 12px; }
.logout:hover { background: white; color: black; }

.page { max-width: 1180px; margin: 0 auto; padding: 36px 20px 60px; }
.page.narrow { max-width: 720px; }
.hero { margin-bottom: 26px; display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.title { font-size: clamp(34px, 4vw, 54px); margin: 0; letter-spacing: -.04em; line-height: 1; }
.subtitle { color: var(--muted); margin: 12px 0 0; max-width: 660px; line-height: 1.6; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 26px; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.grid { display:grid; gap: 22px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.form { display:grid; gap: 18px; }
.form-row { display:grid; gap: 8px; }
label { font-weight: 650; }
.input, .select, .textarea { width:100%; color:white; background: rgba(0,0,0,.48); border: 1px solid var(--soft); border-radius: 14px; padding: 14px 16px; outline: none; }
.textarea { min-height: 130px; resize: vertical; }
.select option { background: white; color: black; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(255,255,255,.55); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.form-split { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.actions { display:flex; gap: 12px; align-items:center; flex-wrap: wrap; }
.btn { border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800; color: black; background: white; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(.96); }
.btn.secondary { color:white; background: transparent; border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--panel-2); }
.btn.danger { color:white; background: rgba(239,68,68,.15); border: 1px solid rgba(248,113,113,.45); }
.btn.blue { color:white; background: rgba(59,130,246,.18); border: 1px solid rgba(96,165,250,.45); }
.btn.green { color:white; background: rgba(34,197,94,.18); border: 1px solid rgba(74,222,128,.45); }
.btn:disabled { opacity: .55; cursor:not-allowed; transform: none; }
.message { margin: 14px 0 0; color: #fca5a5; }
.success { color: #86efac; }
.muted { color: var(--muted); }

.auth-card { max-width: 480px; margin: 8vh auto; }
.auth-title { font-size: 34px; margin: 0 0 20px; }

.controls { display:grid; grid-template-columns: minmax(220px, 1fr) 210px 180px; gap: 14px; margin: 28px 0 30px; }
.activity-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 20px; transition: .18s ease; cursor: pointer; min-height: 100%; }
.card:hover { background: rgba(255,255,255,.085); transform: translateY(-2px); }
.cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; margin-bottom: 16px; background: #111; }
.cover.detail { border-radius: 26px; margin-bottom: 24px; }
.card-head { display:flex; justify-content:space-between; align-items:flex-start; gap: 12px; margin-bottom: 10px; }
.card-title { font-size: 23px; margin: 0; line-height: 1.15; letter-spacing: -.02em; }
.badge { display:inline-flex; align-items:center; justify-content:center; min-height: 30px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.22); font-size: 13px; font-weight: 750; white-space: nowrap; }
.badge.green { border-color: rgba(74,222,128,.45); color: var(--green); }
.badge.yellow { border-color: rgba(250,204,21,.45); color: var(--yellow); }
.badge.red { border-color: rgba(248,113,113,.45); color: var(--danger); }
.meta { display:grid; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.meta strong { color:white; }
.card-actions { margin-top: 18px; display:flex; gap: 10px; flex-wrap:wrap; }
.detail-layout { display:grid; grid-template-columns: minmax(0, 1.4fr) 320px; gap: 26px; align-items:start; }
.sidebox { position: sticky; top: 92px; }

.cover-picker-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.cover-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.cover-option { border: 1px solid var(--line); background: transparent; color:white; padding:0; border-radius: 16px; overflow:hidden; text-align:left; }
.cover-option.selected { border-color: white; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.cover-option img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.cover-option span { display:block; padding: 8px 10px; font-size: 13px; }
.selected-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); margin-top: 10px; }
.avatar-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.avatar-option { padding: 8px; border-radius: 999px; border:1px solid var(--line); background: transparent; }
.avatar-option.selected { border-color: white; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.avatar-option img { width: 52px; height: 52px; border-radius: 999px; object-fit: cover; margin:auto; }

.empty { border: 1px dashed var(--line); border-radius: 20px; padding: 24px; color: var(--muted); text-align:center; }
.footer-note { margin-top: 24px; color: var(--muted); font-size: 13px; line-height:1.5; }

@media (max-width: 900px) {
  .grid.two, .activity-grid, .detail-layout, .controls { grid-template-columns: 1fr; }
  .sidebox { position: static; }
  .nav-inner { align-items:flex-start; flex-direction: column; }
  .nav-links { justify-content:flex-start; }
  .form-split { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .page { padding: 26px 14px 42px; }
  .panel, .card { padding: 16px; border-radius: 18px; }
  .cover-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title { font-size: 34px; }
}
