:root {
  color-scheme: dark;
  --bg: #071117;
  --bg-soft: #0f1d25;
  --panel: rgba(11, 18, 24, 0.88);
  --panel-strong: rgba(14, 24, 31, 0.96);
  --border: rgba(164, 187, 196, 0.16);
  --text: #eef6f8;
  --muted: #9bb2bd;
  --accent: #c8f05a;
  --accent-strong: #efffb8;
  --danger: #ff8e8e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --font-sans: "Avenir Next", "Segoe UI Variable Text", "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Code", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top left, rgba(200, 240, 90, 0.22), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(125, 207, 224, 0.12), transparent 22%),
    linear-gradient(180deg, #081017 0%, #05090d 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 26px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent);
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px 14px calc(20px + env(safe-area-inset-bottom));
}

.hero,
.panel,
.project-card,
.list-card,
.login-card {
  backdrop-filter: blur(16px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(28px, 7vw, 48px);
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 20px;
}

.hero-copy,
.muted-text,
.list-meta,
.project-copy,
.message-text {
  color: var(--muted);
}

.hero-copy {
  margin-top: 10px;
  max-width: 680px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.session-badge {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.card-grid,
.stack-list {
  display: grid;
  gap: 10px;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-card,
.list-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.project-card {
  padding: 18px;
  color: inherit;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 240, 90, 0.32);
  background: rgba(200, 240, 90, 0.06);
}

.project-tag {
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--accent);
}

.project-copy {
  margin-top: 10px;
  line-height: 1.6;
}

.list-card {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.list-title {
  font-weight: 600;
}

.list-meta {
  margin-top: 6px;
  line-height: 1.6;
  font-size: 12px;
  font-family: var(--font-mono);
}

.stack-form {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 12px;
  color: var(--muted);
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
}

input:focus,
button:focus {
  outline: 2px solid rgba(200, 240, 90, 0.36);
  outline-offset: 2px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease;
}

.primary-button {
  padding: 12px 16px;
  color: #122002;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.ghost-button {
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.danger-button {
  color: var(--danger);
}

.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.login-dialog {
  width: min(440px, calc(100% - 24px));
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 0;
  background: transparent;
}

.login-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.login-card {
  padding: 26px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(12, 18, 23, 0.98), rgba(8, 11, 15, 0.98));
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
}

.message-text {
  margin: 4px 0 0;
  line-height: 1.6;
}

.error-text {
  color: var(--danger);
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    flex-direction: column;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .list-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-actions {
    width: 100%;
    justify-content: stretch;
  }

  .user-actions button {
    flex: 1 1 160px;
  }
}
