/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0d8bf2;
  --primary-hover: #0670c9;
  --accent-cyan: #00c6fb;
  --bg-color: #0a0e12;
  --secondary-bg: #121820;
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --border-color: #1e293b;
  --hover-bg: #1e293b;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(18, 24, 32, 0.98) 0%, rgba(10, 14, 18, 0.95) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 0 rgba(13, 139, 242, 0.08);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn:hover {
  background-color: var(--hover-bg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  max-width: min(280px, 42vw);
  min-width: 0;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-cyan));
  color: #fff;
  font-size: 13px;
  box-shadow: 0 2px 14px rgba(13, 139, 242, 0.35);
}

.logo-mark i {
  margin-left: 2px;
}

.logo-text {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-size: clamp(10px, 2.4vw, 15px);
  background: linear-gradient(90deg, #5eb8ff 0%, #7ee8ff 50%, #a8f0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: min(200px, 40vw);
  word-break: keep-all;
}

/* 搜索框 */
.nav-center {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
}

.search-form {
  display: flex;
  width: 100%;
}

.search-form input {
  flex: 1;
  padding: 8px 16px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 20px 0 0 20px;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
}

.search-form input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 1px rgba(13, 139, 242, 0.25);
}

.search-form button {
  padding: 8px 20px;
  background-color: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 20px 20px 0;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-form button:hover {
  background-color: #3f3f3f;
}

/* 导航栏右侧 */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-btn:hover {
  background-color: var(--hover-bg);
}

.auth-buttons {
  display: flex;
  gap: 8px;
}

.btn-login, .btn-signup {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-login {
  background: transparent;
  border: 1px solid var(--text-secondary);
  color: var(--text-primary);
}

.btn-login:hover {
  background-color: var(--hover-bg);
}

.btn-signup {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-cyan));
  border: 1px solid transparent;
  color: #fff;
}

.btn-signup:hover {
  filter: brightness(1.08);
  box-shadow: 0 2px 12px rgba(13, 139, 242, 0.4);
}

/* 用户菜单 */
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}

.dropdown-toggle:hover {
  background-color: var(--hover-bg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--secondary-bg);
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  margin-top: 8px;
}

.dropdown-menu.active {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: var(--hover-bg);
}

.dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 8px 8px;
}

