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

:root {
  --primary: #ff4757;
  --primary-dark: #e84118;
  --bg: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-hover: #252540;
  --text: #f1f1f1;
  --text-muted: #9a9ab0;
  --border: #2a2a40;
  --manju: #a55eea;
  --zhenren: #0fb9b1;
  --success: #2ed573;
  --danger: #ff4757;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ========== 头部导航 ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #ffa502);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--bg-hover);
}
.search-box {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.search-box input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  width: 240px;
  outline: none;
  font-size: 14px;
}
.search-box input:focus { border-color: var(--primary); }
.search-box button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.search-box button:hover { background: var(--primary-dark); }

/* ========== 分类标签 ========== */
.category-bar {
  padding: 20px 40px 0;
  display: flex;
  gap: 12px;
}
.cat-tag {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.cat-tag:hover { border-color: var(--primary); }
.cat-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.cat-tag.manju.active { background: var(--manju); border-color: var(--manju); }
.cat-tag.zhenren.active { background: var(--zhenren); border-color: var(--zhenren); }

/* ========== 短剧网格 ========== */
.container { padding: 24px 40px 60px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(255, 71, 87, 0.2);
}
.card-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--bg-hover);
  position: relative;
  overflow: hidden;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-cover .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-muted);
}
.card-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: white;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.card-info { padding: 10px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

/* ========== 播放页 ========== */
.watch-page { max-width: 1100px; margin: 0 auto; padding: 30px 40px 60px; }
.video-player {
  width: 100%;
  background: #000;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-player video { width: 100%; height: 100%; }
.video-locked {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  gap: 12px;
}
.video-locked .lock-icon { font-size: 56px; }
.video-locked .lock-title { font-size: 18px; font-weight: 600; color: var(--text); }
.video-locked .lock-desc { font-size: 14px; color: var(--text-muted); max-width: 400px; text-align: center; line-height: 1.6; }
.video-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-direction: column;
  gap: 10px;
}
.watch-info { margin-top: 20px; }
.watch-info h1 { font-size: 26px; margin-bottom: 10px; }
.watch-meta {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.watch-desc {
  line-height: 1.7;
  color: #c5c5d5;
  background: var(--bg-card);
  padding: 16px;
  border-radius: 8px;
}

/* ========== 送审任务面板 ========== */
.review-task {
  margin-top: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}
.review-task h2 {
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-task .task-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.6;
}
.review-ref {
  margin-bottom: 16px;
}
.review-ref-title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.review-ref-imgs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.review-ref-imgs img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.comment-areas {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.comment-area {
  position: relative;
  background: var(--bg-hover);
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.comment-area > input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.comment-area:hover { border-color: var(--primary); }
.comment-area.filled { border-style: solid; border-color: var(--success); }
.comment-area .idx { font-size: 12px; color: var(--text-muted); }
.comment-area .ph-icon { font-size: 24px; }
.comment-area .ph-txt { font-size: 11px; color: var(--text-muted); }
.comment-area img {
  width: 100%;
  max-height: 70px;
  object-fit: cover;
  border-radius: 6px;
}
.comment-area .remove-btn {
  background: var(--danger);
  color: white;
  border: none;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.submit-review-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), #ffa502);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.submit-review-btn:hover { opacity: 0.9; }
.submit-review-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.review-status {
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  margin-top: 12px;
}
.review-status.pending { background: rgba(255,165,2,0.15); color: #ffa502; }
.review-status.approved { background: rgba(46,213,115,0.15); color: var(--success); }
.review-status.rejected { background: rgba(255,71,87,0.15); color: var(--danger); }

@media (max-width: 640px) {
  .comment-areas { grid-template-columns: 1fr; }
}
.back-btn {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.back-btn:hover { background: var(--bg-hover); }

/* ========== 客服悬浮按钮 ========== */
.cs-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ffa502);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
  z-index: 200;
  transition: transform 0.2s;
}
.cs-fab:hover { transform: scale(1.1); }

/* ========== 客服弹窗 ========== */
.cs-modal {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 360px;
  height: 480px;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 200;
  flex-direction: column;
  overflow: hidden;
}
.cs-modal.show { display: flex; }
.cs-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--primary), #ffa502);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cs-header span { font-weight: 600; }
.cs-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}
.cs-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg { max-width: 75%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.msg.admin { align-self: flex-start; background: var(--bg-hover); color: var(--text); border-bottom-left-radius: 4px; }
.msg-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.cs-input-area {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.cs-input-area input {
  flex: 1;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  outline: none;
  font-size: 14px;
}
.cs-input-area button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .navbar { padding: 12px 16px; flex-wrap: wrap; }
  .search-box input { width: 140px; }
  .container { padding: 16px; }
  .cs-modal { right: 12px; left: 12px; width: auto; }
  .watch-page { padding: 16px; }
  .review-task { padding: 14px; }
  .card-title { font-size: 13px; }
  .card-info { padding: 8px; }
  .card-meta { font-size: 11px; }
}
