.video-card {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.video-card:active {
  transform: scale(0.97);
}

@media (hover: hover) {
  .video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 68, 68, 0.2);
  }
}

.video-card__cover {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.video-card__cover-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #222;
}

.video-card__placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    110deg,
    #222 8%,
    #2a2a2a 18%,
    #222 33%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

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

.video-card__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.video-card__img--loaded {
  opacity: 1;
}

.video-card__duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.4;
  backdrop-filter: blur(4px);
}

.video-card__title {
  padding: 8px 10px 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qrcode-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: qrOverlayIn 0.3s ease forwards;
  overflow-y: auto;
  padding: 20px 0;
}

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

.qrcode-modal {
  position: relative;
  background: linear-gradient(145deg, #1e1e2e, #16162a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px 28px 28px;
  margin: 0 auto;
  text-align: center;
  max-width: 360px;
  width: calc(100% - 40px);
  animation: qrModalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

@keyframes qrModalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.93);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.qrcode-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, color 0.2s ease;
}

.qrcode-modal__close:active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

@media (hover: hover) {
  .qrcode-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
  }
}

.qrcode-modal__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
}

.qrcode-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.qrcode-modal__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin-bottom: 20px;
}

.qrcode-modal__qr-wrapper {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qrcode-modal__qr-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-modal__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e0e0e0;
  border-top-color: #ff4444;
  border-radius: 50%;
  animation: qrSpin 0.8s linear infinite;
}

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

.qrcode-modal__qr-img {
  width: 200px;
  height: 200px;
  display: block;
}

.qrcode-modal__url {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  word-break: break-all;
  line-height: 1.4;
}

@media (max-height: 500px) {
  .qrcode-modal {
    padding: 24px 20px 20px;
  }
  .qrcode-modal__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
  }
  .qrcode-modal__desc {
    margin-bottom: 12px;
  }
  .qrcode-modal__qr-wrapper {
    width: 160px;
    height: 160px;
  }
  .qrcode-modal__qr-img {
    width: 160px;
    height: 160px;
  }
}

.home-prompt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: overlayIn 0.3s ease forwards;
}

.home-prompt-overlay--closing {
  animation: overlayOut 0.3s ease forwards;
}

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

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

.home-prompt {
  position: relative;
  background: linear-gradient(145deg, #1e1e2e, #16162a);
  border: 1px solid rgba(255, 68, 68, 0.25);
  border-radius: 16px;
  padding: 32px 24px 24px;
  margin: 0 20px;
  text-align: center;
  max-width: 320px;
  width: calc(100% - 40px);
  animation: promptIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 8px 32px rgba(255, 68, 68, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.home-prompt--closing {
  animation: promptOut 0.3s ease forwards;
}

@keyframes promptIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes promptOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
}

.home-prompt__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, color 0.2s ease;
}

.home-prompt__close:active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

@media (hover: hover) {
  .home-prompt__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
  }
}

.home-prompt__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  background: rgba(255, 68, 68, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-prompt__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.home-prompt__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin-bottom: 20px;
}

.home-prompt__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.4);
}

.home-prompt__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.home-prompt__btn:active:not(:disabled) {
  transform: scale(0.97);
}

@media (hover: hover) {
  .home-prompt__btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
  }
}

.home-prompt__btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-prompt__btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: promptBtnSpin 0.6s linear infinite;
}

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

.home-prompt__countdown {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

.home-prompt__countdown-num {
  display: inline-block;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
  margin-right: 2px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.4);
}

.download-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.download-btn:active:not(:disabled) {
  transform: scale(0.97);
}

@media (hover: hover) {
  .download-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
  }
}

.download-btn__loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-btn__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

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

.home {
  min-height: 100vh;
  background: var(--bg-primary);
  padding-bottom: 80px;
}

.home__header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.home__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.home__help{
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-left: auto;
}

.home__content {
  padding: 12px;
}

.home__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 480px) {
  .home__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.home__bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.video-player {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  user-select: none;
}

.video-player__video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-player__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.video-player__spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: video-player-spin 0.85s linear infinite;
}

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

.video-player__play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.video-player__play-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 68, 68, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-player__play-icon svg {
  margin-left: 4px;
}

.video-player__play-overlay:active .video-player__play-icon {
  transform: scale(0.9);
}

.video-player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  padding: 30px 12px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.video-player__controls--visible {
  opacity: 1;
}

.video-player__progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  margin-bottom: 8px;
  transition: height 0.15s ease;
}

.video-player__progress:hover {
  height: 6px;
}

.video-player__progress-bar {
  height: 100%;
  background: var(--accent-color);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.video-player__progress-thumb {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.video-player__progress:hover .video-player__progress-thumb {
  opacity: 1;
}

.video-player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-player__bar-left,
.video-player__bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-player__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: #fff;
  transition: background 0.2s ease;
}

.video-player__btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.video-player__volume {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-player__volume-slider {
  width: 60px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.video-player__volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.video-player__time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .video-player__volume-slider {
    width: 40px;
  }
  .video-player__time {
    font-size: 11px;
  }
}

.download-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.4s ease;
}

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

.download-modal {
  background: linear-gradient(145deg, #1e1e2e, #16162a);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 16px;
  padding: 28px 24px;
  margin: 0 20px;
  text-align: center;
  max-width: 320px;
  width: calc(100% - 40px);
  animation: slideUp 0.4s ease;
  box-shadow: 0 8px 32px rgba(255, 68, 68, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.download-modal__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--accent-gradient);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.3);
}

.download-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.download-modal__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 20px;
}

.download-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 25px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 16px rgba(255, 68, 68, 0.4);
}

.download-modal__btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.download-modal__btn:active:not(:disabled) {
  transform: scale(0.97);
}

@media (hover: hover) {
  .download-modal__btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
  }
}

.download-modal__btn-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-modal__btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dlBtnSpin 0.6s linear infinite;
}

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

.player-page {
  min-height: 100vh;
  background: var(--bg-primary);
  padding-bottom: 80px;
}

.player-page__nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-page__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.player-page__back:active {
  background: rgba(255, 255, 255, 0.1);
}

.player-page__nav-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-page__player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
}

.player-page__recommend {
  padding: 16px 12px;
}

.player-page__recommend-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.player-page__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 480px) {
  .player-page__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.player-page__bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

:root {
  --bg-primary: #000000;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent-color: #ff4444;
  --accent-gradient: linear-gradient(135deg, #ff4444, #ff6b35);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.page-enter {
  opacity: 0;
  transform: translateX(30px);
}

.page-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-exit {
  opacity: 1;
  transform: translateX(0);
}

.page-exit-active {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

