:root {
  color-scheme: dark;
  --bg: #08100f;
  --panel: rgba(14, 24, 23, 0.76);
  --panel-strong: rgba(22, 38, 35, 0.94);
  --line: rgba(145, 242, 216, 0.28);
  --text: #edf9f3;
  --muted: #9db9ad;
  --mint: #75ffd7;
  --amber: #ffc857;
  --coral: #ff6f61;
  --ink: #06110f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 111, 97, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(117, 255, 215, 0.16), transparent 26rem),
    linear-gradient(135deg, #08100f 0%, #15201b 46%, #050908 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100vw;
  height: 100vh;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 6px;
  mix-blend-mode: overlay;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mint), var(--amber));
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%);
}

.nav-links {
  display: flex;
  gap: 12px;
}

.nav-links a {
  border: 1px solid var(--line);
  padding: 10px 14px;
  background: rgba(10, 22, 19, 0.58);
}

.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: 48px;
  align-items: center;
  padding: 40px 0 80px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--mint);
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(3.2rem, 9vw, 7.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1;
}

.hero-text,
.section-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.9;
}

.hero-actions,
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
button {
  min-height: 44px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  color: var(--text);
  background: rgba(16, 30, 28, 0.84);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.primary-action,
button[type="submit"] {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--mint), var(--amber));
  font-weight: 700;
}

.primary-action:hover,
.secondary-action:hover,
button:hover {
  transform: translateY(-2px);
  border-color: rgba(117, 255, 215, 0.8);
}

.ship-panel {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.orbit-ring {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: spin 12s linear infinite;
}

.ring-one {
  width: 430px;
  height: 430px;
  box-shadow: inset 0 0 40px rgba(117, 255, 215, 0.14);
}

.ring-two {
  width: 300px;
  height: 300px;
  border-color: rgba(255, 200, 87, 0.34);
  animation-direction: reverse;
}

.core-ship {
  position: relative;
  width: 170px;
  height: 220px;
  filter: drop-shadow(0 0 30px rgba(117, 255, 215, 0.36));
  animation: float 3.8s ease-in-out infinite;
}

.ship-body {
  position: absolute;
  inset: 12px 48px 28px;
  background: linear-gradient(180deg, #f8fff7, #75ffd7 45%, #1f4037);
  clip-path: polygon(50% 0, 86% 76%, 50% 100%, 14% 76%);
}

.ship-wing {
  position: absolute;
  top: 86px;
  width: 70px;
  height: 102px;
  background: linear-gradient(180deg, var(--coral), #4d1714);
  opacity: 0.9;
}

.ship-wing.left {
  left: 0;
  clip-path: polygon(100% 0, 100% 100%, 0 72%);
}

.ship-wing.right {
  right: 0;
  clip-path: polygon(0 0, 100% 72%, 0 100%);
}

.ship-flame {
  position: absolute;
  left: 65px;
  bottom: 0;
  width: 40px;
  height: 64px;
  background: linear-gradient(180deg, var(--amber), transparent);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  animation: flame 240ms ease-in-out infinite alternate;
}

.hud-card {
  position: absolute;
  min-width: 132px;
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(8, 16, 15, 0.72);
  box-shadow: var(--shadow);
}

.hud-card span {
  display: block;
  color: var(--muted);
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
}

.hud-card strong {
  display: block;
  margin-top: 8px;
  color: var(--mint);
  font-family: "Orbitron", sans-serif;
  font-size: 1.9rem;
}

.hud-one {
  top: 78px;
  right: 20px;
}

.hud-two {
  bottom: 84px;
  left: 22px;
}

.command-section {
  padding: 72px 0;
}

.briefing-layout,
.notes-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.control-panel,
.note-editor,
.note-list-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.control-panel,
.note-editor {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(145, 242, 216, 0.22);
  color: var(--text);
  background: rgba(5, 12, 11, 0.78);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
}

.status-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.news-card,
.note-card {
  border: 1px solid rgba(145, 242, 216, 0.22);
  background: var(--panel-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.news-card {
  min-height: 250px;
  padding: 18px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--amber);
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
}

.news-card h3,
.note-card h3 {
  margin: 16px 0 10px;
  font-size: 1.22rem;
  line-height: 1.35;
}

.news-card p,
.note-card p {
  color: var(--muted);
  line-height: 1.76;
}

.news-card a {
  display: inline-block;
  margin-top: 14px;
  color: var(--mint);
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
}

.preview-wrap {
  display: grid;
  gap: 10px;
}

.preview-wrap img,
.note-card img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.note-list-panel {
  padding: 16px;
}

.note-search {
  margin-bottom: 16px;
}

.note-list {
  display: grid;
  gap: 14px;
}

.note-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 14px;
}

.note-card > div {
  min-width: 0;
}

.note-card time {
  color: var(--amber);
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
}

.note-card p {
  max-height: 8.8em;
  overflow: hidden;
  white-space: pre-wrap;
}

.note-actions {
  display: flex;
  gap: 10px;
}

.note-actions button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.86rem;
}

.empty-state {
  border: 1px dashed rgba(145, 242, 216, 0.36);
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 48px;
  color: var(--muted);
  font-family: "Orbitron", sans-serif;
  font-size: 0.78rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}

@keyframes flame {
  to {
    height: 78px;
    opacity: 0.58;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 28px, 760px);
  }

  .hero-grid,
  .briefing-layout,
  .notes-layout {
    grid-template-columns: 1fr;
  }

  .ship-panel {
    min-height: 430px;
  }

  .control-panel,
  .note-editor {
    position: static;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  .note-card {
    grid-template-columns: 1fr;
  }

  .ring-one {
    width: 330px;
    height: 330px;
  }

  .ring-two {
    width: 230px;
    height: 230px;
  }
}
