/* Player CSS from Dada Pro Port */
.bf-h {
    position: relative;
    overflow: hidden;
    background: #000;
    width: 100%;
    height: 650px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-bg-blur {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(25px);
    opacity: 0.6;
    transform: scale(1.2);
}

.hero-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 2;
}

#player-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

#dada-player {
    width: 100% !important;
    height: 100% !important;
    max-width: 1200px;
    background: transparent;
}

.player-speed {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

#route-switcher {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 50;
    padding: 20px;
    overflow-y: auto;
    color: #fff;
}

#route-switcher.show {
    display: block;
}

.route-error-msg {
    font-size: 16px;
    color: #f44336;
    margin-bottom: 4px;
    font-weight: 500;
}

.route-error-detail {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.route-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.route-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 14px;
    color: #fff;
    cursor: pointer;
    text-align: center;
    min-width: 80px;
    text-decoration: none;
    transition: background 0.2s;
}

.route-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

.route-name {
    font-size: 13px;
    display: block;
}

.route-speed {
    font-size: 11px;
    display: block;
    margin-top: 2px;
}

#pause-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 60;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
}

#pause-overlay.show {
    display: flex;
}

.pause-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.pause-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
    cursor: pointer;
}

.pause-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.pause-nav-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
}

.pause-nav-btn i {
    margin-right: 6px;
}

.pause-current-label {
    font-size: 16px;
    color: #ccc;
}

.pause-ep-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
    text-align: center;
}

.pause-ep-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    max-height: 40vh;
    overflow-y: auto;
    padding: 10px;
}

.pause-ep-grid a {
    display: block;
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    min-width: 40px;
    text-align: center;
    transition: background 0.2s;
}

.pause-ep-grid a:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.pause-ep-grid a.on {
    background: #ff9800;
    color: #000;
    font-weight: bold;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.modal-overlay.show {
    display: block;
}

.history-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 70vh;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.history-modal.show {
    display: flex;
}

.history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.history-head h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.history-close {
    cursor: pointer;
    font-size: 24px;
    color: #999;
    line-height: 1;
}

.history-list {
    list-style: none;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    flex: 1;
}

.history-list li a {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: inherit;
}

.history-list li a:hover {
    background: #f9f9f9;
}

.history-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.history-item-sub {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.empty-history {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.video-js.vjs-fullscreen #pause-overlay {
    position: fixed;
    z-index: 2147483647;
}

@media (max-width: 768px) {
    .bf-h {
        height: 56.25vw;
        margin: 0 -20px 10px -20px;
        width: calc(100% + 40px);
        border-radius: 0;
    }

    #dada-player {
        max-width: none;
    }

    .hero-bg {
        display: none;
    }
}

@media (max-width: 640px) {
    .bf-h {
        height: 56.25vw;
        margin: 0 -20px 10px -20px;
        width: calc(100% + 40px);
    }
}
