/* ========== 全局重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
}

/* ========== 密码保护遮罩 ========== */
.password-gate {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.password-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.gate-card {
  position: relative;
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.gate-icon { font-size: 48px; margin-bottom: 16px; }
.gate-card h2 { font-size: 22px; font-weight: 600; margin-bottom: 8px; color: #f1f5f9; }
.gate-card p { color: #94a3b8; margin-bottom: 24px; font-size: 14px; }
.gate-card input {
  width: 100%; padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  color: #f1f5f9; font-size: 16px;
  outline: none; transition: border-color 0.3s;
  margin-bottom: 16px;
}
.gate-card input:focus { border-color: #6366f1; }
.gate-card button {
  width: 100%; padding: 14px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.gate-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
.gate-error { color: #f87171; margin-top: 12px; font-size: 14px; min-height: 20px; }

/* ========== 主内容 ========== */
.main-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header { text-align: center; padding: 48px 20px 24px; }
.site-header h1 {
  font-size: 36px; font-weight: 700; color: #f1f5f9;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ========== 轮播图 ========== */
.carousel-section {
  width: 100%; max-width: 900px;
  margin: 0 auto 32px; padding: 0 16px;
}

.carousel-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  aspect-ratio: 16 / 7;
}

.carousel-track {
  display: flex;
  width: 100%; height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide { min-width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5); color: white;
  border: none; width: 44px; height: 44px;
  border-radius: 50%; font-size: 18px;
  cursor: pointer; transition: background 0.3s; z-index: 2;
}
.carousel-btn:hover { background: rgba(99, 102, 241, 0.8); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  position: absolute; bottom: 12px;
  left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}

.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.carousel-dot.active { background: #6366f1; transform: scale(1.3); }

/* ========== 展示框 ========== */
.showcase-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 32px;
  width: 100%;
}

.section-title {
  font-size: 24px; font-weight: 700; color: #f1f5f9;
  margin-bottom: 20px; padding-left: 16px;
  border-left: 4px solid #6366f1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.showcase-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* 展示框图片区 */
.showcase-card-images {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.showcase-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s;
}

.showcase-card-img:hover {
  transform: scale(1.03);
}

/* 卡片内图片指示点 */
.card-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.card-dot.active {
  background: #6366f1;
  transform: scale(1.3);
}

/* 图片计数标签 */
.card-img-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.showcase-card-body { padding: 20px; }
.showcase-card-body h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #f1f5f9; }
.showcase-card-body p { font-size: 14px; color: #94a3b8; line-height: 1.6; white-space: pre-line; }

/* ========== 灯箱 ========== */
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrapper img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-arrow:hover {
  background: rgba(99, 102, 241, 0.6);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  font-weight: 500;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 16px;
  border-radius: 20px;
}

/* ========== 底部 ========== */
.site-footer {
  text-align: center;
  padding: 24px;
  color: #64748b;
  font-size: 13px;
  margin-top: auto;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .site-header h1 { font-size: 26px; }
  .site-header { padding: 32px 16px 16px; }
  .carousel-container { aspect-ratio: 16 / 9; }
  .showcase-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
  .gate-card { padding: 32px 24px; }
  .section-title { font-size: 20px; }

  .lightbox-arrow { width: 40px; height: 40px; font-size: 18px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 12px; width: 40px; height: 40px; font-size: 24px; }
}

@media (max-width: 480px) {
  .site-header h1 { font-size: 22px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 14px; }
  .showcase-grid { grid-template-columns: 1fr; }

  .lightbox-image-wrapper img {
    max-width: 95vw;
    max-height: 80vh;
  }
  .lightbox-arrow { width: 36px; height: 36px; font-size: 16px; }
  .lightbox-counter { bottom: 16px; font-size: 13px; }
}
