:root {
  --bg: #0d0f14;
  --surface: #161a22;
  --surface-hover: #1d232e;
  --border: #2a3140;
  --text: #e8ecf3;
  --muted: #8b94a7;
  --accent: #7dd3fc;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-hover: #f0f3f8;
    --border: #e2e6ee;
    --text: #171b23;
    --muted: #67708299;
    --accent: #0284c7;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hero {
  padding: 4.5rem 1.5rem 2.5rem;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tilde { color: var(--accent); }
.dim { color: var(--muted); font-weight: 500; }

.tagline {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

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

.card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.card .icon {
  font-size: 1.6rem;
  line-height: 1;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 10px;
}

.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}

.card .badge {
  margin-top: 0.45rem;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 0;
}

footer {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* account widget (top right) */
.account {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.account a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.account button {
  font: inherit;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}

.account button:hover { border-color: var(--accent); color: var(--text); }

/* login page */
.home-link { color: inherit; text-decoration: none; }

.auth-box {
  max-width: 360px;
  margin: 0 auto;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.auth-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.auth-box input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.8rem;
}

.auth-box input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.auth-box button {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 0.6rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--bg);
}

.auth-box .oauth-btn {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.auth-msg {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
