:root {
    font-size: 16px;
    --primary-color: #A86B00;
    --primary-dark-color: #d48a00;
    --primary-light-color: #F3E9D8;
    --bg-color: #2e1e00;
    --card-bg-color: #5A3A00;
    --text-color: #E0D8C7;
    --white-color: #ffffff;
    --h1-font-size: 1.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 25px;
}

h3 {
    font-size: 22px;
}

@media (max-width:768px) {
    h1 {
        font-size: 25px !important;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 17px;
    }
}

body {
    background-color: #070501;
    color: var(--white-color);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 1.25rem;
    line-height: 1.6;
}

.container {
    max-width: 64rem;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
.watch-button {
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.card {
    background-color: #5a3a006e;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.875rem;
    box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.2);
}

.watch-button {
    background-image: linear-gradient(to right, #A86B00, #ffbe4d);
    color: var(--white-color);
    border-radius: 1.875rem;
    padding: 0.55rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-shadow: 0 0.25rem 1rem rgba(168, 107, 0, 0.4);
    text-decoration: none;
    width: 280px;
    max-width: 100%;
}

.watch-button:hover {
    background-color: #8E5A00;
    transform: translateY(-2px);
    box-shadow: 0 0.375rem 1.25rem rgba(168, 107, 0, 0.5);
}

.navbar {
    background-color: #5a3a006e;
    border-radius: 0.625rem;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.875rem;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--white-color);
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: var(--primary-color);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-links {
    display: flex;
    gap: 1.5rem;
}

.navbar-links a {
    color: var(--white-color);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    font-size: 14px;
}

.navbar-links a:hover {
    color: var(--primary-light-color);
}

.drama-detail {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
}

.poster-container {
    flex-shrink: 0;
}

.poster {
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(168, 107, 0, 0.3);
}

.drama-title {
    font-size: var(--h1-font-size);
    font-weight: bold;
    margin-bottom: 0.625rem;
}

.drama-episodes {
    color: var(--primary-light-color);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.tag {
    background-color: var(--primary-dark-color);
    font-size: 0.875rem;
    padding: 4px 12px;
    border-radius: 1.25rem;
}

.drama-description {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.countdown {
    background-color: rgba(243, 233, 216, 0.14);
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.countdown-label {
    font-weight: 700;
}

.event-text {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--primary-light-color);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.episode-player-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.episode-list {
    background-color: #3B2700;
    border-radius: 0.75rem;
    padding: 1rem;
}

.episode-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(168, 107, 0, 0.3);
}

.episode-list-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.episode-count {
    color: var(--primary-light-color);
    font-size: 0.875rem;
}

.episodes {
    max-height: 25rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.episodes::-webkit-scrollbar {
    width: 6px;
}

.episodes::-webkit-scrollbar-track {
    background: rgba(77, 51, 0, 0.1);
    border-radius: 10px;
}

.episodes::-webkit-scrollbar-thumb {
    background: var(--primary-dark-color);
    border-radius: 10px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    background-color: var(--card-bg-color);
}

.episode-item:hover {
    background-color: rgba(168, 107, 0, 0.3);
    transform: translateX(5px);
}

.episode-item.active {
    background-color: var(--primary-dark-color);
    box-shadow: 0 0.25rem 1rem rgba(122, 79, 0, 0.4);
}

.episode-thumbnail {
    width: 3.75rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    object-fit: cover;
    flex-shrink: 0;
}

.episode-info {
    flex: 1;
    min-width: 0;
}

.episode-title {
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-duration {
    color: var(--primary-light-color);
    font-size: 0.8125rem;
}

.video-player {
    flex: 2;
    /* 新增样式 */
    height: auto;
}

.video-container {
    position: relative;
    width: 100%;
    /* aspect-ratio: 16/9; */
    /* 移除固定的宽高比 */
    background-color: black;
    border-radius: 0.75rem;
    overflow: hidden;
    /* 新增样式 */
    height: 100%;
    max-height: 100%;
}

/* 新增样式确保视频填满容器 */
#videoPlayer {
    width: 30%;
    height: 100%;
    margin: 0 auto !important;
    display: flex;
}

.video-placeholder {
    display: none;
    /* 默认隐藏占位符 */
}

/* 当视频未加载时显示占位符 */
#videoPlayer:not(:playing)+.video-placeholder {
    display: flex;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5rem;
    height: 5rem;
    background-color: rgba(168, 107, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 1.25rem rgba(168, 107, 0, 0.6);
}

.play-button-overlay:hover {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 1.125rem 0 1.125rem 1.875rem;
    border-color: transparent transparent transparent var(--white-color);
    margin-left: 0.3125rem;
}

.player-info {
    text-align: center;
    padding-top: 1.5rem;
}

.player-info-text {
    color: var(--primary-light-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.reviews-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.875rem;
}

.reviews-container {
    display: grid;
    gap: 1.25rem;
}

.review-card {
    background-color: rgba(56, 37, 0, 0.922);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.review-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.reviewer-name {
    font-weight: 500;
}

.review-date {
    color: var(--primary-light-color);
    font-size: 0.8125rem;
}

.review-content {
    color: var(--text-color);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
    color: #facc15;
}

.footer {
    background-color: #5a3a006e;
    padding: 2.5rem 1.5rem 1.25rem;
    border-radius: 1rem;
    margin-top: 1.25rem;
}

.footer-content {
    display: grid;
    gap: 1.875rem;
    margin-bottom: 1.875rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-column p,
.footer-column a {
    color: var(--primary-light-color);
    font-size: 0.875rem;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.625rem;
}

.social-link {
    color: var(--primary-light-color);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--white-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(168, 107, 0, 0.2);
    color: var(--primary-light-color);
    font-size: 0.8125rem;
}

.drama-info,
.footer-column,
.promotion-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tags,
.social-links {
    justify-content: center;
}

.poster-container {
    margin: 0 auto;
    width: 60%;
    max-width: 17.5rem;
}

.event-text {
    justify-content: center;
}

@media (min-width: 768px) {

    .drama-info,
    .footer-column,
    .promotion-info {
        align-items: flex-start;
        text-align: left;
    }

    .tags,
    .social-links {
        justify-content: flex-start;
    }

    .event-text {
        justify-content: flex-start;
    }

    .poster-container {
        margin: 0;
        width: auto;
    }

    .drama-detail {
        flex-direction: row;
        align-items: center;
    }

    .poster-container {
        flex: 1;
    }

    .drama-info {
        flex: 2;
    }

    .episode-player-container {
        flex-direction: row;
        align-items: flex-start;
        /* MODIFICATION: Align items to the top */
    }

    .episode-list {
        flex: 1;
        max-width: 21.875rem;
    }

    .reviews-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .reviews-container {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.promotion-section h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.875rem;
    position: relative;
}

.promotion-underline {
    width: 5rem;
    height: 0.1875rem;
    background-color: var(--primary-color);
    border-radius: 0.1875rem;
    margin: 0.625rem auto 0;
}

.promotion-content {
    display: flex;
    flex-direction: column;
    gap: 1.875rem;
}

.promotion-poster {
    flex: 1;
    min-width: 12.5rem;
    margin: 0 auto;
    max-width: 300px;
}

.promotion-poster img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
}

.promotion-info {
    flex: 2;
    background-color: rgb(0 0 0 20%);
    border-radius: 1rem;
    padding: 0 1.5rem;
    height: 100% !important;
}

.promotion-title {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
}

.promotion-countdown {
    background-color: rgba(243, 233, 216, 0.14);
    border-radius: 0.625rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.promotion-text {
    color: var(--primary-light-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.promotion-text svg {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.promotion-button {
    background-image: linear-gradient(to right, #A86B00, #ffbe4d);
    color: var(--white-color);
    border: none;
    border-radius: 1.875rem;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(168, 107, 0, 0.4);
    justify-content: center;
    width: 280px;
    text-decoration: none;
}

.promotion-button:hover {
    background-color: #8E5A00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 107, 0, 0.5);
}

.countdown-value {
    font-weight: 700;
}

@media (min-width: 768px) {
    .promotion-content {
        flex-direction: row;
        align-items: center;
    }

    .promotion-poster {
        margin: 0;
    }
}


/* 视频播放器组件样式 */
.episode-player-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.episode-list {
    background-color: #3B2700;
    border-radius: 0.75rem;
    padding: 1rem;
}

.episode-list .episodes {
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.episode-list .episodes::-webkit-scrollbar {
    width: 6px;
}

.episode-list .episodes::-webkit-scrollbar-track {
    background: rgba(77, 51, 0, 0.1);
    border-radius: 10px;
}

.episode-list .episodes::-webkit-scrollbar-thumb {
    background: var(--primary-dark-color);
    border-radius: 10px;
}

.episode-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(168, 107, 0, 0.3);
}

.episode-list-title {
    font-weight: 600;
    font-size: 1.125rem;
}

.episode-count {
    color: var(--primary-light-color);
    font-size: 0.875rem;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    background-color: var(--card-bg-color);
}

.episode-item:hover {
    background-color: rgba(168, 107, 0, 0.3);
    transform: translateX(5px);
}

.episode-item.active {
    background-color: var(--primary-dark-color);
    box-shadow: 0 0.25rem 1rem rgba(122, 79, 0, 0.4);
}

.episode-thumbnail {
    width: 3.75rem;
    height: 2.5rem;
    border-radius: 0.375rem;
    object-fit: cover;
    flex-shrink: 0;
    background: #666;
    position: relative;
}

.episode-thumbnail::after {
    content: none;
}

.episode-info {
    flex: 1;
    min-width: 0;
}

.episode-title {
    font-weight: 500;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.episode-duration {
    color: var(--primary-light-color);
    font-size: 0.8125rem;
}

.video-player {
    flex: 2;
}

.video-container {
    position: relative;
    width: 100%;
    /* aspect-ratio: 16/9; */
    /* 移除固定的宽高比 */
    background-color: black;
    border-radius: 0.75rem;
    overflow: hidden;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #333, #555);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    background-color: rgba(168, 107, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 1.25rem rgba(168, 107, 0, 0.6);
    margin: 0;
}

.play-button-overlay:hover {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 1.125rem 0 1.125rem 1.875rem;
    border-color: transparent transparent transparent var(--white-color);
    margin-left: 0.3125rem;
}

/*
    .video-controls {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
      padding: 20px;
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .progress-bar {
      flex: 1;
      height: 4px;
      background: rgba(255, 255, 255, 0.3);
      border-radius: 2px;
      overflow: hidden;
      cursor: pointer;
    }

    .progress-fill {
      height: 100%;
      background: var(--primary-color);
      width: 0%;
      transition: width 0.3s ease;
    }

    .time-display {
      color: white;
      font-size: 12px;
      font-weight: 500;
    }

    .control-buttons {
      display: flex;
      gap: 10px;
    }

    .control-btn {
      width: 32px;
      height: 32px;
      background: rgba(255, 255, 255, 0.2);
      border: none;
      border-radius: 6px;
      color: white;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .control-btn:hover {
      background: rgba(255, 255, 255, 0.3);
    }
    */

.player-info {
    text-align: center;
    padding-top: 1.5rem;
}

.player-info-text {
    color: var(--primary-light-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .episode-player-container {
        flex-direction: row;
        align-items: flex-start;
        /* MODIFICATION: Align items to the top */
    }

    .episode-list {
        flex: 1;
        max-width: 21.875rem;
    }
}

@media (max-width: 500px) {
    #videoPlayer {
        width: 100% !important;
    }
}