/* =========================================================
   GreenFilm 前台样式 — 绿色清新主题
   ========================================================= */
:root {
  --gf-primary: #16a085;
  --gf-primary-dark: #117a65;
  --gf-primary-light: #2ecc71;
  --gf-accent: #a8e063;
  --gf-bg: #f2f8f4;
  --gf-card: #ffffff;
  --gf-text: #2c3e50;
  --gf-text-muted: #7f8c8d;
  --gf-radius: 16px;
  --gf-shadow: 0 6px 24px rgba(22, 160, 133, 0.10);
  --gf-shadow-hover: 0 12px 32px rgba(22, 160, 133, 0.18);
  --gf-grad: linear-gradient(135deg, #16a085 0%, #2ecc71 100%);
  --gf-grad-soft: linear-gradient(135deg, #e8f8f0 0%, #f4fcf6 100%);
}

* { -webkit-font-smoothing: antialiased; }

body {
  background-color: var(--gf-bg);
  background-image: radial-gradient(circle at 15% 8%, rgba(46, 204, 113, 0.08) 0, transparent 32%),
                    radial-gradient(circle at 85% 20%, rgba(22, 160, 133, 0.07) 0, transparent 30%),
                    radial-gradient(circle at 50% 100%, rgba(168, 224, 99, 0.06) 0, transparent 35%);
  background-attachment: fixed;
  color: var(--gf-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: var(--gf-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gf-primary-dark); }

/* ---------- 导航栏 ---------- */
.gf-navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22, 160, 133, 0.12);
  box-shadow: 0 2px 16px rgba(22, 160, 133, 0.06);
}

.gf-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.35rem; font-weight: 800;
  color: var(--gf-primary-dark);
  letter-spacing: .5px;
}
.gf-brand:hover { color: var(--gf-primary); }
.gf-brand-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--gf-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(22, 160, 133, 0.35);
}

.gf-nav-link {
  color: var(--gf-text); font-weight: 500; padding: .5rem .8rem !important;
  border-radius: 10px; transition: all .2s;
}
.gf-nav-link:hover, .gf-nav-link.active {
  color: var(--gf-primary-dark);
  background: rgba(22, 160, 133, 0.10);
}

.gf-search-box { position: relative; }
.gf-search-input {
  border: 1.5px solid #e2efe7; border-radius: 50px;
  padding: .45rem 2.4rem .45rem 1.1rem;
  background: #f7fcf9; min-width: 230px;
  transition: all .25s;
}
.gf-search-input:focus {
  border-color: var(--gf-primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 160, 133, 0.12);
}
.gf-search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: var(--gf-grad); color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: transform .2s;
}
.gf-search-btn:hover { transform: translateY(-50%) scale(1.08); }

