/* ==============================
   全局变量
============================== */

:root {
  --font-body: "Noto Sans", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-typewriter: "Courier New", Courier, "IBM Plex Mono", "Noto Sans Mono", monospace;
  --bg-color: #2a2626;
  --bg-color-2: #1f1b1b;
  --bg-pattern: radial-gradient(#3d3838 1px, transparent 1px);
  --container-bg: rgba(42, 38, 38, 0.95);

  --text-main: #e2dcd3;
  --text-dim: #a8a096;

  --accent-primary: #e57347;
  --accent-secondary: #e8c37d;

  --border-color: #5c544e;
  --button-bg: #383332;

  --loader-bg: rgba(18, 16, 16, 0.94);
  --panel-bg: rgba(42, 38, 38, 0.72);
}

body.light-mode {
  --bg-color: #f7f3e8;
  --bg-color-2: #ece4d2;
  --bg-pattern: radial-gradient(#e3dcc8 1px, transparent 1px);
  --container-bg: rgba(247, 243, 232, 0.98);

  --text-main: #4a4541;
  --text-dim: #7a736c;

  --accent-primary: #5a7b8c;
  --accent-secondary: #8a7a65;

  --border-color: #d8ceb8;
  --button-bg: #ede6d5;

  --loader-bg: rgba(247, 243, 232, 0.95);
  --panel-bg: rgba(255, 252, 245, 0.78);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 92px 20px 28px;
  color: var(--text-main);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 20% 20%, rgba(229, 115, 71, 0.18), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(232, 195, 125, 0.12), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(92, 84, 78, 0.22), transparent 36%),
    var(--bg-pattern),
    linear-gradient(135deg, var(--bg-color), var(--bg-color-2), #3a2d2a, var(--bg-color));
  background-size:
    120% 120%,
    120% 120%,
    120% 120%,
    20px 20px,
    420% 420%;
  animation: pageGradientFlow 18s ease-in-out infinite;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

body.light-mode {
  background:
    radial-gradient(circle at 20% 20%, rgba(90, 123, 140, 0.15), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(138, 122, 101, 0.14), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(216, 206, 184, 0.4), transparent 36%),
    var(--bg-pattern),
    linear-gradient(135deg, var(--bg-color), var(--bg-color-2), #fff8e9, var(--bg-color));
  background-size:
    120% 120%,
    120% 120%,
    120% 120%,
    20px 20px,
    420% 420%;
  animation: pageGradientFlow 18s ease-in-out infinite;
}

a {
  color: var(--accent-secondary);
}

a:hover {
  color: var(--accent-primary);
}

/* ==============================
   顶部固定导航栏
============================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  width: 100%;
  padding: 12px 18px;
  background:
    linear-gradient(
      180deg,
      rgba(42, 38, 38, 0.96),
      rgba(31, 27, 27, 0.92)
    );
  border-bottom: 1px solid rgba(229, 115, 71, 0.45);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

body.light-mode .topbar {
  background:
    linear-gradient(
      180deg,
      rgba(247, 243, 232, 0.96),
      rgba(237, 230, 213, 0.92)
    );
  border-bottom-color: rgba(90, 123, 140, 0.38);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.topbar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 38px;
  padding: 0;
  color: var(--accent-secondary);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 800;
  font-family: var(--font-typewriter);
  letter-spacing: 0.4px;
  white-space: nowrap;
  text-transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.topbar-logo:hover {
  color: var(--accent-primary);
}


.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  gap: 8px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  color: var(--accent-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: bold;
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 3px 10px rgba(0, 0, 0, 0.14);
  transition:
    transform 0.2s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.top-nav a:hover {
  transform: translateY(-2px);
  color: var(--bg-color);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.theme-switch {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  min-height: 38px;
  padding: 8px 15px;
  color: var(--accent-primary);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: bold;
  white-space: nowrap;
  background: rgba(56, 51, 50, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    transform 0.2s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.theme-switch:hover {
  transform: translateY(-2px);
  color: var(--bg-color);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

body.light-mode .theme-switch {
  background: rgba(237, 230, 213, 0.9);
}

.mobile-menu-btn {
  display: none;
  min-height: 38px;
  padding: 8px 13px;
  color: var(--accent-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.mobile-menu-btn:hover {
  transform: translateY(-1px);
  color: var(--bg-color);
  background: var(--accent-primary);
}

/* ==============================
   主容器
============================== */

.container {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 40px);
  background-color: var(--container-bg);
  border: 2px solid var(--accent-primary);
  border-radius: 28px;
  box-shadow:
    8px 8px 0 var(--accent-secondary),
    0 22px 60px rgba(0, 0, 0, 0.24);
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}


/* ==============================
   标题 / LOGO 打字机字体
============================== */

.topbar-logo,
.header-brand h1,
.header-brand h2,
.text-logo-shine,
.text-logo-sub,
.loader-title,
.loader-subtitle,
.loader-meta,
.player-screen,
.post-date,
footer strong {
  font-family: var(--font-typewriter);
}

/* ==============================
   Header
============================== */

.site-header {
  position: relative;
  padding-bottom: 24px;
  margin-bottom: 26px;
  text-align: center;
  border-bottom: 2px dashed var(--accent-primary);
}

.header-brand h1 {
  margin: 0 0 6px;
  color: var(--accent-secondary);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-family: var(--font-typewriter);
  line-height: 1.05;
  letter-spacing: 1px;
  text-shadow: 2px 2px var(--button-bg);
}

.header-brand h2 {
  margin: 0;
  padding-bottom: 0;
  color: var(--accent-primary);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-family: var(--font-typewriter);
  letter-spacing: 1px;
  border-bottom: none;
}

/* ==============================
   通用内容
============================== */

.quote {
  margin: 22px 0 0;
  padding: 16px 20px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.7;
  background: var(--button-bg);
  border-left: 5px solid var(--accent-primary);
  border-radius: 0 14px 14px 0;
}

h2 {
  margin: 36px 0 18px;
  padding-bottom: 9px;
  color: var(--accent-primary);
  font-size: 1.45rem;
  border-bottom: 1px solid var(--border-color);
}

h3 {
  margin: 0 0 14px;
  color: var(--accent-secondary);
}

ul {
  padding-left: 10px;
  margin: 0;
  list-style-type: none;
}

li {
  margin-bottom: 10px;
  line-height: 1.7;
}

li::before {
  content: "✦ ";
  color: var(--accent-secondary);
}

li span {
  color: var(--text-main);
}

/* ==============================
   暴雨倒计时
============================== */

@keyframes alert-blink {
  0% {
    color: var(--accent-primary);
    text-shadow: 0 0 5px var(--accent-primary);
  }

  50% {
    color: #ff4444;
    text-shadow: 0 0 15px #ff3333;
  }

  100% {
    color: var(--accent-primary);
    text-shadow: 0 0 5px var(--accent-primary);
  }
}

.storm-timer {
  padding: 16px;
  margin-bottom: 26px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 1px;
  background: var(--button-bg);
  border: 2px dashed var(--border-color);
  border-radius: 18px;
}

#timer-display {
  display: inline-block;
  margin-top: 7px;
  font-size: 1.45em;
  font-weight: bold;
  animation: alert-blink 1.5s infinite;
}

/* ==============================
   复古播放器
============================== */

.retro-player {
  padding: 17px;
  margin-bottom: 26px;
  background-color: var(--button-bg);
  border: 2px solid var(--border-color);
  border-radius: 18px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.14),
    0 4px 0 var(--border-color);
}

.player-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.player-btn {
  padding: 7px 14px;
  color: var(--accent-secondary);
  font-family: inherit;
  font-weight: bold;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 3px 0 var(--border-color);
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease,
    background-color 0.25s ease;
}

.player-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.player-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--border-color);
}

