/* 观看历史页面样式 */

.history-page,
.favorites-page,
.settings-page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.btn-back {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.history-cover {
  position: relative;
  width: 100px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.history-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.progress-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.5);
}

.progress-bar {
  height: 100%;
  background: var(--primary, #e50914);
  transition: width 0.3s;
}

.badge-completed {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #4caf50;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.history-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.history-info .series-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-info {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.watch-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.watch-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.watch-duration {
  font-size: 13px;
  color: var(--primary, #e50914);
  font-weight: 500;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.empty-state p {
  font-size: 18px;
  margin-bottom: 20px;
}

/* 收藏页面使用主页的 series-grid 样式 */
.favorites-page .series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

/* 设置页面 */
.settings-page {
  max-width: 600px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-avatar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.1), rgba(229, 9, 20, 0.05));
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 16px;
  transition: all 0.3s;
}

.settings-avatar:hover {
  border-color: rgba(229, 9, 20, 0.4);
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.15);
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.avatar-edit {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.avatar-upload-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary, #e50914);
  color: var(--primary, #e50914);
}

.avatar-upload-btn i {
  font-size: 16px;
}

.avatar-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
}

.settings-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.settings-field:last-child {
  margin-bottom: 0;
}

.settings-field label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.settings-field input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  transition: all 0.3s;
}

.settings-field input:focus {
  outline: none;
  border-color: var(--primary, #e50914);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.settings-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.settings-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 24px 0;
}

.settings-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 20px 0;
}

.settings-actions {
  margin-top: 24px;
}

.settings-actions .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #e50914, #b20710);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

.settings-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.settings-actions .btn-primary:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .history-page,
  .favorites-page,
  .settings-page {
    padding: 15px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .history-cover {
    width: 80px;
    height: 110px;
  }

  .history-info .series-title {
    font-size: 15px;
  }

  .episode-info {
    font-size: 13px;
  }

  .favorites-page .series-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  .settings-avatar {
    flex-direction: column;
    text-align: center;
  }

  .avatar-preview {
    width: 100px;
    height: 100px;
  }
}
