:root {
  --bg: #0b1020;
  --panel: #12192b;
  --panel-2: #182238;
  --text: #e8eefc;
  --muted: #9fb0d1;
  --line: #2a3650;
  --link: #8ab4ff;
  --accent: #58d68d;
  --brand: #7cc7ff;
  --brand-strong: #b48cff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,16,32,.95);
  position: sticky;
  top: 0;
}
.topbar a { color: var(--link); text-decoration: none; }
.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.brand {
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: 0.02em;
  margin-left: 0 !important;
  color: var(--brand) !important;
  text-shadow: 0 0 18px rgba(124, 199, 255, 0.22);
}
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.nav-button-primary {
  min-height: 52px;
  padding: 12px 24px;
  font-size: 1.08rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #08101d !important;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(124, 199, 255, 0.22);
}
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 40px; }
h1, h2, h3 { margin-top: 0; }
h1 {
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.page-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--brand);
  text-shadow: 0 0 18px rgba(124, 199, 255, 0.18);
}
a { color: var(--link); }
.hero { margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}
.stack-mobile { flex-wrap: wrap; }
.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
input, button, select, textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  font-size: 1rem;
}
input, select, textarea {
  background: var(--panel);
  color: var(--text);
  flex: 1 1 240px;
  width: 100%;
}
textarea {
  font-family: inherit;
}
button {
  background: var(--accent);
  color: #07120b;
  font-weight: 700;
  cursor: pointer;
}
.ghost-button {
  background: transparent;
  color: var(--link);
  border-color: var(--line);
}
.card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: var(--text);
}
.detail-card { margin-bottom: 16px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}
.code-block {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f1524;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow-x: auto;
}
.memory-form {
  display: grid;
  gap: 10px;
}
.actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
.secondary-link {
  color: var(--link);
  text-decoration: none;
}
.danger-button {
  background: #ef5350;
  color: white;
}
.inline-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
form { margin: 0; }
.inline-form { display: inline; }
.login-wrap {
  min-height: 60vh;
  display: grid;
  place-items: center;
}
.login-card {
  max-width: 420px;
  width: 100%;
}
.error-text {
  color: #ff8a80;
}
@media (max-width: 719px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .topnav {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (min-width: 720px) {
  .card-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
