* {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, sans-serif;
    background: #000;
    color: #fff;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  .page {
    min-height: 100vh;
    background:
      radial-gradient(circle at 72% 18%, rgba(221, 48, 78, 0.12), transparent 32%),
      linear-gradient(180deg, #050505 0%, #000 100%);
  }
  
  /* 顶部 */
  .topbar {
    height: 82px;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    gap: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.86);
  }
  
  .logo-box {
    width: 220px;
    height: 64px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  
  .logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  
  .top-search {
    flex: 1;
    max-width: 560px;
    height: 54px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #DD304E;
    border-radius: 14px;
    margin-left: 10px;
    margin-right: auto;
    display: flex;
    align-items: center;
    padding: 0 12px 0 22px;
    min-width: 0;
    box-shadow: 0 0 18px rgba(221, 48, 78, 0.18);
    transition: border 0.25s ease, box-shadow 0.25s ease;
  }
  
  .top-search:focus-within {
    border-color: #DD304E;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 24px rgba(221, 48, 78, 0.35);
  }
  
  .top-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 16px;
  }
  
  .search-icon {
    display: none;
  }

  .search-close {
    width: 52px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  
  .top-right {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-right: 40px;
    flex-shrink: 0;
  }
  
  .avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #DD304E;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
  }  
  
  .avatar-icon {
    font-size: 24px;
    line-height: 1;
  }
  
  .avatar-info {
    position: absolute;
    top: 56px;
    right: 0;
    width: 260px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(10, 10, 10, 0.9);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
  }
  
  .avatar-info strong {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
  }
  
  .avatar-info p {
    margin: 0 0 6px;
    font-size: 15px;
    color: #DD304E;
  }
  
  .avatar-info small {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
  }
  
  .avatar-wrap:hover .avatar-info {
    opacity: 1;
    transform: translateY(0);
  }

  .search-close {
    transition: transform 0.15s ease, opacity 0.15s ease;
  }
  
  /* hover 轻微变亮 */
  .search-close:hover {
    opacity: 0.8;
  }
  
  /* 点击缩小 */
  .search-close:active {
    transform: scale(0.85);
  }

  .search-close::after {
    content: "🔍";
    font-size: 20px;
  }
  
  /* 视频区 */
  .player-section {
    display: flex;
    justify-content: center;
    padding: 34px 40px 50px;
  }
  
  .video-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
  }
  
  .video-title-bar {
    height: 56px;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 600;
    letter-spacing: -0.5px;
  }
  
  .back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: color 0.25s ease, transform 0.25s ease;
  }
  
  .back-btn:hover {
    color: #DD304E;
    transform: translateX(-4px);
  }
  
  .player {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    background: #000;
    overflow: hidden;
    border-radius: 2px;
  }
  
  .video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
  }

  .subtitle-overlay {
    width: 100%;
    height: 76px;
    padding: 8px 40px;
    box-sizing: border-box;
  
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  
    color: white;
    font-size: clamp(15px, 1.4vw, 22px);
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
  
    background: #000;
    pointer-events: none;
  }
  
  .subtitle-overlay div {
    width: 100%;
    max-width: 95%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 1.2em;
  }
  
  /* 弹幕 */
  .danmu-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
  }
  
  .danmu-item {
    position: absolute;
    right: -300px;
    white-space: nowrap;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    animation: danmuMove 12s linear forwards;
  }
  
  @keyframes danmuMove {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-2100px);
    }
  }
  
  /* AI文化提示按钮 */
  .culture-trigger {
    position: absolute;
    top: 68%;
    right: 55px;
    transform: translateY(-50%);
  
    background: rgba(50, 50, 50, 0.86);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    padding: 12px 18px;
  
    font-size: 18px;
    line-height: 1.2;
    cursor: pointer;
    z-index: 5;
    white-space: nowrap;
    backdrop-filter: blur(6px);
  }
  
  /* 文化卡片 */
  .culture-trigger {
    position: absolute;
    top: 68%;
    right: 20%;
    transform: translateY(-50%);
    background: rgba(12, 12, 12, 0.78);
    color: #fff;
    border: 1px solid rgba(221, 48, 78, 0.55);
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 15px;
    cursor: pointer;
    z-index: 5;
    white-space: nowrap;
    backdrop-filter: blur(8px);
  }
  
  .culture-trigger:hover {
    background: rgba(221, 48, 78, 0.22);
  }
  
  .culture-card {
    position: absolute;
    top: 48px;
    right: 34px;
    width: 520px;
    max-width: calc(100% - 68px);
    max-height: 82%;
    background: rgba(10, 10, 10, 0.92);
    color: #fff;
    border-radius: 18px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
  }
  
  .culture-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    font-size: 18px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .culture-card-header button {
    border: none;
    background: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
  }
  
  .culture-card-body {
    padding: 18px;
    overflow-y: auto;
  }
  
  .culture-card-body img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 16px;
  }
  
  .culture-card-body p {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.82);
  }
  
  .culture-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .culture-actions button {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
  }
  
  .culture-actions button:hover {
    background: rgba(221, 48, 78, 0.18);
    border-color: rgba(221, 48, 78, 0.5);
  }

  .culture-translate-wrap {
    position: relative;
  }
  
  .culture-lang-menu {
    position: absolute;
    bottom: 48px;
    left: 0;
    min-width: 130px;
    background: rgba(35, 35, 35, 0.96);
    border-radius: 12px;
    padding: 8px;
    z-index: 30;
  }
  
  .culture-lang-menu button {
    width: 100%;
    display: block;
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
  }
  
  .culture-lang-menu button:hover {
    background: rgba(255, 255, 255, 0.16);
  }
  
  /* 控制区 */
  .controls {
    background: rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 16px 22px 18px;
  }
  
  .progress-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: clamp(14px, 1.2vw, 18px);
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.82);
  }
  
  #progressBar {
    flex: 1;
    cursor: pointer;
    min-width: 0;
    accent-color: #DD304E;
  }
  
  #progressBar::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(
      to right,
      #DD304E 0%,
      #DD304E var(--progress, 0%),
      rgba(255, 255, 255, 0.9) var(--progress, 0%),
      rgba(255, 255, 255, 0.9) 100%
    );
  }
  
  #progressBar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -5px;
    border-radius: 50%;
    background: #DD304E;
    border: none;
  }
  
  .bottom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }
  
  .control-btn:hover {
    transform: scale(1.04);
    background: #DD304E;
    color: #fff;
  }
  
  .dropdown-wrap {
    position: relative;
    flex: 1.0;
    min-width: 0;
  }
  
  .feature-btn {
    width: 100%;
    height: clamp(44px, 4vw, 56px);
    padding: 0 16px;
    border: 1px solid #DD304E;;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: clamp(14px, 1.2vw, 18px);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }

  .feature-btn:hover {
    background: linear-gradient(180deg, rgba(221,48,78,0.28), rgba(221,48,78,0.14));
    border-color: rgba(221,48,78,0.65);
    color: #fff;
    box-shadow: 0 0 18px rgba(221,48,78,0.18);
  }
  
  .feature-btn:active {
    transform: scale(0.97);
  }

  .small-wrap {
    flex: 0 0 64px;
  }
  
  .small-btn {
    width: 64px;
    padding: 0;
    text-align: center;
  }

  .episode-menu {
    max-height: 220px;
    overflow-y: auto;
  }
  
  .episode-item {
    padding: 10px 12px;
    border-radius: 8px;
  }
  
  .episode-item:hover {
    background: rgba(255, 255, 255, 0.14);
  }
  
  .current-episode {
    background: rgba(255, 255, 255, 0.2) !important;
    font-weight: 700;
  }

#fullscreenBtn {
  flex: 0 0 52px;
  width: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(221, 48, 78, 0.85);
  color: #DD304E;
  box-shadow: 0 0 16px rgba(221, 48, 78, 0.2);
}
  
  .video-shell:fullscreen {
    max-width: none;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
  }
  
  .video-shell:fullscreen .video-wrapper {
    flex: 1;
    max-height: none;
    aspect-ratio: auto;
  }
  
  .video-shell:fullscreen .video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .video-shell:fullscreen .controls {
    flex-shrink: 0;
  }
  
  .video-shell:fullscreen .subtitle-overlay {
    flex-shrink: 0;
  }
  
  /* 左边播放按钮保留圆形 */
  .control-btn {
    flex: 0 0 clamp(44px, 4vw, 56px);
    width: clamp(44px, 4vw, 56px);
    height: clamp(44px, 4vw, 56px);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(221, 48, 78, 0.85);
    color: #DD304E;
    font-size: clamp(16px, 1.4vw, 20px);
    cursor: pointer;
    padding: 0;
    box-shadow: 0 0 16px rgba(221, 48, 78, 0.25);
  }
  
  /* 其余功能平均铺满 */  
  .icon-btn {
    width: 100%;
    height: clamp(44px, 4vw, 56px);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .danmu-input-wrap {
    display: flex;
    align-items: center;
    height: 54px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(221, 48, 78, 0.7);
    border-radius: 14px;
    overflow: hidden;
    flex: 3;
    min-width: 0;
    box-shadow: 0 0 18px rgba(221, 48, 78, 0.14);
  }
  
  .danmu-input-wrap input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    padding: 0 16px;
    font-size: 15px;
  }
  
  .danmu-input-wrap button {
    width: 52px;
    height: 100%;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
  }
  
  .danmu-input-wrap button:hover {
    color: #DD304E;
  }

  /* 下拉菜单 */

  .dropdown {
    position: absolute;
    bottom: 66px;
    right: 0;
    min-width: 220px;
    background: rgba(12, 12, 12, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 12px;
    z-index: 20;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
  
  .dropdown label,
  .dropdown button,
  .dropdown p {
    display: block;
    width: 100%;
    color: rgba(255, 255, 255, 0.82);
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    margin: 8px 0;
    cursor: pointer;
  }
  
  .dropdown button:hover,
  .dropdown label:hover {
    color: #fff;
    background: rgba(221, 48, 78, 0.14);
  }
  
  .menu-title {
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
  }
  
  .current-episode {
    background: rgba(221, 48, 78, 0.2) !important;
    color: #fff !important;
    font-weight: 700;
  }
  
  .settings-menu {
    min-width: 260px;
  }
  
  .hidden {
    display: none !important;
  }

  .back-btn {
    text-decoration: none;
  }

  .logo-box a {
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
  }
  
  .logo-box a img {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  
  .logo-box a:hover img {
    transform: scale(1.05);
    opacity: 0.9;
  }
  
  .logo-box a:active img {
    transform: scale(0.95);
  }

  .logo-box a:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(221, 48, 78, 0.6));
  }
  
  /* 响应式：平板和手机 */
@media (max-width: 900px) {
  .topbar {
    height: 64px;
    min-height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
  }

  .logo-box {
    width: 110px;
    height: 44px;
  }

  .top-search {
    height: 38px;
    margin-left: 0;
    max-width: none;
    flex: 1;
    padding: 0 10px;
  }

  .top-search input {
    font-size: 13px;
  }

  .top-right {
    margin-right: 0;
    gap: 8px;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .avatar-icon {
    font-size: 20px;
  }

  .avatar-info {
    right: 0;
    width: 220px;
  }

  .player-section {
    padding: 18px 10px 32px;
  }

  .video-title-bar {
    height: auto;
    min-height: 44px;
    font-size: clamp(16px, 4vw, 20px);
    padding: 0;
    gap: 8px;
  }

  .back-btn {
    font-size: 24px;
  }

  .controls {
    padding: 10px;
  }

  .progress-wrap {
    gap: 8px;
    font-size: 12px;
    margin-bottom: 10px;
  }

  .bottom-controls {
    gap: 6px;
  }

  .control-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .danmu-input-wrap {
    flex: 2.2;
    height: 38px;
  }

  .danmu-input-wrap input {
    font-size: 11px;
    padding: 0 8px;
  }

  .danmu-input-wrap button {
    width: 34px;
    font-size: 14px;
  }

  .dropdown-wrap {
    flex: 0.85;
  }

  .feature-btn {
    height: 38px;
    padding: 0 6px;
    font-size: 11px;
    border-radius: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .small-wrap {
    flex: 0 0 42px;
  }

  .small-btn {
    width: 42px;
  }

  #fullscreenBtn {
    flex: 0 0 38px;
    width: 38px;
  }

  .dropdown {
    bottom: 48px;
    min-width: 180px;
    padding: 10px;
  }

  .dropdown label,
  .dropdown button,
  .dropdown p {
    font-size: 13px;
  }

  .danmu-item {
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .feature-btn {
    font-size: 0;
  }

  #subtitleBtn::after {
    content: "Lang";
    font-size: 11px;
  }

  #episodesBtn::after {
    content: "Eps";
    font-size: 11px;
  }

  .danmu-input-wrap {
    flex: 1.8;
  }

  .danmu-input-wrap input::placeholder {
    font-size: 0;
  }

  .danmu-input-wrap input::placeholder {
    content: "";
  }
}