:root {
  --bg: #0b0d12;
  --bg-gradient: radial-gradient(1200px 600px at 10% -10%, rgba(79, 140, 255, 0.10), transparent),
                 radial-gradient(1000px 500px at 100% 0%, rgba(88, 101, 242, 0.08), transparent);
  --panel: #151822;
  --panel-2: #1b1f2c;
  --border: #262b3a;
  --border-soft: #1e222f;
  --text: #eef0f4;
  --muted: #8b93a7;
  --accent: #5b8cff;
  --accent-2: #7c9cff;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-gradient), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2 { letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin: 0 0 8px; text-align: center; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(21, 24, 34, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px; padding: 14px 24px;
}
.topbar-brand { display: flex; align-items: center; gap: 8px; }
.topbar-brand a {
  color: var(--text); font-weight: 700; text-decoration: none; font-size: 1.05rem;
  display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em;
}
.brand-mark {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 3px 7px; border-radius: 6px; letter-spacing: 0.02em;
}
.version-tag {
  color: var(--muted); font-size: 0.72rem; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 8px;
}
.topbar-nav { flex: 1; }
.topbar-logout { display: flex; align-items: center; gap: 12px; }
.topbar-user { color: var(--muted); font-size: 0.88rem; }

.content { max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; }
.page-intro { text-align: center; max-width: 640px; margin: 0 auto 32px; color: var(--muted); }

.login-wrap { display: flex; justify-content: center; align-items: center; min-height: 90vh; }
.login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 36px 32px; width: 340px;
  display: flex; flex-direction: column; gap: 16px; text-align: center;
}
.login-card h1 { margin: 0; font-size: 1.4rem; }

.discord-login-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 6px; padding: 11px 14px; color: #fff; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 0.95rem; font-weight: 600; background: #5865F2;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.discord-login-btn:hover { filter: brightness(1.1); }
.discord-login-btn:active { transform: scale(0.98); }

button, .button {
  cursor: pointer; background: var(--accent); border: 1px solid var(--accent); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; border-radius: var(--radius-sm);
  padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center;
  transition: filter 0.15s ease, transform 0.1s ease;
}
button:hover, .button:hover { filter: brightness(1.12); }
button:active, .button:active { transform: scale(0.98); }
.button-secondary { background: var(--panel-2); border-color: var(--border); color: var(--text); font-weight: 500; }

.error { color: var(--red); font-size: 0.9rem; text-align: center; }
.hint { color: var(--muted); font-size: 0.85rem; }

.badge {
  padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  border: 1px solid var(--border); display: inline-block;
}
.badge-ok { color: var(--green); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.badge-error { color: var(--red); border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.badge-muted { color: var(--muted); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.project-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; color: #fff;
}
.project-name { font-size: 1.1rem; font-weight: 600; }
.project-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.project-url { color: var(--accent-2); font-size: 0.82rem; margin-top: auto; }
