/* ============ 情侣影视 · Apple 风设计系统 ============ */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --panel: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --hairline: rgba(0, 0, 0, 0.08);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --grad: linear-gradient(100deg, #0071e3 0%, #7d55ff 55%, #f2416b 100%);
  --radius: 18px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06), 0 12px 36px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(0, 113, 227, 0.18); }

/* ============ 导航 ============ */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 clamp(20px, 5vw, 48px);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.8);
  border-bottom: 1px solid var(--hairline);
}
.nav .logo { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 600; letter-spacing: 0.2px; }
.nav .logo svg { width: 18px; height: 18px; display: block; }
.nav .links { display: flex; gap: 30px; font-size: 13.5px; color: var(--text-2); }
.nav .links a { transition: color 0.15s; }
.nav .links a:hover { color: var(--text); }
.nav .links a.active { color: var(--text); font-weight: 500; }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 24px; border: none; border-radius: 980px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.1px; cursor: pointer;
  color: #fff; background: var(--blue);
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.btn:hover { background: var(--blue-hover); }
.btn:active { transform: scale(0.98); }
.btn.ghost {
  background: rgba(0, 0, 0, 0.05); color: var(--text);
}
.btn.ghost:hover { background: rgba(0, 0, 0, 0.09); }
.btn.small { padding: 7px 15px; font-size: 13px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.input {
  width: 100%; padding: 12px 16px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent; border-radius: 12px;
  color: var(--text); font-size: 15px; outline: none;
  transition: background 0.15s, border 0.15s, box-shadow 0.15s;
}
.input:focus {
  background: var(--surface); border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.input::placeholder { color: var(--text-3); }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ============ 首页 ============ */
.hero {
  max-width: 980px; margin: 0 auto; text-align: center;
  padding: clamp(64px, 11vh, 130px) 24px 24px;
}
.hero .eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 2px;
  color: var(--text-3); text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 72px); font-weight: 700; line-height: 1.08;
  letter-spacing: -0.02em;
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  margin: 22px auto 0; max-width: 560px;
  color: var(--text-2); font-size: clamp(16px, 2vw, 19px); line-height: 1.65;
  font-weight: 400;
}
.hero-actions {
  display: flex; gap: 22px; justify-content: center; flex-wrap: wrap;
  margin-top: 52px;
}
.action-card {
  width: 340px; padding: 30px 28px; text-align: left;
  background: var(--surface); border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.25s;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.action-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.action-card p { color: var(--text-2); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.action-card .row { display: flex; gap: 10px; }
.action-card .row .input { flex: 1; min-width: 0; }

/* 功能区 */
.features {
  max-width: 1080px; margin: 88px auto 96px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px;
}
.feature {
  padding: 30px 26px; border-radius: 22px;
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.feature .ico {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--blue);
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h4 { margin: 18px 0 8px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.feature p { color: var(--text-2); font-size: 14px; line-height: 1.65; }

.footer {
  text-align: center; padding: 40px 24px 48px; color: var(--text-3);
  font-size: 12.5px; border-top: 1px solid var(--hairline);
}

/* ============ 影库 ============ */
.lib-wrap { max-width: 1200px; margin: 0 auto; padding: 44px 24px 90px; }
.lib-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.lib-head h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.lib-head .search { flex: 1; min-width: 220px; max-width: 340px; margin-left: auto; border-radius: 980px; padding: 10px 18px; font-size: 14px; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.chip {
  padding: 8px 18px; border-radius: 980px; font-size: 13.5px; cursor: pointer;
  background: transparent; border: 1px solid var(--hairline);
  color: var(--text-2); transition: all 0.15s; font-weight: 500;
}
.chip:hover { color: var(--text); border-color: rgba(0, 0, 0, 0.2); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 22px; }
.movie-card {
  border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.25s;
  position: relative;
}
.movie-card:hover { transform: translateY(-4px) scale(1.015); box-shadow: var(--shadow-md); }
.poster {
  aspect-ratio: 2 / 2.85; width: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center;
  color: #fff;
}
.poster .ph .big { font-size: 50px; font-weight: 700; opacity: 0.95; letter-spacing: -0.02em; }
.poster .ph .nm { font-size: 12.5px; font-weight: 500; opacity: 0.9; line-height: 1.5; }
.movie-card .info { padding: 12px 13px 14px; }
.movie-card .info .t { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-card .info .m { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.movie-card .watch {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  opacity: 0; transition: opacity 0.2s; padding: 18px; text-align: center;
}
.movie-card:hover .watch { opacity: 1; }
.movie-card .watch .d { font-size: 12.5px; color: var(--text-2); line-height: 1.7; max-height: 128px; overflow: hidden; }
.empty-tip { color: var(--text-2); text-align: center; padding: 70px 0; font-size: 15px; line-height: 2; }
.empty-tip code { background: var(--panel); padding: 2px 8px; border-radius: 6px; font-size: 13px; }

/* ============ 放映厅 ============ */
.room-layout { display: grid; grid-template-columns: 1fr 332px; height: calc(100vh - 52px); }
@media (max-width: 900px) {
  .room-layout { grid-template-columns: 1fr; height: auto; }
  .side { height: 520px; }
}
.stage { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.stage-top {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid var(--hairline); flex-wrap: wrap; background: var(--surface);
}
.room-code {
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-weight: 600; letter-spacing: 3px; font-size: 14px;
  background: var(--panel); padding: 7px 14px; border-radius: 10px;
  cursor: pointer; transition: background 0.15s;
}
.room-code:hover { background: #ebebed; }
.partner-badge { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.partner-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #c7c7cc; }
.partner-badge .dot.on { background: #30d158; }
.movie-title-bar {
  font-size: 13px; color: var(--text-3); margin-left: auto; max-width: 300px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.player-box { position: relative; flex: 1; background: #000; min-height: 320px; overflow: hidden; }
.player-box video { width: 100%; height: 100%; display: block; background: #000; }
.no-movie {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; color: #98989d;
  font-size: 15px;
}
.no-movie .ico { font-size: 44px; opacity: 0.85; }

/* 播放控制条（深色浮层，Apple TV 风格） */
.controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 34px 18px 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  opacity: 0; transition: opacity 0.25s;
}
.player-box:hover .controls, .controls.pinned { opacity: 1; }
.progress {
  width: 100%; height: 4px; border-radius: 2px; cursor: pointer;
  background: rgba(255, 255, 255, 0.28); margin-bottom: 12px;
  transition: transform 0.15s;
}
.progress:hover { transform: scaleY(1.6); }
.progress .fill { height: 100%; border-radius: 2px; background: #fff; width: 0%; position: relative; }
.progress .fill::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.ctrl-row { display: flex; align-items: center; gap: 14px; }
.ctrl-btn {
  background: none; border: none; color: #fff; font-size: 18px; cursor: pointer;
  padding: 5px 7px; border-radius: 8px; line-height: 1; transition: background 0.15s;
}
.ctrl-btn:hover { background: rgba(255, 255, 255, 0.16); }
.time-label { font-size: 12px; color: rgba(255, 255, 255, 0.85); font-family: "SF Mono", ui-monospace, Consolas, monospace; }
.vol-slider, .pvol-slider { accent-color: #fff; cursor: pointer; }
.pvol-slider { accent-color: var(--blue); }
.vol-slider { width: 78px; }
.rate-select {
  background: rgba(255, 255, 255, 0.16); color: #fff; border: none;
  border-radius: 8px; padding: 5px 8px; font-size: 12px; cursor: pointer;
}
.rate-select option { background: #2c2c2e; }
.spacer { flex: 1; }

/* 同步提示浮层 */
.sync-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}
.sync-overlay .btn { font-size: 16px; padding: 14px 32px; background: rgba(255,255,255,0.95); color: var(--text); }
.sync-overlay .btn:hover { background: #fff; }
.toast {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(40, 40, 42, 0.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; padding: 9px 20px; border-radius: 980px; font-size: 13px; z-index: 30;
  animation: fadeSlide 0.25s ease; white-space: nowrap; font-weight: 500;
}
@keyframes fadeSlide { from { opacity: 0; transform: translate(-50%, -8px); } }

/* 表情弹幕 */
.emoji-float {
  position: absolute; bottom: 80px; font-size: 38px; z-index: 15;
  animation: emojiUp 2.6s ease-out forwards; pointer-events: none;
}
@keyframes emojiUp {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 1; transform: translateY(-30px) scale(1.12); }
  100% { transform: translateY(-320px) scale(1); opacity: 0; }
}

/* ============ 侧栏 ============ */
.side {
  border-left: 1px solid var(--hairline);
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface);
}
.voice-panel { padding: 18px; border-bottom: 1px solid var(--hairline); }
.voice-panel h4, .chat-box h4 {
  font-size: 12px; color: var(--text-3); letter-spacing: 1.2px; font-weight: 600;
  text-transform: uppercase;
}
.voice-panel h4 { margin-bottom: 14px; }
.voice-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-status { font-size: 12.5px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }
.voice-status.on { color: #248a3d; }
.pvol-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.pvol-slider { flex: 1; }

.chat-box { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-box h4 { padding: 16px 18px 10px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 4px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; }
.msg .who { font-size: 11px; color: var(--text-3); margin-bottom: 4px; padding: 0 4px; }
.msg .bubble {
  padding: 9px 14px; border-radius: 18px; font-size: 14px; line-height: 1.5;
  background: #e9e9eb; color: var(--text); word-break: break-word;
  border-bottom-left-radius: 5px;
}
.msg.self { align-self: flex-end; text-align: right; }
.msg.self .bubble {
  background: var(--blue); color: #fff;
  border-bottom-left-radius: 18px; border-bottom-right-radius: 5px; text-align: left;
}
.msg.sys { align-self: center; font-size: 12px; color: var(--text-3); }
.emoji-row { display: flex; gap: 6px; padding: 10px 16px 0; }
.emoji-row button {
  background: var(--panel); border: none;
  border-radius: 10px; font-size: 17px; padding: 6px 9px; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.emoji-row button:hover { transform: scale(1.15); background: #ebebed; }
.chat-input-row { display: flex; gap: 8px; padding: 12px 16px 18px; }
.chat-input-row .input { padding: 9px 15px; font-size: 14px; border-radius: 980px; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.modal {
  width: min(720px, 92vw); max-height: 84vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: modalIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
.modal.small { width: min(400px, 92vw); }
.modal-head { display: flex; align-items: center; padding: 22px 26px 0; gap: 16px; }
.modal-head h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.modal-head .x {
  margin-left: auto; background: var(--panel); border: none; color: var(--text-2);
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 16px; cursor: pointer; line-height: 1; transition: background 0.15s;
}
.modal-head .x:hover { background: #ebebed; color: var(--text); }
.modal-tabs { display: flex; gap: 22px; padding: 16px 26px 0; border-bottom: 1px solid var(--hairline); }
.modal-tabs button {
  background: none; border: none; color: var(--text-3); font-size: 14px; font-weight: 500;
  padding: 8px 2px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.modal-tabs button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.modal-body { padding: 20px 26px 26px; overflow-y: auto; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 14px; margin-top: 16px; }
.pick-card {
  cursor: pointer; border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.pick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pick-card .poster { aspect-ratio: 2/2.7; }
.pick-card .poster .ph .big { font-size: 28px; }
.pick-card .poster .ph .nm { font-size: 11px; }
.pick-card .t { font-size: 12px; font-weight: 500; padding: 8px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-zone {
  border: 1.5px dashed rgba(0, 0, 0, 0.18); border-radius: 16px;
  padding: 44px 20px; text-align: center; cursor: pointer; color: var(--text-2);
  transition: border 0.15s, background 0.15s; font-size: 14px; line-height: 2;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--blue); background: rgba(0, 113, 227, 0.04); }
.upload-zone small { color: var(--text-3); }
.upload-bar { height: 6px; border-radius: 3px; background: var(--panel); margin-top: 18px; overflow: hidden; display: none; }
.upload-bar .fill { height: 100%; background: var(--blue); width: 0%; transition: width 0.2s; }
.hint { font-size: 12.5px; color: var(--text-3); line-height: 1.8; margin-top: 14px; }
.field-label { font-size: 13px; color: var(--text-2); margin: 16px 0 8px; font-weight: 500; }
