/* 全局样式 */
:root {
  --primary: #6366f1; /* 主色调-靛蓝色 */
  --primary-hover: #4f46e5;
  --secondary: #ec4899; /* 辅助色-粉色 */
  --dark-bg: #0f172a; /* 暗黑背景 */
  --dark-card: #1e293b; /* 卡片背景 */
  --dark-border: #334155; /* 边框颜色 */
  --text-primary: #f8fafc; /* 主要文字 */
  --text-secondary: #94a3b8; /* 次要文字 */
  --success: #10b981; /* 成功色 */
  --warning: #f59e0b; /* 警告色 */
  --danger: #ef4444; /* 危险色 */
  --vip: #fbbf24; /* VIP金色 */
  --free: #10b981; /* 免费绿色 */
  --paid: #ef4444; /* 收费红色 */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 导航栏 */
nav {
  background-color: var(--dark-card);
  padding: 1rem 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.auth-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

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

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

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

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

.btn-vip {
  background-color: var(--vip);
  color: var(--dark-bg);
}

.btn-vip:hover {
  background-color: #f59e0b;
}

.mobile-menu {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* 主内容区 */
main {
  flex: 1;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%;
}

/* 首页样式 */
.hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-content {
  flex: 1;
  min-width: 300px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.hero-image {
  flex: 1;
  min-width: 300px;
  text-align: center;
  aspect-ratio: 3 / 2;
  background-color: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background-color: var(--primary);
  max-width: 200px;
}

/* 视频卡片网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.video-card {
  background-color: var(--dark-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-free {
  background-color: var(--free);
  color: white;
}

.badge-vip {
  background-color: var(--vip);
  color: var(--dark-bg);
}

.badge-paid {
  background-color: var(--paid);
  color: white;
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 分类页样式 */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--dark-card);
  border-radius: var(--radius);
}

.filter-btn {
  background-color: transparent;
  border: 1px solid var(--dark-border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.filter-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

/* 播放页样式 */
.video-player {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  overflow: hidden;
}

.video-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

.video-details {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.video-main-info {
  flex: 3;
  min-width: 300px;
}

.video-main-info h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.video-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: var(--dark-card);
  border-radius: 20px;
  font-size: 0.9rem;
  margin-right: 0.5rem;
  margin-bottom: 1rem;
}

.video-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.video-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.video-sidebar {
  flex: 1;
  min-width: 300px;
}

.price-card {
  background-color: var(--dark-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.price-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.price-amount {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.price-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* 个人中心样式 */
.profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.profile-sidebar {
  flex: 1;
  min-width: 300px;
}

.profile-card {
  background-color: var(--dark-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: var(--primary);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.profile-name {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.profile-role {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.profile-menu {
  list-style: none;
}

.profile-menu li {
  margin-bottom: 0.5rem;
}

.profile-menu a {
  display: block;
  padding: 0.8rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
}

.profile-menu a:hover,
.profile-menu a.active {
  background-color: var(--primary);
  color: white;
}

.profile-content {
  flex: 3;
  min-width: 300px;
}

.content-card {
  background-color: var(--dark-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.content-header h2 {
  font-size: 1.5rem;
}

/* 表单样式 */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--dark-card);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--dark-border);
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-size: 1rem;
}

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

.form-link {
  color: var(--primary);
  text-decoration: none;
}

.form-link:hover {
  text-decoration: underline;
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
}

/* 支付页面样式 */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.payment-card {
  background-color: var(--dark-bg);
  border: 2px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.payment-card.active {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.1);
}

.payment-card:hover:not(.active) {
  border-color: var(--primary);
}

.payment-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* 支付历史样式 */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dark-border);
}

.history-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.status-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* 响应式样式 */
@media (max-width: 768px) {
  .nav-container {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-links {
    display: none;
    width: 100%;
    order: 10;
    flex-direction: column;
    background-color: var(--dark-card);
    padding: 0.5rem 0;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--dark-border);
  }

  .auth-buttons {
    display: none;
    width: 100%;
    order: 11;
    flex-direction: column;
    background-color: var(--dark-card);
    padding: 0.5rem 0;
    gap: 0.5rem;
  }

  .auth-buttons.open {
    display: flex;
  }

  .auth-buttons .btn {
    text-align: center;
  }

  .mobile-menu {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 1rem;
  }

  .auth-buttons {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  main {
    padding: 0 1rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* 支付历史列表 */
.history-list {
  margin-top: 1rem;
}

.history-item {
  background-color: var(--dark-bg);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.history-item-title {
  font-weight: 600;
}

.history-item-price {
  color: var(--primary);
  font-weight: 600;
}

.history-item-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 工具类 */
.w-100 {
  width: 100%;
}
.mt-4 {
  margin-top: 1.5rem;
}
.mb-3 {
  margin-bottom: 1rem;
}
.mb-4 {
  margin-bottom: 1.5rem;
}
.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
}