.player-vol {
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.9em;
  font-weight: bold;
}

.player-screen {
  padding: 11px 15px;
  overflow: hidden;
  color: var(--accent-secondary);
  font-weight: bold;
  white-space: nowrap;
  background-color: #1a1818;
  border: 2px inset #000;
  border-radius: 10px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

#pirate-audio {
  display: none;
}

/* ==============================
   个人信息 + 图片展示
============================== */

.profile-panel {
  display: block;
}

.profile-info,
.profile-gallery {
  padding: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border-color);
  border-radius: 18px;
}

.profile-gallery {
  margin-top: 18px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
  border: 1px dashed var(--border-color);
  border-radius: 16px;
}

.image-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  overflow: hidden;
  color: var(--text-dim);
  background:
    linear-gradient(135deg, rgba(229, 115, 71, 0.10), rgba(232, 195, 125, 0.08)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 8px,
      transparent 8px,
      transparent 16px
    );
}

.gallery-card-main .image-placeholder {
  min-height: 260px;
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder img[src=""] {
  display: none;
}

.image-placeholder span {
  font-weight: bold;
  letter-spacing: 1px;
}

.gallery-card figcaption {
  padding: 10px 12px;
  color: var(--accent-secondary);
  font-size: 0.88rem;
  font-weight: bold;
  text-align: center;
  background: rgba(0, 0, 0, 0.12);
}

/* ==============================
   APPLe 互动
============================== */

.apple-corner {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.3s ease;
}

.apple-corner:hover {
  transform: translateY(-2px);
  background-color: var(--border-color);
}

.apple-corner::after {
  display: block;
  margin-top: 8px;
  color: var(--accent-primary);
  font-size: 0.8em;
  text-align: right;
  content: "(👆 点击这里查看今日推荐)";
}

/* ==============================
   日志和留言
============================== */

.post {
  padding-bottom: 17px;
  margin-bottom: 20px;
  line-height: 1.8;
  border-bottom: 1px dashed var(--border-color);
}

.post-date {
  display: inline-block;
  padding: 3px 9px;
  margin-bottom: 6px;
  color: var(--accent-primary);
  font-weight: bold;
  background: var(--button-bg);
  border-radius: 8px;
}

.chat-box {
  padding: 20px;
  font-size: 0.95em;
  line-height: 1.8;
  background-color: var(--button-bg);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-box p {
  margin: 0.3em 0;
}

.chat-name {
  color: var(--accent-secondary);
  font-weight: bold;
}

/* ==============================
   友情链接独立区域
============================== */

.friend-links-section {
  margin-top: 34px;
  padding: 24px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border-color);
  border-radius: 22px;
}

.friend-links-section h2 {
  margin-top: 0;
}

.friend-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
}

