/* 凌乱的个人博客 — 淡蓝色 Y2K 主题（与原站同一套配色） */
:root {
  color-scheme: light dark;
  --bg: #d6ecfa;
  --surface: #eaf6ff;
  --text: #003366;
  --dim: #5b7a99;
  --border: #6699cc;
  --accent: #3366cc;
  --page-bg: #d6ecfa;
  --panel: #eaf6ff;
  --panel-alt: #cfe8fa;
  --panel-deep: #b8dcf5;
  --ink: #003366;
  --ink-soft: #336699;
  --steel: #6699cc;
  --head-bg: #99ccff;
  --head-ink: #003366;
  --lcd-bg: #0a2a4a;
  --lcd-text: #7dffce;
  --counter-bg: #000000;
  --counter-text: #33ff66;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14273d;
    --surface: #1d3552;
    --text: #d6ecfa;
    --dim: #8fb4d6;
    --border: #3d5a80;
    --accent: #99ccff;
    --page-bg: #14273d;
    --panel: #1d3552;
    --panel-alt: #24405f;
    --panel-deep: #2c4c70;
    --ink: #d6ecfa;
    --ink-soft: #a9c8e8;
    --steel: #3d5a80;
    --head-bg: #2c4c70;
    --head-ink: #d6ecfa;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Verdana, Tahoma, Geneva, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--page-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cpath d='M18 6l1.8 4.2L24 12l-4.2 1.8L18 18l-1.8-4.2L12 12l4.2-1.8z' fill='%23ffffff' fill-opacity='0.85'/%3E%3Ccircle cx='52' cy='34' r='1.6' fill='%23ffffff' fill-opacity='0.9'/%3E%3Cpath d='M60 52l1.2 2.8L64 56l-2.8 1.2L60 60l-1.2-2.8L56 56l2.8-1.2z' fill='%2399ccff' fill-opacity='0.8'/%3E%3Ccircle cx='30' cy='58' r='1.3' fill='%23ffffff' fill-opacity='0.7'/%3E%3C/svg%3E");
}

.comic { font-family: 'Comic Sans MS', 'Comic Sans', 'Chalkboard SE', 'Segoe Print', sans-serif; }
.impact { font-family: Impact, 'Arial Black', sans-serif; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 4px 32px; }
a { color: var(--accent); }

button, input, textarea, select {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  min-height: 32px;
}
button {
  cursor: pointer;
  border: 2px solid var(--steel);
  background: var(--panel);
  padding: 4px 12px;
  font-weight: bold;
}
button:hover { background: var(--head-bg); }
input[type="text"], input[type="password"], textarea {
  width: 100%;
  border: 2px solid var(--steel);
  background: var(--panel);
  padding: 6px 8px;
}
textarea { min-height: 90px; resize: vertical; }

header.banner {
  margin-top: 8px;
  border: 3px solid var(--steel);
  background: var(--panel-deep);
  text-align: center;
  padding: 8px 4px 4px;
}
header.banner h1 { font-size: 40px; margin: 2px 0 0; line-height: 1.1; }
header.banner .welcome-gif { height: 64px; width: auto; }
.marquee {
  overflow: hidden;
  border-top: 2px solid var(--steel);
  margin-top: 6px;
  padding: 2px 0;
  font-size: 13px;
}
.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  animation: y2k-marquee 16s linear infinite;
}
@keyframes y2k-marquee { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

nav.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0;
}
nav.nav a {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 2px solid var(--steel);
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-weight: bold;
  font-size: 13px;
  padding: 4px 8px;
}
nav.nav a img { height: 20px; width: auto; }
nav.nav a.active, nav.nav a:hover { background: var(--head-bg); }

section.panel {
  border: 3px solid var(--steel);
  background: var(--panel);
  margin-top: 8px;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-bottom: 2px solid var(--steel);
  background: var(--head-bg);
}
.section-head img { height: 28px; width: auto; }
.section-head h2 { margin: 0; font-size: 16px; color: var(--head-ink); }
.section-head .en { font-size: 10px; letter-spacing: 2px; color: var(--ink-soft); }
.pad { padding: 12px; }
.center { text-align: center; }
.small { font-size: 11px; color: var(--ink-soft); }
.dim { color: var(--ink-soft); }

.backbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-bottom: 2px solid var(--steel);
  background: var(--panel-alt);
  padding: 8px;
}
.backbar img { height: 24px; width: auto; }

.divider-bunny {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 4px 0;
}
.divider-bunny img { height: 40px; width: auto; }

/* 日记 */
.feed-item { border-bottom: 2px dashed var(--steel); padding: 10px 4px; }
.feed-item:last-child { border-bottom: none; }
.feed-kind {
  display: inline-block;
  font-size: 11px;
  border: 1px solid var(--steel);
  background: var(--panel-alt);
  padding: 0 6px;
  margin-right: 6px;
}
.feed-title { font-weight: bold; font-size: 15px; }
.feed-title a { color: var(--ink); text-decoration: none; }
.feed-title a:hover { text-decoration: underline; }
.feed-meta { font-size: 12px; color: var(--ink-soft); }
.feed-photos { display: grid; gap: 4px; margin-top: 6px; }
.feed-photos.c1 { grid-template-columns: 1fr; }
.feed-photos.c2 { grid-template-columns: 1fr 1fr; }
.feed-photos.c3 { grid-template-columns: 1fr 1fr 1fr; }
.feed-photos img {
  width: 100%;
  border: 2px solid var(--steel);
  cursor: pointer;
  display: block;
}
.like-btn { margin-top: 6px; font-size: 13px; }

