/* Premium Player Section */
.player-section {
    max-width: 1600px;
    width: 100%;
    height: auto;
    margin: 60px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

.player-container {
    display: flex;
    margin: 0;
    width: calc(100% - 400px);
    min-width: 800px;
    aspect-ratio: 16/9;
    background: var(--primary-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-depth);
    border: 2px solid var(--glass-border);
    position: relative;
}

.player-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.episode-container {
    display: flex;
    flex-direction: column;
    margin: 0;
    width: 380px;
    max-height: calc(100vh - 200px);
    background: var(--glass-medium);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.description-container {
    width: calc(100% - 400px);
    min-width: 800px;
    min-height: 200px;
    height: auto;
    background: var(--glass-medium);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: var(--shadow-depth);
    color: var(--text-muted);
    line-height: 1.8;
}

.description-container a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.description-container a:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

.ranking-container {
    width: 380px;
    height: auto;
    margin-top: 20px;
    overflow: visible;
}

.ranking {
    float: right;
    width: 100%;
    height: auto;
    padding: 25px;
    text-align: center;
    color: var(--text-main);
    background: var(--glass-medium);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-depth);
}

.ranking-label {
    font-size: 22px;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ranking ul {
    text-align: left;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.ranking ul li {
    width: 100%;
    min-height: 50px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    padding: 12px 15px;
    border-radius: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--surface-card);
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ranking ul li:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
    transform: translateX(5px);
}

.ranking ul li:nth-child(1) {
    min-height: 200px;
    color: var(--gold-primary);
    font-weight: 700;
    overflow-x: hidden;
    position: relative;
    white-space: normal;
    background: var(--secondary-bg);
    border: 2px solid var(--gold-primary);
    box-shadow: var(--shadow-glow);
}

.ranking ul li:nth-child(2),
.ranking ul li:nth-child(3) {
    color: var(--gold-primary);
    font-weight: 600;
    border-left: 3px solid var(--gold-primary);
}

.rank1-image {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 120px;
    height: 160px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-depth);
    border: 2px solid var(--gold-primary);
}

.ranking ul li a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ranking ul li:hover a {
    color: var(--gold-primary);
}

.suggestion-container {
    display: block;
    margin-top: 60px;
    width: 100%;
    height: auto;
}

/* Premium Switch Bar */
.switch-bar {
    width: 100%;
    height: 60px;
    background: var(--glass-medium);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: var(--shadow-depth);
}

/* Premium Sub-Dub Switch */
.subdub-switch {
    position: relative;
    display: inline-block;
    width: 110px;
    height: 40px;
    cursor: pointer;
}

.subdub-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.subdub-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    bottom: 0;
    background: var(--gold-gradient);
    transition: 0.4s;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.subdub-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 32px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-main);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

input:checked+.subdub-slider {
    background: linear-gradient(135deg, var(--gold-primary) 0%, #d4af37 100%);
}

input:focus+.subdub-slider {
    box-shadow: 0 0 1px var(--gold-primary);
}

input:checked+.subdub-slider:before {
    transform: translateX(70px);
}

input:checked+.subdub-slider+.subdub-desc span:nth-child(1) {
    display: none;
}

input:checked+.subdub-slider+.subdub-desc span:nth-child(2) {
    display: block;
    position: relative;
    left: -25px;
}

input+.subdub-slider+.subdub-desc span:nth-child(1) {
    display: block;
}

input+.subdub-slider+.subdub-desc span:nth-child(2) {
    display: none;
}

.subdub-desc {
    position: absolute;
    top: 0;
    right: 15px;
    width: 70px;
    height: 40px;
    text-align: center;
    line-height: 2.5em;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.subdub-slider.subdub-round {
    border-radius: 40px;
}

.subdub-slider.subdub-round:before {
    border-radius: 50%;
}

.switch-container {
    max-width: 1200px;
    width: 100%;
    height: auto;
    margin: 20px auto;
    padding: 0 20px;
}

/* Premium Episode Container */
.episode-count {
    width: 100%;
    height: 60px;
    background: var(--surface-card);
    color: var(--text-main);
    text-align: center;
    line-height: 3.5em;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.episode-list-container {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

.episode-list-container::-webkit-scrollbar {
    width: 8px;
}

.episode-list-container::-webkit-scrollbar-track {
    background: var(--primary-bg);
    border-radius: 10px;
}

.episode-list-container::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}

.episode-block {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    line-height: 3.2em;
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--surface-card);
    border: 2px solid var(--glass-border);
    margin: 6px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.episode-block:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold-primary);
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.episode-block a {
    color: var(--text-main);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 46px;
    transition: color 0.3s ease;
}

.episode-block:hover a {
    color: var(--gold-primary);
}

.episode-block_view-mark {
    width: 100%;
    height: 14px;
    background: rgba(212, 175, 55, 0.3);
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 9px;
    line-height: 1.4em;
    border-radius: 0 0 8px 8px;
    color: var(--gold-primary);
    font-weight: 700;
}

.view-mark a {
    color: var(--gold-primary) !important;
    font-weight: 700;
}

/* Responsive Design */
@media only screen and (max-width: 1400px) {
    .player-container {
        width: 100%;
        min-width: 100%;
    }

    .episode-container {
        width: 100%;
        max-height: 500px;
        order: 3;
    }

    .description-container {
        width: 100%;
        min-width: 100%;
        order: 2;
    }

    .ranking-container {
        width: 100%;
        order: 5;
    }

    .ranking {
        float: none;
    }

    .suggestion-container {
        order: 4;
    }
}

@media only screen and (max-width: 768px) {
    .player-section {
        margin: 30px auto;
        padding: 0 10px;
        gap: 15px;
    }

    .player-container {
        aspect-ratio: 16/9;
        border-radius: 12px;
    }

    .episode-container {
        border-radius: 12px;
    }

    .description-container {
        padding: 20px;
        border-radius: 12px;
        font-size: 14px;
    }

    .ranking {
        padding: 20px;
        border-radius: 12px;
    }

    .switch-bar {
        height: 50px;
        padding: 0 15px;
        border-radius: 12px;
    }

    .episode-block {
        width: 45px;
        height: 45px;
        margin: 4px;
    }

    .episode-block a {
        line-height: 41px;
    }
}

/* Premium Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.player-section>* {
    animation: fadeIn 0.6s ease-out;
}

/* Auto-next episode overlay */
.auto-next-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.auto-next-overlay-inner {
    background: var(--surface-card);
    border: 2px solid var(--gold-primary);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    max-width: 400px;
    box-shadow: var(--shadow-glow);
}

.auto-next-overlay-title {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 24px;
}

.auto-next-overlay-title #auto-next-countdown {
    color: var(--gold-primary);
    font-weight: 800;
    font-size: 1.5rem;
}

.auto-next-overlay-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.auto-next-overlay-buttons .btn {
    min-width: 140px;
}