﻿:root {
  --bg: #091224;
  --bg-soft: rgba(13, 31, 62, 0.84);
  --surface: rgba(10, 22, 45, 0.82);
  --surface-strong: rgba(12, 27, 56, 0.95);
  --text: #f3f7ff;
  --muted: #b4c5dd;
  --line: rgba(168, 216, 255, 0.42);
  --navy: #1a2b4c;
  --red: #c41e3a;
  --gold: #ffd700;
  --ice: #a8d8ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --glow: 0 0 24px rgba(168, 216, 255, 0.35);
}

body.light {
  --bg: #eef3f8;
  --bg-soft: rgba(255, 255, 255, 0.88);
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.97);
  --text: #172338;
  --muted: #5c6d82;
  --line: rgba(26, 43, 76, 0.18);
  --shadow: 0 24px 60px rgba(34, 52, 84, 0.14);
  --glow: 0 0 20px rgba(26, 43, 76, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(168, 216, 255, 0.18), transparent 34%),
    radial-gradient(circle at right center, rgba(196, 30, 58, 0.16), transparent 26%),
    linear-gradient(135deg, var(--bg), #12294c 45%, #07111f 100%);
  color: var(--text);
  transition: background 0.35s ease, color 0.35s ease;
}

body.light {
  background:
    radial-gradient(circle at top left, rgba(168, 216, 255, 0.55), transparent 38%),
    radial-gradient(circle at right center, rgba(255, 215, 0, 0.16), transparent 24%),
    linear-gradient(135deg, #f7fbff, #e7eef6 48%, #eef3f8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 48%, transparent 100%),
    repeating-linear-gradient(180deg, transparent, transparent 28px, rgba(255, 255, 255, 0.03) 29px);
  opacity: 0.45;
}

button,
input,
textarea {
  font: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  overflow-x: hidden;
}

.landing,
.timeline-page {
  min-height: 100vh;
  padding: 24px;
}

.landing {
  display: grid;
  place-items: center;
}

.landing__content {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ice);
  font-size: 0.78rem;
}

.landing h1,
.topbar h2,
.section-heading h3,
.hero-panel h3 {
  margin: 0;
  line-height: 1.1;
  font-weight: 800;
}

.landing h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
}

.landing__desc,
.hero-panel p,
.section-heading p,
.modal__desc {
  color: var(--muted);
  line-height: 1.75;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.timeline-node__button,
.medkit {
  border: 0;
  cursor: pointer;
}

.primary-btn,
.ghost-btn {
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--red), #e54463);
  color: #fff;
  box-shadow: 0 14px 30px rgba(196, 30, 58, 0.3);
}

.ghost-btn,
.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.icon-btn:hover,
.timeline-node__button:hover,
.medkit:hover {
  transform: translateY(-2px);
}

.medkit {
  position: relative;
  width: min(420px, 82vw);
  aspect-ratio: 1 / 0.86;
  background: transparent;
}

