/* player.css - 播放器舞台及高级弹幕核心注入样式 */
.player-stage {
    position: relative; width: 100%; height: 100%; background-color: #000;
    overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.player-stage:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }
.player-stage:-webkit-full-screen { width: 100vw; height: 100vh; border-radius: 0; }

.player-stage.forced-landscape {
    width: 100vh !important; height: 100vw !important;
    transform: rotate(90deg); transform-origin: top left;
    position: fixed; top: 0; left: 100%; z-index: 99999; border-radius: 0;
}

.player-stage video { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }

#danmaku-stage {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 10; overflow: hidden;
}
#danmaku-stage .cmt {
    position: absolute !important; padding: 0 !important; margin: 0 !important;
    word-break: keep-all !important; white-space: nowrap !important;
    will-change: transform; pointer-events: none;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,1), -1px -1px 2px rgba(0,0,0,1), 1px -1px 2px rgba(0,0,0,1), -1px 1px 2px rgba(0,0,0,1) !important;
}

.center-feedback-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6);
    width: 60px; height: 60px; background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    z-index: 15; opacity: 0; pointer-events: none;
}
.center-feedback-icon svg { width: 26px; height: 26px; fill: #00e5ff; }

@keyframes pulseFeedback {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    45% { opacity: 1; transform: translate(-50%, -50%) scale(1.0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}
.center-feedback-icon.run-anim { animation: pulseFeedback 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; }

.landscape-rotate-btn {
    position: absolute; top: 15px; right: 15px; z-index: 25; background: rgba(11, 15, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15); color: #00e5ff; padding: 6px 12px;
    font-size: 11px; border-radius: 20px; cursor: pointer; font-weight: bold; display: none;
    align-items: center; gap: 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.landscape-rotate-btn svg { width: 14px; height: 14px; fill: #00e5ff; }
.player-stage.is-fullscreen .landscape-rotate-btn { display: flex; }

.player-ui-controls {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(11,15,25,0.98) 0%, rgba(11,15,25,0.7) 70%, rgba(11,15,25,0) 100%);
    padding: 12px; box-sizing: border-box; z-index: 20;
    display: flex; flex-direction: column; gap: 8px;
    opacity: 0; transition: opacity 0.3s ease;
}
.player-stage:hover .player-ui-controls, .player-stage.ui-active .player-ui-controls { opacity: 1; }

.progress-container { width: 100%; height: 4px; background: rgba(255, 255, 255, 0.15); border-radius: 2px; cursor: pointer; position: relative; transition: height 0.1s; }
.progress-container:hover { height: 6px; }
.progress-bar { height: 100%; width: 0%; background: #00e5ff; border-radius: 2px; position: absolute; }

.controls-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.controls-left, .controls-right { display: flex; align-items: center; gap: 6px; }

button.action-btn {
    background: none; border: none; color: #cbd5e1; padding: 6px; border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; position: relative;
}
button.action-btn:hover { background: rgba(255,255,255,0.1); color: #00e5ff; }
button.action-btn svg { width: 18px; height: 18px; fill: currentColor; }

.play-btn.is-playing .icon-play { display: none; }
.play-btn:not(.is-playing) .icon-pause { display: none; }

.mute-btn.is-muted .icon-volume-on { display: none; }
.mute-btn:not(.is-muted) .icon-volume-mute { display: none; }

.time-display { font-size: 12px; color: #9ca3af; font-family: monospace; }

.local-dropdown-card {
    position: absolute; bottom: 42px; right: 0; width: 360px;
    background: rgba(15, 23, 42, 0.98); border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.2); padding: 12px;
    display: none; flex-direction: column; gap: 10px; box-sizing: border-box; z-index: 35;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); transform-origin: bottom right;
}

.input-bar-group { display: flex; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; overflow: hidden; background: #0b0f19; }
.input-bar-group input { flex: 1; background: transparent; border: none; color: #fff; padding: 0 10px; font-size: 12px; outline: none; height: 34px; width: 40%; }

.input-bar-btn { background: none; border: none; color: #9ca3af; padding: 0 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.input-bar-btn:hover { color: #00e5ff; }
.input-bar-btn svg { width: 16px; height: 16px; fill: currentColor; }

.submit-danmu-btn { background: #00e5ff !important; color: #0b0f19 !important; padding: 0 14px !important; font-weight: bold; font-size: 12px; }

.base-setting-panel { display: flex; flex-direction: column; gap: 8px; }

.settings-expand-panel { 
    display: none; background: #0b0f19; border-radius: 6px; border: 1px solid rgba(255,255,255,0.05); 
    padding: 10px; flex-direction: column; gap: 10px; max-height: 200px; overflow-y: auto; 
}

.panel-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #cbd5e1; width: 100%; justify-content: flex-start; }
.panel-row label { color: #9ca3af; font-weight: bold; font-size: 11px; white-space: nowrap; }

.panel-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; width: 100%; }
.grid-item { display: flex; flex-direction: column; gap: 4px; }
.grid-item-row { display: flex; align-items: center; gap: 6px; }

.option-group { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; align-items: center; }
.opt-btn {
    background: #1e293b; color: #cbd5e1; border: 1px solid transparent;
    padding: 3px 8px; border-radius: 4px; font-size: 11px; cursor: pointer; transition: all 0.15s;
}
.opt-btn:hover { background: #334155; color: #fff; }
.opt-btn.is-active { background: rgba(0, 229, 255, 0.15); color: #00e5ff; border-color: #00e5ff; }

.m7-input {
    background: #1e293b; border: 1px solid #334155; color: #fff; border-radius: 4px;
    padding: 4px 6px; font-size: 11px; width: 55px; outline: none; box-sizing: border-box;
}
.m7-input:focus { border-color: #00e5ff; background: #0f172a; }

.m7-select {
    background: #1e293b; border: 1px solid #334155; color: #fff; border-radius: 4px;
    padding: 3px 4px; font-size: 11px; width: 75px; outline: none; cursor: pointer;
}

.color-dot { width: 14px; height: 14px; border-radius: 2px; cursor: pointer; border: 1px solid rgba(0,0,0,0.5); box-sizing: border-box; }
.color-dot.is-active { border: 2px solid #fff; transform: scale(1.1); box-shadow: 0 0 4px #00e5ff; }

.m7-checkbox-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #cbd5e1; cursor: pointer; }
.m7-checkbox { accent-color: #00e5ff; width: 13px; height: 13px; cursor: pointer; }

.switch-container { position: relative; width: 34px; height: 18px; background: #475569; border-radius: 9px; cursor: pointer; transition: background 0.2s; }
.switch-handle { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: left 0.2s; }
.switch-container.is-on { background: #22c55e; }
.switch-container.is-on .switch-handle { left: 18px; }

.range-slider { flex: 1; -webkit-appearance: none; height: 4px; background: #475569; border-radius: 2px; outline: none; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; background: #00e5ff; border-radius: 50%; cursor: pointer; }
.slider-value { font-size: 11px; color: #00e5ff; font-family: monospace; width: 30px; text-align: right; }

.m7-divider { width: 100%; height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }

.video-state-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); z-index: 22;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.state-title { font-size: 15px; color: #e5e7eb; letter-spacing: 1px; }
.replay-action-btn {
    background: #00e5ff; color: #0b0f19; border: none; padding: 8px 18px;
    border-radius: 20px; font-weight: bold; font-size: 12px; cursor: pointer;
    display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 12px rgba(0,229,255,0.3);
}
.replay-action-btn svg { width: 14px; height: 14px; fill: #0b0f19; }
.loop-hint-txt { font-size: 11px; color: #9ca3af; font-style: italic; }

@media (max-width: 420px) {
    .local-dropdown-card { width: 310px; right: -20px; }
    #setting-local-card { width: 260px; right: 0; }
}
