/* 周星驰主题站 - 港片怀旧风格 */
:root {
  --bg: #f5f0e6;
  --card: #fffef8;
  --text: #2c2419;
  --text-muted: #6b5d4f;
  --accent: #8b6914;
  --accent-dark: #5c4a0f;
  --border: #e0d8c8;
  --shadow: rgba(92, 74, 15, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif CN", "SimSun", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* 字体引入 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&display=swap");

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* 导航 */
nav {
  text-align: center;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

nav a {
  color: var(--accent-dark);
  text-decoration: none;
  margin: 0 1rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* 首页 */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--accent-dark);
}

.hero .sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-banner {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  margin: 0 auto 2rem;
  display: block;
  object-fit: cover;
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.nav-cards a {
  display: block;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cards a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
  border-color: var(--accent);
}

/* 电影页 */
.movie-section {
  margin-bottom: 3rem;
}

.movie-section h2 {
  font-size: 1.5rem;
  color: var(--accent-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.movie-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
}

.movie-card.featured {
  padding: 1.5rem;
}

.movie-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--accent-dark);
}

.movie-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.movie-poster-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.movie-poster-wrap img {
  width: 160px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow);
  object-fit: cover;
}

.poster-placeholder {
  display: none;
  width: 160px;
  min-height: 240px;
  background: var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.poster-placeholder.show {
  display: flex;
}

.gallery-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem;
}

.movie-gallery-wrap .gallery-label {
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

.movie-gallery-wrap .gallery-label:first-of-type {
  margin-top: 0.5rem;
}

.movie-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.movie-gallery img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
}

.movie-gallery img[data-broken] {
  display: none;
}

/* 可点击展开的图片：鼠标指针 */
.container .movie-gallery img,
.container .movie-list img,
.container .hero-banner {
  cursor: pointer;
}

/* 点击展开大图（lightbox） */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-overlay.show {
  display: flex;
}
.lightbox-overlay img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  cursor: default;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.movie-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.movie-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.movie-list li:last-child {
  border-bottom: none;
}

.movie-list img {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 8px var(--shadow);
}

.movie-list .info h4 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.movie-list .info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 名言页 */
.quotes-intro {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.quote-block {
  margin-bottom: 2rem;
}

.quote-block h2 {
  font-size: 1.2rem;
  color: var(--accent-dark);
  margin-bottom: 1rem;
}

.quote-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quote-list li {
  background: var(--card);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 6px var(--shadow);
}

.quote-list .line {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.quote-list .from {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 页脚署名 */
footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

footer a {
  color: var(--accent);
}

footer .credits {
  margin-top: 1rem;
}

/* 右下角红苹果链接 */
.apple-link {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 100;
  text-decoration: none;
  transition: transform 0.2s;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
.apple-link:hover {
  transform: scale(1.15);
}

/* 响应式 */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .movie-list li {
    grid-template-columns: 60px 1fr;
  }

  .movie-list img {
    width: 60px;
    height: 90px;
  }

  .movie-poster-wrap img {
    width: 100%;
    max-width: 200px;
  }
}