/* 语言切换 */
.gf-lang-btn {
  border: 1.5px solid #d9eee2 !important; border-radius: 50px !important;
  color: var(--gf-primary-dark) !important; background: #f7fcf9 !important;
  font-weight: 600; font-size: .85rem; padding: .3rem .9rem !important;
}
.gf-lang-btn:hover { background: var(--gf-grad) !important; color: #fff !important; border-color: var(--gf-primary) !important; }
.gf-lang-menu { border: 0; border-radius: 12px; box-shadow: var(--gf-shadow); padding: .4rem; }
.gf-lang-item { border-radius: 8px; padding: .45rem .9rem; font-size: .9rem; }
.gf-lang-item:hover, .gf-lang-item.active { background: rgba(22, 160, 133, 0.10); color: var(--gf-primary-dark); }
.gf-lang-item.active { font-weight: 700; }

/* 轻量提示 */
.gf-toast {
  position: fixed; left: 50%; top: 72px; transform: translate(-50%, -16px);
  background: rgba(30, 51, 44, .92); color: #fff; padding: .62rem 1.3rem;
  border-radius: 50px; font-size: .88rem; z-index: 2000; opacity: 0;
  transition: all .3s; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.gf-toast-ok { background: linear-gradient(135deg, #1fa263, #21c97e); }
.gf-toast-show { opacity: 1; transform: translate(-50%, 0); }
.gf-captcha-q {
  background: #eefaf3; border: 1px dashed #8fd3b0; color: var(--gf-primary-dark);
  border-radius: 8px; padding: .38rem .8rem; font-size: .9rem; font-weight: 700;
  letter-spacing: .05em; white-space: nowrap;
}
.gf-captcha-btn { border-radius: 50px; }
/* 验证码图片 */
.gf-captcha-img {
  height: 40px; width: 120px; border-radius: 8px; cursor: pointer;
  border: 1px solid #8fd3b0; background: #eefaf3;
}
/* 页脚上下间距收紧（仅页脚作用域） */
.gf-footer .py-5 { padding-top: 3rem !important; padding-bottom: 1rem !important; }
.gf-footer .py-3 { padding-top: 0 !important; padding-bottom: 0 !important; }
/* 页脚联系我们：允许内容优雅断行，不缩小字号 */
.gf-footer-contact li { overflow-wrap: anywhere; }
/* 小屏：联系我们列加宽（相当于整体左移让位），行内容不换行 */
@media (max-width: 575.98px) {
  .gf-footer-links-col { flex: 0 0 auto; width: 38%; }
  .gf-footer-contact-col { flex: 0 0 auto; width: 62%; }
  .gf-footer-contact li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- 轮播 ---------- */
.gf-banner { margin-top: -1px; }
.gf-banner .carousel-item { position: relative; }
.gf-banner-img {
  height: 420px; object-fit: cover; width: 100%;
}
.gf-banner .carousel-indicators { z-index: 4; }
.gf-banner .carousel-indicators [data-bs-target] {
  width: 26px; height: 5px; border-radius: 4px; background: rgba(255,255,255,.7);
}
.gf-banner .carousel-control-prev, .gf-banner .carousel-control-next { z-index: 4; width: 8%; }
.gf-banner-title-wrap { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.gf-banner-title-ct { position: relative; height: 100%; }
.gf-banner-title {
  position: absolute; left: 37px; bottom: 13px;
  max-width: 70%; color: #fff; font-size: 1.45rem; font-weight: 700;
  line-height: 1.3; letter-spacing: .5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 0 4px rgba(0,0,0,.35);
}

/* ---------- 区块 ---------- */
.gf-section { padding: 3rem 0; }
.gf-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.gf-section-title {
  display: flex; align-items: center; gap: .7rem;
  font-weight: 800; font-size: 1.45rem; color: var(--gf-text); margin: 0;
}
.gf-section-title::before {
  content: ""; width: 6px; height: 26px; border-radius: 4px; background: var(--gf-grad);
}
.gf-section-more {
  font-size: .9rem; color: var(--gf-text-muted); font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.gf-section-more:hover { color: var(--gf-primary); }

/* ---------- 卡片 ---------- */
.gf-card {
  background: var(--gf-card); border: 1px solid rgba(22,160,133,0.08);
  border-radius: var(--gf-radius); box-shadow: var(--gf-shadow);
  transition: transform .25s, box-shadow .25s;
}
.gf-card:hover { transform: translateY(-5px); box-shadow: var(--gf-shadow-hover); }

/* 电影卡片 */
.gf-movie { overflow: hidden; height: 100%; display: block; color: var(--gf-text); }
.gf-movie:hover { color: var(--gf-text); }
.gf-movie-cover {
  position: relative; overflow: hidden; aspect-ratio: 5 / 7; background: var(--gf-grad-soft);
}
.gf-movie-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.gf-movie:hover .gf-movie-cover img { transform: scale(1.07); }
.gf-movie-score {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  color: #ffd76a; font-weight: 800; font-size: .85rem;
  padding: .12rem .55rem; border-radius: 50px;
}
.gf-movie-year {
  position: absolute; left: 10px; top: 10px;
  background: rgba(255,255,255,0.88); color: var(--gf-text);
  font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 50px;
}
.gf-movie-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(22,160,133,0.0); opacity: 0; transition: all .3s;
}
.gf-movie:hover .gf-movie-play { background: rgba(22,160,133,0.35); opacity: 1; }
.gf-movie-play i {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--gf-primary);
  font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transform: scale(.8); transition: transform .3s;
}
.gf-movie:hover .gf-movie-play i { transform: scale(1); }
.gf-movie-body { padding: .8rem 1rem .9rem; }
.gf-movie-title {
  font-weight: 700; font-size: .98rem; margin: 0 0 .25rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gf-movie-meta { color: var(--gf-text-muted); font-size: .78rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- 首页统计 ---------- */
.gf-stats { border-radius: 20px; overflow: hidden; background: var(--gf-grad); color: #fff; }
.gf-stats .stat { padding: 1.8rem 1rem; text-align: center; border-left: 1px solid rgba(255,255,255,.18); }
.gf-stats .stat:first-child { border-left: 0; }
.gf-stats .stat i { font-size: 1.6rem; opacity: .9; }
.gf-stats .stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.gf-stats .stat .label { font-size: .85rem; opacity: .85; }

/* ---------- 分类导航 ---------- */
.gf-cat-chip {
  display: flex; align-items: center; gap: .6rem;
  padding: .95rem 1.2rem; border-radius: 14px; background: #fff;
  border: 1px solid rgba(22,160,133,0.10); box-shadow: var(--gf-shadow);
  transition: all .22s; color: var(--gf-text); height: 100%;
}
.gf-cat-chip:hover { transform: translateY(-3px); box-shadow: var(--gf-shadow-hover); color: var(--gf-primary-dark); }
.gf-cat-chip .icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--gf-grad-soft);
  color: var(--gf-primary); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.gf-cat-chip .name { font-weight: 700; font-size: .98rem; }
.gf-cat-chip .count { font-size: .76rem; color: var(--gf-text-muted); }

/* ---------- 筛选条 ---------- */
.gf-filter {
  background: #fff; border-radius: var(--gf-radius); box-shadow: var(--gf-shadow);
  border: 1px solid rgba(22,160,133,0.08); padding: 1.2rem 1.4rem; margin-bottom: 1.6rem;
}
.gf-filter-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.gf-filter-row + .gf-filter-row { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed #e6f0ea; }
.gf-filter-label {
  flex-shrink: 0; font-weight: 700; font-size: .9rem; color: #22333b;
  min-width: 4.4em; display: flex; align-items: center; gap: .3rem;
}
.gf-filter-label i { color: var(--gf-primary); font-size: .95rem; }
.gf-filter-opts {
  display: grid; flex: 1; min-width: 0;
  grid-template-columns: repeat(auto-fill, 5.2rem);
  gap: .65rem .45rem;
}
.gf-filter-opt {
  padding: .3rem .5rem; border-radius: 50px; font-size: .88rem; color: #3c4d54;
  border: 1px solid #ddeae3; background: #fbfdfc; line-height: 1.4;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: all .15s ease;
}
.gf-filter-opt:hover { color: var(--gf-primary-dark); border-color: var(--gf-primary); background: #f2faf5; }
.gf-filter-opt.active {
  background: var(--gf-grad); color: #fff; font-weight: 600;
  border-color: transparent; box-shadow: 0 3px 10px rgba(22,160,133,0.3);
}
/* 年份行：单行溢出隐藏 + 鼠标拖拽横向滚动 */
.gf-drag-scroll {
  display: flex; flex-wrap: nowrap; flex: 1; min-width: 0;
  overflow-x: auto; overflow-y: hidden; gap: .65rem .45rem;
  padding-bottom: .2rem; padding-right: .2rem;
  cursor: grab; user-select: none; -webkit-user-select: none;
  scrollbar-width: none; -ms-overflow-style: none;
}
.gf-drag-scroll::-webkit-scrollbar { display: none; height: 0; }
.gf-drag-scroll:active { cursor: grabbing; }
.gf-drag-scroll .gf-filter-opt { flex-shrink: 0; }
.gf-sort-tabs { border-bottom: 0; gap: .3rem; }
.gf-sort-tabs .nav-link {
  border: 0; border-radius: 50px !important; color: var(--gf-text);
  padding: .3rem 1rem; font-size: .9rem;
}
.gf-sort-tabs .nav-link.active { background: var(--gf-grad); color: #fff; font-weight: 600; }

/* ---------- 详情页 ---------- */
.gf-detail-hero {
  background: linear-gradient(120deg, #0d5c4a 0%, #16a085 60%, #27ae60 100%);
  padding: 2.6rem 0; color: #fff;
}
.gf-detail-cover {
  width: 100%; max-width: 260px; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35); aspect-ratio: 5/7; object-fit: cover;
}
.gf-detail-info h1 { font-weight: 800; font-size: 2rem; }
.gf-detail-info .alias { opacity: .75; font-size: .95rem; }
.gf-detail-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 1.2rem; }
.gf-detail-tags .tag {
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28);
  padding: .22rem .8rem; border-radius: 50px; font-size: .8rem;
}
.gf-detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; }
.gf-meta-pair { grid-template-columns: repeat(2, minmax(90px, 100px)); }
.gf-meta-info { grid-template-columns: repeat(2, minmax(100px, 110px)); flex: 0 0 auto; }
.gf-meta-full { grid-template-columns: 1fr; flex: 1 1 0; min-width: 0; }
.gf-meta-single { background: rgba(255,255,255,0.10); border-radius: 12px; padding: .45rem .8rem; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.gf-meta-single .k { font-size: .72rem; opacity: .72; text-transform: uppercase; letter-spacing: .5px; }
.gf-meta-single .v { font-weight: 700; font-size: .95rem; margin-top: .15rem; }
.gf-meta-auto { width: max-content; max-width: 480px; }
.gf-detail-meta .item { background: rgba(255,255,255,0.10); border-radius: 12px; padding: .7rem .9rem; }
.gf-detail-meta .item.compact { padding: .45rem .8rem; }
.gf-detail-meta .item .k { font-size: .72rem; opacity: .72; text-transform: uppercase; letter-spacing: .5px; }
.gf-detail-meta .item .v { font-weight: 700; font-size: .95rem; margin-top: .15rem; }
.gf-detail-meta .item .v.score { color: #ffd76a; font-size: 1.2rem; }
.gf-play-btn {
  background: #fff; color: var(--gf-primary-dark); font-weight: 800;
  border: 0; border-radius: 50px; padding: .45rem 1.15rem; font-size: .9rem;
  box-shadow: 0 8px 22px rgba(0,0,0,.22); transition: all .22s;
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
}
.gf-play-btn:hover { transform: translateY(-2px); color: var(--gf-primary); }
.gf-detail-panel { background: #fff; border-radius: var(--gf-radius); box-shadow: var(--gf-shadow); padding: 1.6rem; }
.gf-detail-panel h2 {
  font-size: 1.15rem; font-weight: 800; margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.gf-detail-panel h2::before {
  content: ""; width: 5px; height: 20px; border-radius: 3px; background: var(--gf-grad);
}
.gf-synopsis { color: #50636b; line-height: 1.9; font-size: .98rem; white-space: pre-line; }

/* ---------- 播放页 ---------- */
.gf-player-wrap { border-radius: 18px; overflow: hidden; box-shadow: var(--gf-shadow); background: #000; }
.gf-player-wrap iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; min-height: 420px; }
.gf-player { width: 100%; aspect-ratio: 16/9; display: block; background: #000; min-height: 420px; outline: none; }
.gf-player-tip { background: #fff; border-radius: 12px; padding: .9rem 1.2rem; font-size: .88rem; color: var(--gf-text-muted); box-shadow: var(--gf-shadow); }
.gf-ep-panel { background: #fff; border-radius: 16px; box-shadow: var(--gf-shadow); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.gf-ep-label { font-weight: 700; color: #22333b; font-size: .92rem; white-space: nowrap; min-width: 64px; }
.gf-ep-btn {
  border: 1px solid #d8e6de; background: #fff; color: #3c4d54;
  font-size: .85rem; padding: .32rem .8rem; border-radius: 8px; line-height: 1.2;
  transition: all .15s ease;
}
.gf-ep-btn:hover { border-color: var(--gf-primary); color: var(--gf-primary); background: #f2faf5; }
.gf-ep-btn.active { background: var(--gf-primary); border-color: var(--gf-primary); color: #fff; font-weight: 600; }
.gf-line-btn {
  border: 1px solid #d8e6de; background: #fff; color: #3c4d54;
  font-size: .85rem; padding: .32rem .85rem; border-radius: 20px; line-height: 1.2;
  transition: all .15s ease;
}
.gf-line-btn:hover { border-color: var(--gf-primary); color: var(--gf-primary); }
.gf-line-btn.active { background: #e8f6ee; border-color: var(--gf-primary); color: var(--gf-primary); font-weight: 600; }

/* ---------- 搜索空态 / 404 ---------- */
.gf-empty {
  text-align: center; padding: 5rem 1rem;
}
.gf-empty i { font-size: 4rem; color: #c8e6d5; }
.gf-empty h3 { font-weight: 800; margin: 1rem 0 .4rem; }
.gf-empty p { color: var(--gf-text-muted); }

/* ---------- 页脚 ---------- */
.gf-footer {
  background: #0f3d33; color: rgba(255,255,255,.72); margin-top: 3rem;
}
.gf-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; letter-spacing: .5px; }
.gf-footer a { color: rgba(255,255,255,.72); }
.gf-footer a:hover { color: #fff; }
.gf-footer .brand { color: #fff; font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.gf-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1rem 0; font-size: .82rem; color: rgba(255,255,255,.5); }
.gf-footer-links { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .82rem; color: rgba(255,255,255,.45); }
.gf-footer-links-label { color: rgba(255,255,255,.5); }
.gf-footer-links a { color: rgba(255,255,255,.45); text-decoration: none; }
.gf-footer-links a:hover { color: #fff; }
.gf-ad-banner { border-radius: 14px; overflow: hidden; box-shadow: 0 4px 18px rgba(22,160,133,.10); }
.gf-ad-wrap { border-radius: 14px; }
.gf-ad-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem; padding: .22rem .6rem; border-radius: 20px; backdrop-filter: blur(4px); z-index: 2; }
/* 播放广告覆盖层（盖住播放器） */
.gf-ad-overlay { position: absolute; inset: 0; z-index: 5; background: #000; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gf-ad-overlay .gf-ad-overlay-link { display: block; width: 100%; height: 100%; }
.gf-ad-overlay img { width: 100%; height: 100%; object-fit: cover; }
.gf-ad-countdown { position: absolute; top: 12px; right: 14px; z-index: 6; color: #fff; background: rgba(0,0,0,.65); padding: .28rem .7rem; border-radius: 20px; font-size: .8rem; backdrop-filter: blur(4px); }
.gf-ad-skip { position: absolute; bottom: 14px; right: 14px; z-index: 6; background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(4px); }
.gf-ad-skip:hover { background: rgba(0,0,0,.75); color: #fff; }

/* ---------- 分页 ---------- */
.pagination { gap: .35rem; flex-wrap: wrap; margin-bottom: 0; }
.pagination li { list-style: none; }
.pagination li a,
.pagination li span {
  display: block; padding: .42rem .9rem; border-radius: 10px;
  background: #fff; color: var(--gf-primary);
  border: 1px solid rgba(22,160,133,0.16);
  font-size: .9rem; font-weight: 500; text-decoration: none;
  transition: all .2s;
}
.pagination li a:hover { background: rgba(22,160,133,0.10); color: var(--gf-primary-dark); }
.pagination li.active span {
  background: var(--gf-grad); color: #fff; border-color: transparent;
  font-weight: 700; box-shadow: 0 4px 12px rgba(22,160,133,0.3);
}
.pagination li.disabled span { opacity: .45; cursor: not-allowed; background: #f4f9f6; }

/* ---------- 响应式 ---------- */
@media (max-width: 991.98px) {
  .gf-search-input { min-width: 0; width: 100%; }
  .gf-banner-img { height: 300px; }
  .gf-banner-title { font-size: 1.15rem; bottom: 18px; }
  .gf-detail-cover { max-width: 200px; }
  .gf-detail-hero { padding: 1.8rem 0; }
}
@media (max-width: 575.98px) {
  .gf-banner-img { height: 240px; }
  .gf-banner-title { font-size: .95rem; bottom: 12px; max-width: 82%; }
  .gf-stats .stat { padding: 1.2rem .5rem; }
  .gf-stats .stat .num { font-size: 1.4rem; }
}
