/* ============================================================
   某人的老地方 —— 怀旧主题
   致敬 90 年代 / Win95 风格:银灰背景、立体浮雕边框、等宽字体
   全部自包含,不依赖任何外部字体/图床(省心又安全)
   ============================================================ */

:root {
  --bg: #008080;            /* 经典 Win95 桌面青绿 */
  --panel: #c0c0c0;         /* 银灰面板 */
  --panel-light: #ffffff;
  --panel-dark: #808080;
  --panel-darker: #404040;
  --ink: #000080;           /* 海军蓝文字 */
  --accent: #a00;           /* 复古红点缀 */
  --link: #0000ee;
  --link-visited: #551a8b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: #000;
  font-family: "MS Sans Serif", "Segoe UI", Tahoma, "SimSun", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  padding: 16px;
}

.page {
  max-width: 860px;
  margin: 0 auto;
}

/* ---- 立体浮雕边框(Win95 按钮那种效果)---- */
.site-header, .nav-bar, .content, .site-footer, .module-card, .welcome-box {
  background: var(--panel);
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker);
  border-bottom: 2px solid var(--panel-darker);
}

.site-header {
  padding: 14px 18px;
  margin-bottom: 10px;
  text-align: center;
}

.site-title a {
  font-size: 30px;
  font-weight: bold;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 2px;
  text-shadow: 1px 1px 0 #fff;
}

.site-subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: #333;
}

/* ---- 导航条 ---- */
.nav-bar {
  padding: 8px 10px;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.nav-bar a {
  display: inline-block;
  padding: 4px 14px;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel);
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker);
  border-bottom: 2px solid var(--panel-darker);
  font-weight: bold;
}
.nav-bar a:hover { color: var(--accent); }
.nav-bar a:active {
  /* 按下去的凹陷效果 */
  border-top: 2px solid var(--panel-darker);
  border-left: 2px solid var(--panel-darker);
  border-right: 2px solid var(--panel-light);
  border-bottom: 2px solid var(--panel-light);
}

/* ---- 内容区 ---- */
.content { padding: 18px 20px; margin-bottom: 10px; }

.welcome-box { padding: 16px 20px; margin-bottom: 16px; }
.welcome-box h1 {
  color: var(--ink);
  margin-top: 0;
  border-bottom: 2px groove #fff;
  padding-bottom: 8px;
}

a { color: var(--link); }
a:visited { color: var(--link-visited); }

