/* ==========================================================================
   极速影视 · 极速电影网 - 纯CSS样式表 (Pale Black & Gold 淡黑金奢华主题)
   ========================================================================== */

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #121319;
  --bg-card: #151620;
  --bg-card-hover: #1b1d28;
  --gold-primary: #d4af37;
  --gold-light: #f7e48b;
  --gold-dark: #aa822c;
  --gold-subtle: rgba(212, 175, 55, 0.25);
  --gold-glow: rgba(212, 175, 55, 0.15);
  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #6b7280;
  --border-subtle: #29261e;
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-gold-bright: rgba(212, 175, 55, 0.7);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 14px;
}

body {
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 自定义淡黑金滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0d0e14;
}
::-webkit-scrollbar-thumb {
  background: #2b271d;
  border-radius: 4px;
  border: 1px solid #4a3e20;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* 文本选择颜色 */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
}

/* 渐变工具类 */
.text-gold-gradient {
  background: linear-gradient(135deg, #fcedaa 0%, #d4af37 45%, #fcedaa 75%, #aa822c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gold-gradient {
  background: linear-gradient(135deg, #f8e388 0%, #d4af37 50%, #aa822c 100%);
  color: #0b0c10 !important;
  font-weight: 800;
}

.bg-gold-subtle {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
  border: 1px solid var(--border-gold);
}

.gold-glow-hover {
  transition: all 0.3s ease;
}
.gold-glow-hover:hover {
  border-color: var(--border-gold-bright) !important;
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.18) !important;
  transform: translateY(-2px);
}

/* 基础版面容器 */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* 按钮通用 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, #f8e388 0%, #d4af37 50%, #aa822c 100%);
  color: #0b0c10;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: #14151e;
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}
.btn-outline:hover {
  background: #1e202c;
  border-color: var(--gold-primary);
  color: #ffffff;
}

.btn-secondary {
  background: #1e202a;
  border: 1px solid #323545;
  color: #e5e7eb;
}
.btn-secondary:hover {
  background: #282b39;
  color: #ffffff;
}

/* 卡片样式 */
.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

/* 导航栏 */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(11, 12, 16, 0.92);
  border-bottom: 1px solid var(--border-subtle);
}

.header-content {
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #f7e48b 0%, #d4af37 50%, #8d6a1b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  color: #0b0c10;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.nav-item:hover {
  color: var(--gold-light);
  background: #161720;
}
.nav-item.active {
  color: #fcedaa;
  background: #201e17;
  border: 1px solid #524424;
}

/* 响应式移动端菜单 */
.menu-btn {
  display: none;
  background: #171822;
  border: 1px solid #333;
  color: #fff;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 5rem;
    left: 0;
    right: 0;
    background: #0f1017;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem;
    gap: 0.5rem;
  }
  .menu-btn {
    display: block;
  }
}

/* 影片网格 */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
}

.movie-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.movie-card:hover {
  border-color: var(--border-gold-bright);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15);
}

.movie-poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #07080a;
}

.movie-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.movie-card:hover .movie-poster {
  transform: scale(1.06);
}

.movie-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 18, 25, 0.95) 0%, rgba(17, 18, 25, 0.2) 40%, transparent 100%);
}

.movie-badge-top {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--gold-primary);
  color: #0b0c10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.movie-rating-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  backdrop-filter: blur(4px);
}

.movie-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--gold-primary);
  color: #0b0c10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}
.movie-card:hover .movie-play-btn {
  opacity: 1;
  transform: scale(1);
}

.movie-info {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.movie-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.3rem;
  transition: color 0.2s ease;
}
.movie-card:hover .movie-title {
  color: var(--gold-light);
}

.movie-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.movie-footer {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #232533;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

/* 浮动下载APP挂件 */
.floating-app {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.floating-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(20, 21, 30, 0.95);
  border: 1px solid #524424;
  padding: 0.5rem 0.85rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}
.floating-badge:hover {
  border-color: var(--gold-primary);
  transform: scale(1.03);
}

.floating-qr-box {
  background: #111218;
  border: 1px solid var(--border-gold);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  text-align: center;
  width: 15rem;
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.floating-app:hover .floating-qr-box,
.floating-qr-box.show {
  display: block;
}

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

/* 模态框共通 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: 56rem;
  max-height: 90vh;
  background: #101117;
  border: 1px solid var(--border-gold);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1rem 1.5rem;
  background: #14151f;
  border-bottom: 1px solid #282a38;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}
.close-btn:hover {
  color: #fff;
}