/* 侧边栏 */
.sidebar {
  position: fixed;
  left: 0;
  top: 56px;
  width: 240px;
  height: calc(100vh - 56px);
  background-color: var(--secondary-bg);
  overflow-y: auto;
  padding: 12px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section h3 {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.2s;
}

.sidebar-link:hover {
  background-color: var(--hover-bg);
}

.sidebar-link.active {
  background-color: var(--hover-bg);
}

.sidebar-link i {
  font-size: 20px;
  width: 24px;
}

/* 主内容区 */
.main-content {
  margin-left: 0;
  margin-top: 56px;
  padding: 24px;
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-open {
  margin-left: 240px;
}

/* 视频网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1800px;
}

/* 视频卡片 */
.video-card {
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 比例 */
  background-color: var(--hover-bg);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.video-thumbnail img,
.thumb-img,
.rec-thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-img:not([src]),
.rec-thumb-img:not([src]),
.thumb-img[data-src],
.rec-thumb-img[data-src] {
  opacity: 0;
}

.thumb-img[src]:not([data-src]),
.rec-thumb-img[src]:not([data-src]) {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.video-thumbnail video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.video-info {
  display: flex;
  gap: 12px;
}

.video-channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-details {
  flex: 1;
}

.video-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-channel-name {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.video-stats {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--secondary-bg);
  padding: 32px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-large {
  max-width: 600px;
}

.modal-content h2 {
  margin-bottom: 24px;
  font-size: 24px;
}

.close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover {
  color: var(--text-primary);
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group input[type="file"] {
  padding: 10px;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.modal-footer {
  margin-top: 16px;
  text-align: center;
  color: var(--text-secondary);
}

.modal-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.modal-footer a:hover {
  text-decoration: underline;
}

/* 上传进度 */
.upload-progress {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--bg-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  width: 0%;
  transition: width 0.3s;
}

#progressText {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.file-info {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 提示消息 */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--secondary-bg);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s;
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background-color: #0f9d58;
}

.toast.error {
  background-color: #db4437;
}

/* 视频播放页面 */
.video-player-container {
  display: flex;
  gap: 24px;
  max-width: 1800px;
  margin: 0 auto;
}

.video-player-section {
  flex: 1;
}

.video-player {
  width: 100%;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-player video {
  width: 100%;
  height: auto;
  display: block;
}

.video-info-section {
  padding: 20px 0;
}

.video-title-large {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 12px;
}

.video-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.video-channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.channel-details {
  display: flex;
  flex-direction: column;
}

.channel-name {
  font-weight: 500;
}

.subscriber-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.subscribe-btn {
  padding: 10px 20px;
  background-color: var(--text-primary);
  border: none;
  border-radius: 20px;
  color: var(--bg-color);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.subscribe-btn.subscribed {
  background-color: var(--hover-bg);
  color: var(--text-primary);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background-color: var(--hover-bg);
  border: none;
  border-radius: 20px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s;
}

.action-btn:hover {
  background-color: #3f3f3f;
}

.action-btn.active {
  color: var(--primary-color);
}

.video-description {
  background-color: var(--hover-bg);
  padding: 16px;
  border-radius: 12px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.video-stats-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* 评论区 */
.comments-section {
  margin-top: 24px;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.comments-header h3 {
  font-size: 20px;
}

.comment-count {
  color: var(--text-secondary);
}

.comment-form {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.comment-form-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-form-input {
  flex: 1;
}

.comment-form-input input {
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
}

.comment-form-input input:focus {
  outline: none;
  border-bottom-color: var(--text-primary);
}

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.comment-form-actions button {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  font-weight: 500;
  cursor: pointer;
}

.cancel-btn {
  background: transparent;
  color: var(--text-primary);
}

.submit-comment-btn {
  background-color: var(--primary-color);
  color: white;
}

.submit-comment-btn:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
}

/* 评论列表 */
.comment {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 500;
  font-size: 13px;
}

.comment-date {
  color: var(--text-secondary);
  font-size: 12px;
}

.comment-text {
  font-size: 14px;
  line-height: 1.6;
}

.comment-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.comment-action {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.comment-action:hover {
  color: var(--text-primary);
}

/* 推荐视频 */
.recommendations {
  width: 400px;
  flex-shrink: 0;
}

.recommendation-video {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}

.recommendation-thumbnail {
  position: relative;
  width: 168px;
  height: 94px;
  background-color: var(--hover-bg);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.recommendation-thumbnail img,
.recommendation-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommendation-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 11px;
}

.recommendation-info {
  flex: 1;
}

.recommendation-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recommendation-channel {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.recommendation-stats {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .recommendations {
    width: 100%;
  }
  
  .video-player-container {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .main-content.sidebar-open {
    margin-left: 0;
  }
  
  .nav-center {
    display: none;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .video-player-container {
    padding: 16px;
  }
  
  .recommendation-video {
    flex-direction: column;
  }
  
  .recommendation-thumbnail {
    width: 100%;
    height: auto;
    padding-bottom: 56.25%;
  }
}

/* 我的视频页面 */
.my-videos-header {
  margin-bottom: 32px;
}

.my-videos-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  margin-bottom: 24px;
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--hover-bg);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 骨架屏加载 */
.skeleton-card {
  pointer-events: none;
}

.skeleton-shimmer {
  background: linear-gradient(90deg, var(--hover-bg) 25%, #2a3441 50%, var(--hover-bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background-color: var(--hover-bg);
}

.skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--hover-bg);
}

/* 缩略图占位符 - 渐变色背景 */
.thumb-placeholder {
  position: relative;
  background: linear-gradient(135deg, #1a2332 0%, #2a3a4a 25%, #0f1724 50%, #2a3a4a 75%, #1a2332 100%);
  background-size: 400% 400%;
  animation: gradientMove 6s ease infinite;
}

.thumb-placeholder::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(13, 139, 242, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0, 198, 251, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* 缩略图渐变条 */
.thumb-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    #1a2332 0%,
    #2a3a4a 25%,
    #0f1724 50%,
    #2a3a4a 75%,
    #1a2332 100%
  );
  background-size: 400% 400%;
  animation: gradientMove 6s ease infinite;
}

.thumb-gradient::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(13, 139, 242, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(0, 198, 251, 0.08) 0%, transparent 60%);
}

/* 缩略图错误占位 */
.thumb-error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    hsl(210, 30%, 12%) 0%,
    hsl(220, 25%, 15%) 50%,
    hsl(215, 28%, 12%) 100%
  );
}

.thumb-error-overlay i {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.15);
}

/* ============ 广告相关样式 ============ */

/* Pre-roll 贴片广告 */
.preroll-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  background: #000;
}

.preroll-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preroll-container {
  position: relative;
  width: min(90vw, 1200px);
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.preroll-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preroll-countdown {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.preroll-progress {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.preroll-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 1s linear;
}

.preroll-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 14px;
}

.preroll-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  font-weight: 700;
  font-size: 16px;
}

.preroll-label {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.preroll-skip {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 16px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.preroll-skip:hover {
  background: rgba(255,255,255,0.25);
}

.preroll-brand {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 600;
}

/* Banner 横幅广告 */
.banner-ad {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s;
}

.banner-ad:hover {
  transform: scale(1.01);
}

.banner-ad img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.banner-ad-label {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.6);
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: 600;
}

/* ============ 公告弹窗样式 ============ */

.modal-announcement {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.modal-announcement.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-announcement-content {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
  border-radius: 20px;
  padding: 0;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

.modal-announcement-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.modal-announcement-header {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-announcement-header i {
  font-size: 28px;
  color: #fbbf24;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.modal-announcement-header h3 {
  margin: 0;
  font-size: 22px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-announcement-body {
  padding: 40px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.modal-announcement-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.modal-announcement-icon i {
  font-size: 40px;
  color: #fff;
}

.modal-announcement-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 15px 0;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

.modal-announcement-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin: 0 0 25px 0;
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-announcement-countdown {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 24px;
  border-radius: 30px;
  display: inline-block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.modal-announcement-countdown #countdownNum {
  font-size: 24px;
  font-weight: 800;
  color: #fbbf24;
  margin: 0 5px;
  animation: countdownPulse 1s ease infinite;
}

@keyframes countdownPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.modal-announcement-close {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 30px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.modal-announcement-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(-50%) scale(1.05);
  border-color: rgba(255, 255, 255, 0.5);
}

.modal-announcement-close i {
  font-size: 16px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .modal-announcement-content {
    width: 95%;
    max-width: none;
  }
  
  .modal-announcement-header h3 {
    font-size: 18px;
  }
  
  .modal-announcement-title {
    font-size: 20px;
  }
  
  .modal-announcement-text {
    font-size: 14px;
    padding: 15px;
  }
}
