/* CineGo — 布局系统 */

/* ── 容器 ─────────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}
@media (min-width: 768px) { .container { padding: 0 var(--sp-6); } }
@media (min-width: 1024px) { .container { padding: 0 var(--sp-8); } }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(13,15,20,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
}
.site-header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--sp-6);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
  line-height: 1;
}
.site-logo-sub {
  font-size: var(--text-xs);
  color: var(--text-3);
  letter-spacing: 0.5px;
}

/* 搜索框 */
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 40px;
  padding: 0 var(--sp-4) 0 var(--sp-10);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-1);
  font-size: var(--text-sm);
  transition: border-color var(--transition), background var(--transition);
}
.header-search input::placeholder { color: var(--text-3); }
.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elevated);
}
.header-search-icon {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
  width: 18px;
  height: 18px;
}
.header-search-btn {
  position: absolute;
  right: var(--sp-2);
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  padding: 0 var(--sp-3);
  background: var(--accent);
  color: #000;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  transition: background var(--transition);
}
.header-search-btn:hover { background: var(--accent-dim); }

/* 分类导航 */
.site-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-dim);
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav .container {
  display: flex;
  align-items: center;
  height: 44px;
  gap: 0;
}
.nav-item {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-item:hover { color: var(--text-1); }
.nav-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: var(--sp-16);
  padding: var(--sp-10) 0;
  border-top: 1px solid var(--border-dim);
  background: var(--bg-card);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
}
.footer-logo { font-size: var(--text-xl); font-weight: 800; color: var(--accent); }
.footer-tagline { font-size: var(--text-sm); color: var(--text-3); }
.footer-links {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-3);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text-2); }
.footer-copy { font-size: var(--text-xs); color: var(--text-3); }

/* ── 页面主体 ─────────────────────────────────────────────────────────────── */
.page-main {
  min-height: calc(100vh - var(--header-h) - 44px);
  padding: var(--sp-6) 0 var(--sp-12);
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.section { margin-bottom: var(--sp-10); }
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}
.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.2em;
  background: var(--accent);
  border-radius: 2px;
}
.section-more {
  font-size: var(--text-sm);
  color: var(--text-3);
  transition: color var(--transition);
}
.section-more:hover { color: var(--accent); }

/* ── 电影网格 ─────────────────────────────────────────────────────────────── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (min-width: 480px) { .movie-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .movie-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); } }
@media (min-width: 1024px) { .movie-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1280px) { .movie-grid { grid-template-columns: repeat(6, 1fr); } }

/* ── 水平滚动行 ───────────────────────────────────────────────────────────── */
.scroll-row {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: var(--sp-2);
  -webkit-overflow-scrolling: touch;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row .movie-card { flex: 0 0 160px; }
@media (min-width: 768px) { .scroll-row .movie-card { flex: 0 0 180px; } }

/* ── 分页 ─────────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
  flex-wrap: wrap;
}
.pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-2);
  font-size: var(--text-sm);
  transition: background var(--transition), color var(--transition);
}
.pag-btn:hover { background: var(--bg-elevated); color: var(--text-1); }
.pag-btn.pag-active {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
.pag-ellipsis { color: var(--text-3); padding: 0 var(--sp-1); }

/* ── 页面标题栏 ───────────────────────────────────────────────────────────── */
.page-hero {
  padding: var(--sp-8) 0 var(--sp-6);
  border-bottom: 1px solid var(--border-dim);
  margin-bottom: var(--sp-6);
}
.page-hero-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--text-1);
}
.page-hero-sub { margin-top: var(--sp-2); font-size: var(--text-sm); color: var(--text-3); }