/* 相册 */
.album-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.album-grid figure { margin: 0; text-align: center; }
.album-grid img {
  width: 100%;
  border: 2px solid var(--steel);
  cursor: pointer;
  display: block;
}
.album-grid figcaption { font-size: 12px; padding-top: 2px; }

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.lightbox img { max-width: 96vw; max-height: 80vh; border: 3px solid #fff; }
.lightbox .lb-cap { color: #fff; margin-top: 8px; font-size: 13px; }
.lightbox .lb-btns { margin-top: 8px; display: flex; gap: 8px; }
.lightbox .lb-btns button { background: #fff; }

/* 留言本 */
.gb-entry { border: 2px solid var(--steel); background: var(--panel-alt); padding: 8px; margin-top: 8px; }
.gb-entry .gb-head { font-size: 12px; color: var(--ink-soft); }
.gb-entry .gb-msg { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }

/* 宠物 */
.pet-lcd {
  border: 2px solid var(--steel);
  background: var(--lcd-bg);
  color: var(--lcd-text);
  text-align: center;
  padding: 16px 8px;
}
.pet-lcd img { height: 112px; width: auto; }
.bar-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.bar-row .bar-label { width: 48px; flex-shrink: 0; }
.bar-row .bar-track { flex: 1; height: 12px; border: 1px solid var(--steel); background: var(--panel); }
.bar-row .bar-fill { display: block; height: 100%; background: var(--head-bg); }

/* 贴纸台 */
.sticker-palette { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sticker-palette img { height: 48px; width: auto; cursor: pointer; border: 2px dashed transparent; padding: 2px; }
.sticker-palette img.sel { border-color: var(--accent); background: var(--panel-alt); }
.sticker-board {
  position: relative;
  min-height: 280px;
  border: 2px solid var(--steel);
  background: var(--panel-alt);
  margin-top: 8px;
  overflow: hidden;
}
.sticker-board img.placed { position: absolute; height: 56px; width: auto; cursor: pointer; }

/* 日历 */
table.cal { border-collapse: collapse; margin: 0 auto; }
table.cal th, table.cal td {
  border: 1px solid var(--steel);
  width: 40px;
  height: 36px;
  text-align: center;
}
table.cal th { background: var(--head-bg); font-size: 12px; }
table.cal td.has-post { background: var(--panel-deep); font-weight: bold; }
table.cal td.has-post a { color: var(--ink); }

/* 播放器 */
.cd {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid var(--steel);
  background:
    radial-gradient(circle at 50% 50%, #99ccff 0 18%, #cfe8fa 18% 32%, #6699cc 32% 34%, #eaf6ff 34% 100%);
}
.cd.spin { animation: y2k-spin 3.2s linear infinite; }
.cd-hole {
  position: absolute;
  left: 50%; top: 50%;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--steel);
}
.lcd {
  background: var(--lcd-bg);
  color: var(--lcd-text);
  font-family: monospace;
  padding: 8px;
  margin-top: 10px;
  font-size: 13px;
}
.lcd .lcd-title { font-size: 14px; font-weight: bold; }
input[type="range"].seek { width: 100%; accent-color: var(--accent); }
.track-list { list-style: none; padding: 0; margin: 8px 0 0; text-align: left; }
.track-list li { border-bottom: 1px dashed var(--steel); }
.track-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-weight: normal;
  padding: 6px 4px;
}
.track-list button:hover, .track-list li.now button { background: var(--panel-alt); }
.track-list .demo-tag { font-size: 11px; color: var(--ink-soft); }

/* 档案 */
.profile-avatar { width: 220px; max-width: 100%; border: 2px solid var(--steel); }
table.profile-table { margin: 8px auto 0; text-align: left; font-size: 14px; }
table.profile-table td { padding: 4px 12px 4px 0; }
.counter-box {
  display: inline-block;
  background: var(--counter-bg);
  color: var(--counter-text);
  padding: 4px 12px;
  font-family: monospace;
  font-size: 16px;
  letter-spacing: 4px;
  margin-top: 12px;
}
.webring { border: 2px solid var(--steel); background: var(--panel-alt); padding: 8px; margin-top: 16px; font-size: 12px; }

/* 页脚 */
footer.site {
  margin-top: 8px;
  border: 3px solid var(--steel);
  background: var(--panel);
  text-align: center;
  padding: 8px;
}
footer.site .badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; padding: 8px 0; }
footer.site .badges .txt-badge {
  display: flex;
  width: 88px; height: 31px;
  align-items: center; justify-content: center;
  border: 1px solid var(--steel);
  background: var(--panel-deep);
  font-size: 8px;
  font-weight: bold;
  line-height: 1.2;
}

@keyframes y2k-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes y2k-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.15; } }
.y2k-blink { animation: y2k-blink 1.1s steps(1) infinite; }
@keyframes y2k-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.y2k-bob { animation: y2k-bob 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .cd.spin, .y2k-blink, .y2k-bob, .marquee-inner { animation: none; }
}
