* {
  box-sizing: border-box;
}

:root {
  --star-cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.5l3.9 8 8.8 1.3-6.4 6.2 1.5 8.8L16 22.6 8.2 26.8 9.7 18l-6.4-6.2 8.8-1.3z' fill='%23ffd76a' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E") 16 16, pointer;
  --text: #e5edff;
  --muted: #b6c3da;
  --heading: #f8fafc;
  --surface: rgba(15, 23, 42, 0.74);
  --surface-strong: rgba(15, 23, 42, 0.9);
  --surface-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.28);
  --border-bright: rgba(250, 204, 21, 0.28);
  --accent: #facc15;
  --accent-cyan: #67e8f9;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  cursor: var(--star-cursor);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 68%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 78%, rgba(255, 255, 255, 0.82) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.34), transparent 38%),
    linear-gradient(135deg, #08111f 0%, #101a3d 46%, #251642 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

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

a,
button,
input,
textarea {
  cursor: var(--star-cursor);
}

.page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.navbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.logo {
  color: var(--heading);
  font-weight: 800;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a.active {
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-cyan) 100%);
}

.hero,
.panel {
  padding: 40px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.hero {
  text-align: center;
}

h1 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: clamp(2rem, 5vw, 4rem);
}

.subtitle {
  margin: 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.actions.compact {
  justify-content: flex-start;
  margin-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-cyan) 100%);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(103, 232, 249, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(250, 204, 21, 0.24);
}

.button.secondary {
  color: var(--heading);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.button.genshin {
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28);
}

.button.genshin:hover {
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-cyan) 100%);
  font-weight: 700;
}

.section-title {
  margin: 42px 0 16px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.card {
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-bright);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36), 0 0 24px rgba(250, 204, 21, 0.08);
}

.card img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.card-content,
.card p {
  margin: 0;
  padding: 16px 18px 20px;
  color: var(--muted);
}

.card-content h2 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 1.25rem;
}

.card-content p {
  padding: 0;
  line-height: 1.7;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.info-list span {
  padding: 8px 12px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-cyan) 100%);
  border-radius: 999px;
  font-weight: 700;
}

.timeline,
.message-board {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.timeline-item,
.message-form,
.message-item {
  padding: 24px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.timeline-item time,
.message-meta time {
  color: #94a3b8;
  font-size: 0.95rem;
}

.timeline-item h2 {
  margin: 10px 0;
}

.timeline-item p,
.message-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.message-form {
  display: grid;
  gap: 16px;
}

.message-form label {
  display: grid;
  gap: 8px;
  color: var(--heading);
  font-weight: 800;
}

.message-form input,
.message-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  font: inherit;
}

.message-form input:focus,
.message-form textarea:focus {
  outline: 3px solid rgba(250, 204, 21, 0.2);
  border-color: var(--accent);
}

.messages {
  display: grid;
  gap: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.stat-card,
.stat-row {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.stat-card {
  padding: 28px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  color: var(--heading);
  font-size: clamp(2rem, 6vw, 4rem);
}

.panel-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--text);
}

.stat-row span {
  color: var(--muted);
  word-break: break-all;
}

.message-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.empty-state {
  margin: 0;
  padding: 24px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 18px;
}

.meme-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 24px;
  align-items: center;
  margin-top: 38px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.meme-copy h2 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.meme-copy h1,
.panel h2,
.timeline-item h2 {
  color: var(--heading);
}

.meme-copy p,
.panel p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.8;
}

.meme-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  border: 2px dashed rgba(250, 204, 21, 0.5);
  border-radius: 22px;
  text-align: center;
}

.meme-stage img {
  display: none;
  max-width: 100%;
  max-height: 300px;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 16px 35px rgba(39, 48, 67, 0.16);
}

.meme-stage.has-image img {
  display: block;
}

.meme-stage.has-image .meme-placeholder {
  display: none;
}

.meme-placeholder {
  color: var(--accent);
  font-weight: 800;
}

#memeStatus {
  position: absolute;
  right: 18px;
  bottom: 14px;
  left: 18px;
  margin: 0;
  color: var(--accent);
  font-size: 0.95rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: calc(100% - 48px);
  padding: 14px 18px;
  color: var(--heading);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.click-star {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: var(--star-size);
  height: var(--star-size);
  color: #ffd76a;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--star-rotation));
  animation: star-pop 900ms ease-out forwards;
  filter: drop-shadow(0 0 8px rgba(255, 215, 106, 0.7));
}

.click-star svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes star-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(var(--star-rotation));
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -95%) scale(1) rotate(calc(var(--star-rotation) + 35deg));
  }
}

footer {
  margin-top: 32px;
  text-align: center;
  color: #cbd5e1;
}

@media (max-width: 640px) {
  .navbar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 24px;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .meme-panel {
    grid-template-columns: 1fr;
  }
}