/* 一闪一闪的小提示(致敬 <blink>,但用 CSS 温柔实现) */
.blink-hint {
  color: var(--accent);
  font-weight: bold;
  text-align: center;
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---- 模块卡片网格 ---- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.module-card {
  padding: 18px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}
.module-card:hover { background: #d4d0c8; }
.module-icon { font-size: 40px; line-height: 1; }
.module-name { font-size: 18px; font-weight: bold; margin-top: 8px; }
.module-desc { font-size: 12px; color: #444; margin-top: 4px; }

/* ---- 页脚 + 访客计数器 ---- */
.site-footer {
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  color: #333;
}
.counter-box { margin-bottom: 6px; }
.counter {
  display: inline-block;
  background: #000;
  color: #0f0;                 /* 经典 LED 绿数字 */
  font-family: "Courier New", monospace;
  font-weight: bold;
  letter-spacing: 3px;
  padding: 2px 8px;
  border: 1px solid #000;
}
.footer-note { color: #555; }
.footer-admin { margin-top: 6px; }
.footer-admin a { color: #444; font-size: 11px; }

/* ---- 表单 / 按钮(Win95 风)---- */
.retro-form { margin-top: 12px; }
.retro-form label { display: block; font-weight: bold; color: var(--ink); margin: 8px 0 4px; }
.retro-form input[type="text"],
.retro-form input[type="password"],
.retro-form textarea {
  width: 100%;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  /* 输入框是"凹进去"的浮雕 */
  border-top: 2px solid var(--panel-darker);
  border-left: 2px solid var(--panel-darker);
  border-right: 2px solid var(--panel-light);
  border-bottom: 2px solid var(--panel-light);
}

.retro-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  cursor: pointer;
  background: var(--panel);
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker);
  border-bottom: 2px solid var(--panel-darker);
}
.retro-btn:active {
  border-top: 2px solid var(--panel-darker);
  border-left: 2px solid var(--panel-darker);
  border-right: 2px solid var(--panel-light);
  border-bottom: 2px solid var(--panel-light);
}

.form-error {
  color: var(--accent);
  font-weight: bold;
  background: #ffe;
  padding: 6px 10px;
  border: 1px solid var(--accent);
}

/* ---- 留言板 ---- */
.gb-list { margin-top: 4px; }
.gb-entry {
  background: var(--panel);
  padding: 10px 14px;
  margin-bottom: 10px;
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker);
  border-bottom: 2px solid var(--panel-darker);
}
.gb-entry.gb-hidden { opacity: 0.55; }
.gb-head { border-bottom: 1px dotted #888; padding-bottom: 4px; margin-bottom: 6px; }
.gb-name { font-weight: bold; color: var(--ink); }
.gb-time { font-size: 11px; color: #555; margin-left: 8px; }
.gb-flag { font-size: 11px; color: var(--accent); margin-left: 8px; }
.gb-msg { white-space: pre-wrap; word-break: break-word; }
.gb-empty { color: #333; font-style: italic; }
.gb-admin { margin-top: 8px; display: flex; gap: 8px; }
.gb-admin form { margin: 0; }
.gb-btn {
  font-family: inherit; font-size: 11px; padding: 2px 10px; cursor: pointer;
  background: var(--panel);
  border-top: 2px solid var(--panel-light);
  border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker);
  border-bottom: 2px solid var(--panel-darker);
}
.gb-btn-danger { color: var(--accent); font-weight: bold; }

/* ---- 笔记 / 博客 ---- */
.blog-layout { display: flex; gap: 12px; align-items: flex-start; }
.blog-main { flex: 1 1 auto; min-width: 0; }
.blog-side { flex: 0 0 180px; }
@media (max-width: 640px) {
  .blog-layout { flex-direction: column; }
  .blog-side { flex-basis: auto; width: 100%; }
}

.blog-item {
  background: var(--panel); padding: 10px 14px; margin-bottom: 10px;
  border-top: 2px solid var(--panel-light); border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker); border-bottom: 2px solid var(--panel-darker);
}
.blog-item-title { font-size: 18px; font-weight: bold; color: var(--ink); text-decoration: none; }
.blog-item-title:hover { color: var(--accent); }
.blog-item-meta { font-size: 11px; color: #555; margin: 4px 0; }
.blog-item-excerpt { font-size: 13px; color: #333; margin-top: 6px; }

.tag {
  display: inline-block; font-size: 11px; padding: 1px 7px; margin: 0 4px 4px 0;
  background: #e8e8e0; color: var(--ink); text-decoration: none; border: 1px solid #999;
}
.tag:hover { background: #fff; color: var(--accent); }
.arch { display: block; font-size: 12px; padding: 2px 0; color: var(--link); }

.side-box {
  background: var(--panel); padding: 8px 12px; margin-bottom: 10px;
  border-top: 2px solid var(--panel-light); border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker); border-bottom: 2px solid var(--panel-darker);
}
.side-title { font-weight: bold; color: var(--ink); border-bottom: 1px solid #999; margin-bottom: 6px; }

/* 渲染出来的 Markdown 正文排版 */
.blog-content { line-height: 1.7; }
.blog-content h1, .blog-content h2, .blog-content h3 { color: var(--ink); }
.blog-content h1 { border-bottom: 2px groove #fff; padding-bottom: 6px; }
.blog-content pre {
  background: #000; color: #0f0; padding: 10px 12px; overflow-x: auto;
  font-family: "Courier New", monospace; border: 1px solid #000;
}
.blog-content code { font-family: "Courier New", monospace; background: #e8e8e0; padding: 1px 4px; }
.blog-content pre code { background: transparent; color: inherit; padding: 0; }
.blog-content blockquote { border-left: 4px solid #888; margin: 8px 0; padding: 4px 12px; color: #444; background: #eee; }
.blog-content img { max-width: 100%; height: auto; }
.blog-content table { border-collapse: collapse; }
.blog-content th, .blog-content td { border: 1px solid #999; padding: 4px 8px; }

/* ---- 相册 ---- */
.album-grid, .photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.album-card {
  background: var(--panel); padding: 8px; text-decoration: none; color: var(--ink); text-align: center;
  border-top: 2px solid var(--panel-light); border-left: 2px solid var(--panel-light);
  border-right: 2px solid var(--panel-darker); border-bottom: 2px solid var(--panel-darker);
}
.album-card:hover { background: #d4d0c8; }
.album-cover { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #888; display: flex; align-items: center; justify-content: center; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-cover-empty { color: #ddd; font-size: 12px; }
.album-name { font-weight: bold; margin-top: 6px; }
.album-count { font-size: 11px; color: #555; }

.photo-item {
  display: block; aspect-ratio: 1/1; overflow: hidden; background: #000;
  border: 2px solid var(--panel-darker); position: relative;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item-admin { }
.photo-del-btn {
  position: absolute; top: 4px; right: 4px; padding: 0 7px; line-height: 18px;
  background: #fff; opacity: 0.9;
}