.friend-list a {
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
  text-decoration: none;
  word-break: break-word;
}

.friend-list a::before {
  content: "↗ ";
  color: var(--accent-secondary);
}

.friend-list a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* ==============================
   右下 LOGO 原图区域
============================== */

.bottom-logo-area {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.bottom-logo-area img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.bottom-logo-area img[src=""] {
  display: none;
}

/* ==============================
   Footer
============================== */

footer {
  padding-top: 26px;
  margin-top: 42px;
  color: var(--text-dim);
  font-size: 0.85em;
  line-height: 1.8;
  text-align: center;
  border-top: 2px dashed var(--accent-primary);
}

/* ==============================
   加载动画：纯文字扫光，不发光
============================== */

.logo-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(229, 115, 71, 0.12), transparent 34%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 4px
    ),
    var(--loader-bg);
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease;
}

.logo-loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-noise,
.loader-glow {
  position: absolute;
  inset: -20%;
  pointer-events: none;
}

.loader-glow {
  background:
    radial-gradient(circle at center, rgba(229, 115, 71, 0.12), transparent 22%),
    radial-gradient(circle at center, rgba(232, 195, 125, 0.08), transparent 40%);
  filter: blur(32px);
  animation: floatGlow 5s ease-in-out infinite;
}

.loader-noise {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

.loader-shell {
  position: relative;
  width: min(520px, 92vw);
  padding: clamp(24px, 5vw, 36px) clamp(18px, 4vw, 28px) 24px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.text-logo-wrap {
  display: grid;
  gap: 6px;
  place-items: center;
  margin: 0 auto 22px;
}

.text-logo-shine {
  display: inline-block;
  max-width: 100%;
  color: transparent;
  font-size: clamp(2.4rem, 12vw, 6rem);
  font-weight: 900;
  font-family: var(--font-typewriter);
  line-height: 0.95;
  letter-spacing: clamp(2px, 1vw, 8px);
  text-transform: uppercase;
  background:
    linear-gradient(
      110deg,
      rgba(229, 115, 71, 0.86) 0%,
      rgba(232, 195, 125, 1) 30%,
      rgba(255, 255, 255, 1) 46%,
      rgba(232, 195, 125, 1) 58%,
      rgba(229, 115, 71, 0.86) 100%
    );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation:
    textLogoShine 2.2s ease-in-out infinite,
    textLogoBreath 2.8s ease-in-out infinite;
}

.text-logo-sub {
  color: var(--text-dim);
  font-size: clamp(0.78rem, 2.8vw, 1rem);
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.loader-title {
  margin: 0;
  color: var(--accent-secondary);
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: 1px;
}

.loader-subtitle {
  margin: 8px 0 0;
  color: var(--text-main);
  font-size: 15px;
  letter-spacing: 0.5px;
}

.loader-text {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

.signal-bar {
  width: 100%;
  height: 10px;
  margin-top: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.22);
}

.signal-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: inherit;
  box-shadow: 0 0 16px rgba(229, 115, 71, 0.22);
  transition: width 0.2s ease;
}

.loader-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.scanline {
  position: absolute;
  top: -20%;
  right: 0;
  left: 0;
  height: 12%;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      rgba(229, 115, 71, 0.08),
      transparent
    );
  mix-blend-mode: screen;
  animation: scan 3.8s linear infinite;
}

/* ==============================
   动画
============================== */

@keyframes pageGradientFlow {
  0% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%,
      0 0,
      0% 50%;
  }

  50% {
    background-position:
      18% 12%,
      82% 18%,
      48% 86%,
      10px 10px,
      100% 50%;
  }

  100% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%,
      0 0,
      0% 50%;
  }
}

@keyframes textLogoShine {
  0% {
    background-position: 220% 50%;
  }

  50% {
    background-position: 0% 50%;
  }

  100% {
    background-position: -120% 50%;
  }
}

