/* public/css/style.css */
:root {
  --bg-color: #ffffff;
  --text-color: #333333;
  --footer-bg: #f5f5f5;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --footer-bg: #1e1e1e;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

.content {
  padding: 2rem;
}

.avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 8px var(--shadow);
}

.quote {
  margin: 1.5rem auto;
  max-width: 600px;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
}

.quote small {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.95rem;
  opacity: 0.8;
}

#theme-toggle {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s;
}

#theme-toggle:hover {
  opacity: 0.8;
}

footer {
  background-color: var(--footer-bg);
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
  transition: background-color 0.3s;
}

footer a {
  color: #4da6ff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* 头部样式 */
.site-header {
  position: relative;
  width: 100%;
  height: 440px;
  overflow: hidden;
}

.header-image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.header-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  text-align: center;
  color: white;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* 🔥 添加垂直居中 */
  gap: 1.2rem;
  height: 100%; /* 🔥 确保高度充满容器 */
}

.site-title {
  font-size: 4rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: white;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
  text-align: center;
  align-self: center; /* 🔥 确保标题自身居中 */
}

/* Hero 区域样式 */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Hero 覆盖层样式 */
.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  text-align: center;
  color: white;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* Hero 标题样式 */
.hero-title {
  font-size: 2.2rem;
  font-weight: bold;
  color: rgb(0, 0, 0);
  margin: 0;
  text-align: center;
}

/* 归档预览样式 */
.archive-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

/* 页面内容样式 */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

/* 页脚 */
.site-footer {
  text-align: center;
  padding: 1rem;
  background: #9a9a9a;
  color: #fff;
  margin-top: 2rem;
}

.site-footer a {
  color: #007bff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* —————— 主导航栏（图片下方） —————— */
.main-nav {
  display: flex; /* ✅ 改为 flex 布局 */
  width: 100%;
  background-color: rgb(24, 137, 255); /* ✅ 蓝色背景 */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
  padding: 0;
}

.main-nav a {
  flex: 1; /* ✅ 均分 4 份 */
  padding: 1rem 0;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9); /* ✅ 浅白色文字 */
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: white;
  background-color: rgba(0, 0, 0, 0.1);
}

.main-nav a.active {
  background-color: white; /* ✅ 当前页白色背景 */
  color: #1889ff; /* ✅ 文字变蓝色 */
  font-weight: bold;
}