/* ============================================================
   作品集网站样式 —— 暗色电影感
   配色：深黑背景 + 电影金点缀 + 柔和灰白文字
   ============================================================ */

:root {
  --bg: #0b0b0d;            /* 页面背景 */
  --bg-soft: #131316;       /* 卡片背景 */
  --bg-soft2: #1a1a1e;      /* 悬停/次级背景 */
  --line: rgba(255, 255, 255, 0.08);  /* 分隔线 */
  --text: #e8e6e3;          /* 主文字 */
  --text-dim: #8a8a90;      /* 次要文字 */
  --gold: #c9a86a;          /* 电影金强调色 */
  --gold-bright: #e2c084;   /* 金色亮态 */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== 顶部导航 ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: 8px;
  display: block;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--gold);
}

/* ========== 首屏英雄区 ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(201, 168, 106, 0.08), transparent 60%),
    var(--bg);
}

.hero-inner {
  max-width: 720px;
}

.hero-eyebrow {
  color: var(--gold);
  letter-spacing: 0.35em;
  font-size: 13px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero-subtitle {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-block;
  color: var(--bg);
  background: var(--gold);
  padding: 14px 34px;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
}

/* ========== 分区通用标题 ========== */
.section-head {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.section-note {
  color: var(--text-dim);
  font-size: 14px;
}

/* ========== 作品区 ========== */
.works {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 8px 20px;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(201, 168, 106, 0.5);
}

.filter-btn.active {
  color: var(--bg);
  background: var(--gold);
  border-color: var(--gold);
}

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

/* ========== 作品卡片 ========== */
.card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(201, 168, 106, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft2);
}

.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.card:hover .card-cover {
  transform: scale(1.06);
}

/* 封面图缺失时的占位底色 */
.card-cover[src=""],
.card-cover:not([src]),
.card-cover[src="covers/"] {
  opacity: 0;
}

.card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(11, 11, 13, 0.7);
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.card-body {
  padding: 18px 20px 20px;
}

.card-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card-desc {
  color: var(--text-dim);
  font-size: 14px;
}

/* 隐藏的视频数据（不显示，只供 JS 读取） */
.card-video {
  display: none;
}

/* ========== 关于我 ========== */
.about {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.about-text {
  max-width: 720px;
  color: var(--text-dim);
  font-size: 16px;
  margin-top: 20px;
}

/* ========== 页脚 ========== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}

.footer-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.footer-contact {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 24px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* ========== 视频弹窗 ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  animation: lightboxIn 0.25s ease;
}

@keyframes lightboxIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--bg);
}

.lightbox-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
  border: none;
}

.lightbox-info {
  padding: 20px 24px;
}

.lightbox-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.lightbox-desc {
  color: var(--text-dim);
  font-size: 14px;
}

/* ========== 响应式 ========== */
@media (max-width: 640px) {
  .header-inner { padding: 0 16px; }
  .nav { gap: 18px; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding: 100px 16px 60px; }
  .works, .about { padding-left: 16px; padding-right: 16px; }
}