@keyframes textLogoBreath {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.018);
    filter: brightness(1.04);
  }
}

@keyframes scan {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(900%);
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.03);
  }
}

/* ==============================
   响应式
============================== */

@media screen and (max-width: 720px) {
  html {
    scroll-padding-top: 86px;
  }

  body {
    padding: 82px 10px 18px;
  }

  .topbar {
    padding: 10px;
  }

  .topbar-inner {
    position: relative;
    gap: 8px;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .top-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 9100;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: min(260px, calc(100vw - 20px));
    padding: 10px;
    background:
      linear-gradient(
        180deg,
        rgba(42, 38, 38, 0.98),
        rgba(31, 27, 27, 0.96)
      );
    border: 1px solid rgba(229, 115, 71, 0.42);
    border-radius: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.32);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease;
  }

  body.light-mode .top-nav {
    background:
      linear-gradient(
        180deg,
        rgba(247, 243, 232, 0.98),
        rgba(237, 230, 213, 0.96)
      );
    border-color: rgba(90, 123, 140, 0.34);
  }

  .top-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .top-nav a {
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
  }

  .theme-switch {
    max-width: 46vw;
    margin-left: auto;
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
  }

  .container {
    padding: 20px;
    border-radius: 22px;
    box-shadow: 4px 4px 0 var(--accent-secondary);
  }

  .quote,
  .chat-box {
    padding: 15px;
    font-size: 0.9em;
  }

  .player-vol {
    width: 100%;
    margin-top: 5px;
    margin-left: 0;
    text-align: center;
  }

  .gallery-card-main .image-placeholder {
    min-height: 220px;
  }

  .loader-shell {
    padding: 24px 18px 20px;
  }

  .text-logo-shine {
    font-size: clamp(2.4rem, 15vw, 4.4rem);
  }

  .loader-meta {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .friend-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 460px) {
  .topbar-inner {
    gap: 6px;
  }
  .topbar-logo {
    font-size: 0.82rem;
    letter-spacing: 0.2px;
  }

  .mobile-menu-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  .theme-switch {
    max-width: 40vw;
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .friend-list {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 360px) {
  .theme-switch {
    max-width: 36vw;
  }

  .mobile-menu-btn {
    font-size: 0;
  }

  .mobile-menu-btn::before {
    content: "☰";
    font-size: 1rem;
  }
}

/* ==============================
   船员页面
============================== */

.top-nav a.is-active {
  color: var(--bg-color);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.crew-page .site-header {
  margin-bottom: 30px;
}

.crew-list-section h2,
.sailors-note h2 {
  text-align: left;
}

.crew-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.crew-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 20px;
  align-items: stretch;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--border-color);
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 12px 28px rgba(0, 0, 0, 0.13);
}

.crew-avatar {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 168px;
  overflow: hidden;
  color: var(--text-dim);
  font-family: var(--font-typewriter);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(229, 115, 71, 0.14), rgba(232, 195, 125, 0.10)),
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 8px,
      transparent 8px,
      transparent 16px
    );
  border: 1px dashed var(--border-color);
  border-radius: 18px;
}

.crew-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crew-avatar img[src=""] {
  display: none;
}

.crew-info h3 {
  margin: 0 0 8px;
  color: var(--accent-secondary);
  font-family: var(--font-typewriter);
  font-size: clamp(1.25rem, 2.8vw, 1.7rem);
}

.crew-role {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 10px;
  color: var(--accent-primary);
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-color);
  border-radius: 999px;
}

.crew-info ul {
  padding-left: 0;
}

.crew-info li {
  margin-bottom: 8px;
}

.crew-info li::before {
  content: "";
}

.crew-info strong {
  color: var(--accent-secondary);
}

.sailors-note {
  margin-top: 34px;
}

.sailors-box {
  padding: 22px 24px;
  color: var(--text-main);
  line-height: 1.9;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--border-color);
  border-radius: 22px;
}

.sailors-box p {
  margin: 0;
}

.sailors-box p + p {
  margin-top: 1em;
}

@media screen and (max-width: 720px) {
  .crew-card {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .crew-avatar {
    min-height: 220px;
  }

  .crew-role {
    font-size: 0.82rem;
  }

  .sailors-box {
    padding: 18px;
  }
}




/* 右下 LOGO：窄屏宽度自适应，避免横向溢出 */
@media screen and (max-width: 720px) {
  .bottom-logo-area {
    justify-content: flex-end;
    width: 100%;
    overflow: hidden;
  }

  .bottom-logo-area img {
    height: auto;
    width: min(100%, 220px);
    max-width: 100%;
    object-fit: contain;
  }
}

@media screen and (max-width: 420px) {
  .bottom-logo-area img {
    width: min(100%, 180px);
    height: auto;
  }
}
