/* ========== 基础变量 ========== */
:root {
  --primary: #ff6b6b;
  --primary-hover: #ee5a5a;
  --bg: #fafafa;
  --card-bg: #fff;
  --text: #333;
  --text-muted: #666;
  --border: #eee;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
}

/* ========== 重置与基础 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; }

/* ========== 布局容器 ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

main { flex: 1; }

/* ========== 导航栏 ========== */
.nav {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========== 页脚 ========== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 40px;
}

.footer-content {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content p { margin: 6px 0; }

.footer-beian {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.footer-beian a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-beian img { width: 16px; height: 16px; }

/* ========== 首页 Hero ========== */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text);
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* ========== 卡片网格 ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--primary-hover);
  color: #fff;
}

/* ========== 照片墙 ========== */
.page-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 50%, #ce93d8 100%);
}

.page-header h1 {
  font-size: 2rem;
  color: var(--text);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 40px 0;
}

.photo-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.photo-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.photo-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.photo-info {
  padding: 12px 16px;
}

.photo-info .date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-info .desc {
  font-size: 0.9rem;
  color: var(--text);
  margin-top: 4px;
}

/* ========== 灯箱 ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 16px;
  font-size: 1rem;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  user-select: none;
  padding: 20px;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .nav .container { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.85rem; }

  .hero { padding: 50px 16px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }

  .card-grid { padding: 24px 0; gap: 16px; }
  .card { padding: 24px 16px; }

  .photo-grid { gap: 12px; }
  .photo-item img { height: 180px; }

  .lightbox-nav { font-size: 1.8rem; padding: 10px; }
}

@media (max-width: 480px) {
  .nav-logo span { display: none; }
  .photo-grid { grid-template-columns: 1fr; }
}