.medkit__lid,
.medkit__body {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.medkit__lid {
  inset: 0 8% auto 8%;
  height: 34%;
  background: linear-gradient(180deg, #dd3753, #a9122d);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  transform-origin: bottom center;
  animation: lidFloat 2.8s ease-in-out infinite;
}

.medkit__body {
  inset: 23% 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 30%),
    linear-gradient(160deg, #d22744, #881529 72%);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medkit__cross {
  position: absolute;
  inset: 32px auto auto 50%;
  width: 64px;
  height: 64px;
  transform: translateX(-50%);
}

.medkit__cross::before,
.medkit__cross::after {
  content: "";
  position: absolute;
  background: #fff7f7;
  border-radius: 10px;
}

.medkit__cross::before {
  width: 22px;
  height: 64px;
  left: 21px;
}

.medkit__cross::after {
  width: 64px;
  height: 22px;
  top: 21px;
}

.medkit__items {
  margin-top: 82px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.medkit__items span {
  padding: 0.75rem 0.8rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(10px);
}

.topbar,
.hero-panel,
.message-wall,
.modal__card {
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 8px 0 12px;
}

.topbar__actions {
  display: flex;
  gap: 12px;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.1rem;
}

.hero-panel,
.message-wall {
  margin-top: 24px;
  padding: 24px;
  border-radius: 28px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.hero-panel__label {
  margin: 0 0 12px;
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero-panel__quote {
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 215, 0, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.hero-panel__quote span {
  color: var(--gold);
  font-size: 0.9rem;
}

.timeline-section {
  margin-top: 26px;
}

.timeline-hint {
  padding: 0 6px 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: thin;
  border-radius: 28px;
  padding: 28px 0 24px;
}

.timeline-wrapper:active {
  cursor: grabbing;
}

.timeline-track {
  position: relative;
  min-width: 2200px;
  height: 520px;
  padding: 40px 80px 60px;
}

.timeline-track::before {
  content: "";
  position: absolute;
  left: 60px;
  right: 60px;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background:
    linear-gradient(90deg, rgba(168, 216, 255, 0.2), rgba(168, 216, 255, 0.85), rgba(255, 215, 0, 0.4));
  border-radius: 999px;
  box-shadow: var(--glow);
}

.timeline-node {
  position: absolute;
  width: 250px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
}

.timeline-node[data-side="top"] {
  top: 20px;
}

.timeline-node[data-side="bottom"] {
  bottom: 18px;
}

.timeline-node[data-side="top"] .timeline-node__content {
  margin-bottom: 22px;
}

.timeline-node[data-side="bottom"] .timeline-node__content {
  margin-top: 22px;
}

.timeline-node[data-side="top"] .timeline-node__button {
  margin-top: 18px;
}

.timeline-node[data-side="bottom"] .timeline-node__button {
  order: -1;
}

.timeline-node__button {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin-inline: auto;
  display: grid;
  place-items: center;
  background: transparent;
}

.timeline-node__core {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.75rem;
  box-shadow: var(--shadow), var(--glow);
  transition: transform 0.24s ease;
}

.timeline-node:hover .timeline-node__core,
.timeline-node.is-active .timeline-node__core {
  transform: scale(1.08);
}

.timeline-node__content {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.timeline-node__date {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ice);
}

.timeline-node__title {
  margin: 0;
  font-size: 1.08rem;
}

.timeline-node__digits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.digit-pill,
.tag-pill {
  border-radius: 999px;
  padding: 0.4rem 0.78rem;
  font-size: 0.84rem;
}

.digit-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  font-weight: 700;
}

.tag-pill {
  background: rgba(168, 216, 255, 0.12);
  border: 1px solid rgba(168, 216, 255, 0.2);
}

.message-wall {
  margin-bottom: 32px;
}

.message-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.message-form label {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.message-form textarea,
.message-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.message-form textarea {
  min-height: 128px;
  resize: vertical;
}

.message-form__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
}

.poster-preview {
  margin-top: 24px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.poster-preview canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #07111f;
}

.message-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.message-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-card p,
.message-card strong {
  margin: 0;
}

.message-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 18, 0.74);
}

.modal__card {
  position: relative;
  width: min(920px, 100%);
  background: var(--surface-strong);
  border-radius: 28px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  z-index: 1;
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.26);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal__image {
  min-height: 320px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(168, 216, 255, 0.24), rgba(255, 215, 0, 0.14)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 12px, transparent 12px, transparent 24px);
}

.modal__image span {
  padding: 1rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.modal__content {
  padding: 36px 32px 32px;
}

.modal__date {
  margin: 0 0 12px;
  color: var(--ice);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.quote-box {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.18);
  color: var(--gold);
  line-height: 1.7;
}

@keyframes lidFloat {
  0%,
  100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}

@media (max-width: 900px) {
  .landing__content,
  .hero-panel,
  .modal__card,
  .message-form {
    grid-template-columns: 1fr;
  }

  .timeline-page,
  .landing {
    padding: 18px;
  }

  .timeline-track {
    height: 620px;
    min-width: 2500px;
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .landing h1 {
    font-size: 2.6rem;
  }

  .timeline-track {
    padding: 40px 48px 60px;
  }

  .timeline-track::before {
    left: 38px;
    right: 38px;
  }

  .timeline-node {
    width: 210px;
  }

  .timeline-node__button {
    width: 72px;
    height: 72px;
  }

  .timeline-node__core {
    width: 62px;
    height: 62px;
    font-size: 1.4rem;
  }

  .message-form__actions {
    flex-direction: column;
  }
}

@media print {
  .topbar__actions,
  .timeline-hint,
  .message-form,
  .modal,
  .landing {
    display: none !important;
  }

  .timeline-page.hidden {
    display: block !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}


