/* Streaming Mode Styles */

/* Loading Screen */
#stream-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9500;
    display: none;
    align-items: center;
    justify-content: center;
}

#stream-loading-screen.active {
    display: flex;
}

.loading-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(20px) brightness(0.3);
    z-index: 1;
    pointer-events: none;
}

.loading-info {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    pointer-events: auto;
}

.loading-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--accent-hover, #F0BB68);
}

.loading-status {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ccc;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(240, 187, 104, 0.2);
    border-top: 5px solid var(--accent-hover, #F0BB68);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-hover, #F0BB68);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.loading-back-btn:hover {
    background: var(--accent-hover, #F0BB68);
    transform: scale(1.05);
}

/* Stream Player Container */
#stream-player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9000;
    display: none;
    cursor: default;
    transition: cursor 0.3s ease;
}

#stream-player-container.active {
    display: block;
}

/* Hide cursor when idle */
#stream-player-container.idle {
    cursor: none;
}

/* Player Top Bar */
.stream-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 25px 35px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    z-index: 9100;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: auto;
}

#stream-player-container.idle .stream-top-bar {
    opacity: 0;
    pointer-events: none;
}

#stream-player-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-hover, #F0BB68);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: opacity 0.4s ease;
}

.stream-embed-exit {
    position: absolute;
    top: 22px;
    left: 24px;
    z-index: 9300;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.stream-embed-exit:hover {
    background: rgba(240, 187, 104, 0.96);
    color: #111;
}

.stream-embed-exit .material-icons {
    font-size: 22px;
}

/* Video Element */
#stream-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stream-sandbox-hint {
    position: absolute;
    top: 78px;
    right: 32px;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(720px, calc(100vw - 64px));
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(16, 12, 8, 0.9);
    border: 1px solid rgba(240, 187, 104, 0.45);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.stream-sandbox-hint strong {
    color: var(--accent-hover, #F0BB68);
}

.stream-sandbox-hint span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
}

.stream-sandbox-hint button {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--accent-hover, #F0BB68);
    color: #111;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* Subtitle Overlay (like player.html) */
#subtitle-overlay {
    position: absolute;
    bottom: clamp(70px, 12vh, 130px);
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
    z-index: 50;
    text-shadow: 0 0 10px rgba(0,0,0,1), 0 0 5px black;
    color: #fff;
    font-weight: 600;
    font-size: clamp(16px, 4.5vw, 32px);
    padding: 0 12%;
    box-sizing: border-box;
    line-height: 1.4;
    display: none;
}

/* Skip Segment Button */
.skip-segment-btn {
    position: absolute;
    bottom: 180px;
    right: 40px;
    background: linear-gradient(135deg, var(--accent-hover, #F0BB68), #C57D2E);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 115;
    box-shadow: 0 8px 32px rgba(240, 187, 104, 0.5);
    transition: all 0.3s ease;
    animation: skipPulse 2s ease-in-out infinite;
    pointer-events: auto;
}

.skip-segment-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(240, 187, 104, 0.7);
}

.skip-segment-btn .material-icons {
    font-size: 20px;
}

@keyframes skipPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(240, 187, 104, 0.5); }
    50% { box-shadow: 0 8px 40px rgba(240, 187, 104, 0.8); }
}

/* Next Episode Button */
.next-episode-btn {
    position: absolute;
    bottom: 250px;
    right: 40px;
    background: linear-gradient(135deg, var(--accent-hover, #F0BB68), #C57D2E);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 115;
    box-shadow: 0 8px 32px rgba(240, 187, 104, 0.5);
    transition: all 0.3s ease;
    animation: nextEpPulse 2s ease-in-out infinite;
    pointer-events: auto;
}

.next-episode-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(240, 187, 104, 0.7);
}

.next-episode-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
}

.next-episode-btn .material-icons {
    font-size: 24px;
}

.next-episode-btn .next-ep-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.next-episode-btn .next-ep-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.next-episode-btn .next-ep-title {
    font-size: 15px;
}

@keyframes nextEpPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(240, 187, 104, 0.5); }
    50% { box-shadow: 0 8px 40px rgba(240, 187, 104, 0.8); }
}

.next-episode-btn.loading .material-icons {
    animation: spin 1s linear infinite;
}

/* Controls Overlay */
.stream-controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 40px 45px 40px;
    background: linear-gradient(to top, rgba(14, 10, 8, 0.98) 0%, rgba(14, 10, 8, 0.85) 60%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
    transition: opacity 0.4s ease;
    z-index: 9100;
    pointer-events: auto;
}

#stream-player-container.idle .stream-controls-overlay {
    opacity: 0;
    pointer-events: none;
}

/* When a third-party provider iframe is playing, the app's own overlay controls
   cannot drive it (cross-origin) and, sitting at z-index 9100 over the iframe (z-99),
   they steal every click meant for the provider's player. Hide them reactively so the
   provider's controls are fully usable. The top bar (back + title) stays for exiting.
   Belt-and-suspenders to the JS display:none, and path/timing independent. */
#stream-player-container:has(iframe) .stream-controls-overlay,
#stream-player-container:has(iframe) #subtitle-overlay,
#stream-player-container:has(iframe) .skip-segment-btn,
#stream-player-container:has(iframe) .stream-menu-popup {
    display: none !important;
    pointer-events: none !important;
}

/* Source Picker Bar */
#source-picker-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 100;
    background: rgba(11, 11, 15, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.source-pick-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.source-pick-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    align-items: center;
}

.source-pick-list::-webkit-scrollbar {
    display: none;
}

.source-pick-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: var(--font-sans, 'Inter', sans-serif);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.source-pick-btn:hover {
    background: rgba(229, 169, 79, 0.15);
    border-color: rgba(229, 169, 79, 0.4);
    color: #fff;
}

.source-pick-btn.active {
    background: var(--accent, #E5A94F);
    border-color: var(--accent, #E5A94F);
    color: #0B0B0F;
    font-weight: 700;
}

.source-pick-btn.pl-provider {
    border-color: rgba(220, 20, 60, 0.35);
}
.source-pick-btn.pl-provider:hover {
    background: rgba(220, 20, 60, 0.18);
    border-color: rgba(220, 20, 60, 0.7);
}
.source-pick-btn.pl-provider.active {
    background: #DC143C;
    border-color: #DC143C;
    color: #fff;
}
.source-pick-pl {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 800;
    background: #DC143C;
    color: #fff;
    border-radius: 3px;
    padding: 1px 4px;
    margin-right: 5px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.source-pick-btn.active .source-pick-pl {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.source-pick-sep {
    width: 1px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    margin: 4px 2px;
    align-self: stretch;
}
.source-pick-ads {
    border-color: rgba(255, 170, 0, 0.3);
    color: rgba(255,255,255,0.6);
}
.source-pick-ads:hover {
    background: rgba(255, 170, 0, 0.12);
    border-color: rgba(255, 170, 0, 0.55);
    color: rgba(255,255,255,0.9);
}
.source-pick-ads-badge {
    display: inline-block;
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border-radius: 3px;
    padding: 1px 4px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Progress Bar */
.stream-progress-wrapper {
    padding: 15px 0;
    cursor: pointer;
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
}

.stream-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    position: relative;
    transition: height 0.2s ease;
}

.stream-progress-wrapper:hover .stream-progress-container {
    height: 8px;
}

.stream-progress-bar {
    height: 100%;
    background: var(--accent-hover, #F0BB68);
    width: 0%;
    border-radius: 3px;
    box-shadow: 0 0 15px var(--accent-hover, #F0BB68);
    transition: box-shadow 0.2s ease;
    position: relative;
}

/* Progress Handle (hidden by default, shows on hover of progress container) */
.stream-progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px;
    height: 12px;
    background: var(--accent-hover, #F0BB68);
    border: 2px solid #000;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(240, 187, 104, 0.8);
    transition: transform 0.2s ease;
    z-index: 10;
}

.stream-progress-wrapper:hover .stream-progress-bar::after {
    transform: translateY(-50%) scale(1);
}

.stream-progress-wrapper:hover .stream-progress-bar {
    box-shadow: 0 0 20px var(--accent-hover, #F0BB68);
}

/* Seek Preview Tooltip */
.seek-preview-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--accent-hover, #F0BB68);
    border-radius: 6px;
    padding: 6px 12px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.seek-preview-time {
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: monospace;
}

/* Controls Row */
.stream-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.stream-left-controls,
.stream-right-controls {
    display: flex;
    align-items: center;
    gap: 25px;
}

.stream-icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-icon-btn:hover {
    background: rgba(240, 187, 104, 0.25);
    color: #EBBC6B;
    transform: scale(1.1);
}

.stream-icon-btn .material-icons {
    font-size: 38px;
}

/* Tap-to-play overlay (shown when a mobile browser blocks autoplay-with-sound) */
#tap-to-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 9200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    cursor: pointer;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}
#tap-to-play-overlay .tap-to-play-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(240, 187, 104, 0.95);
    color: #16100B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    padding-left: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* Responsive: phones / small screens */
@media (max-width: 640px) {
    .stream-controls-overlay { padding: 10px 12px 22px; }
    .stream-left-controls,
    .stream-right-controls { gap: 12px; }
    .stream-icon-btn { padding: 6px; }
    .stream-icon-btn .material-icons { font-size: 26px; }
    .volume-slider { width: 56px; }
    .skip-segment-btn { right: 16px; bottom: 96px; }
    #stream-time-display { font-size: 13px; }
}

/* Time Display */
#stream-time-display {
    font-size: 16px;
    font-weight: 600;
    color: #ddd;
}

/* Volume Controls */
.stream-volume-control {
    display: flex;
    align-items: center;
    gap: 0;
    transition: gap 0.2s ease;
}

.volume-slider-container {
    width: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease;
    opacity: 0;
    display: flex;
    align-items: center;
}

.stream-volume-control:hover .volume-slider-container,
.stream-volume-control:focus-within .volume-slider-container {
    width: 90px;
    opacity: 1;
    margin-left: 8px;
}

.volume-slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--accent-hover, #F0BB68) 0%, var(--accent-hover, #F0BB68) var(--volume-percent, 100%), rgba(255, 255, 255, 0.2) var(--volume-percent, 100%), rgba(255, 255, 255, 0.2) 100%);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    transition: background 0.1s ease;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-hover, #F0BB68);
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(240, 187, 104, 0.8);
    transition: transform 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent-hover, #F0BB68);
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(240, 187, 104, 0.8);
    transition: transform 0.1s ease;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.25);
}

/* Settings Menu */
.stream-menu-popup {
    position: absolute;
    bottom: 120px;
    right: 40px;
    background: rgba(11, 11, 15, 0.95);
    border: 1px solid rgba(240, 187, 104, 0.4);
    border-radius: 24px;
    width: 360px;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    z-index: 9200;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    backdrop-filter: blur(25px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(30px);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stream-menu-popup.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.stream-menu-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 700;
    font-size: 22px;
    color: #EBBC6B;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stream-scrollable-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
    padding: 10px 15px;
}

.auto-provider-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: rgba(240, 187, 104, 0.16);
    border: 1px solid rgba(240, 187, 104, 0.28);
    color: #fff;
}

.auto-provider-summary .material-icons {
    color: var(--accent-hover, #F0BB68);
}

.auto-provider-summary strong,
.auto-provider-summary small {
    display: block;
}

.auto-provider-summary small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.stream-language-select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(240, 187, 104, 0.35);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    outline: none;
}

.stream-language-select option {
    color: #111;
}

.advanced-provider-details {
    margin: 8px 0 4px;
    color: rgba(255, 255, 255, 0.78);
}

.advanced-provider-details summary {
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--accent-hover, #F0BB68);
    font-weight: 700;
}

.advanced-provider-details summary:hover {
    background: rgba(240, 187, 104, 0.12);
}

.stream-scrollable-list::-webkit-scrollbar {
    width: 5px;
}

.stream-scrollable-list::-webkit-scrollbar-thumb {
    background: var(--accent-hover, #F0BB68);
    border-radius: 10px;
}

.provider-btn,
.quality-btn,
.sub-item {
    padding: 16px 22px;
    cursor: pointer;
    border-radius: 14px;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.2s;
    margin-bottom: 6px;
    background: none;
    border: none;
    color: white;
    width: 100%;
    text-align: left;
    position: relative;
}

.provider-btn:hover,
.quality-btn:hover,
.sub-item:hover {
    background: rgba(240, 187, 104, 0.2);
}

.provider-btn.active,
.quality-btn.active {
    background: var(--accent-hover, #F0BB68);
    color: white;
    font-weight: 600;
}

.sub-item.active {
    background: rgba(240, 187, 104, 0.3);
    border-left: 3px solid var(--accent-hover, #F0BB68);
}

.sub-item.active .sub-check-icon {
    opacity: 1;
}

.sub-check-icon {
    opacity: 0;
    color: var(--accent-hover, #F0BB68);
    font-size: 20px;
    margin-left: auto;
    transition: opacity 0.2s;
}

.sub-icon {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
}

.sub-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sub-downloads {
    font-size: 12px;
    color: rgba(240, 187, 104, 0.8);
}

.sub-hi-badge {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.sub-provider-badge {
    background: rgba(240, 187, 104, 0.3);
    color: #EBBC6B;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(240, 187, 104, 0.5);
}

.sub-lang-header {
    padding: 12px 22px 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-hover, #F0BB68);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(240, 187, 104, 0.2);
    margin-bottom: 6px;
}

.sub-search-box {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.sub-search-input {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 187, 104, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.sub-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-hover, #F0BB68);
}

.sub-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.no-subs {
    padding: 30px;
    text-align: center;
    color: #666;
}

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
}

.settings-modal.active {
    display: flex;
}

.settings-modal-content {
    background: #241A12;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.settings-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.settings-modal-close:hover {
    background: rgba(240, 187, 104, 0.2);
}

.settings-modal h2 {
    color: var(--accent-hover, #F0BB68);
    margin-bottom: 30px;
    font-size: 28px;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-option:last-child {
    border-bottom: none;
}

.settings-option-label {
    font-size: 18px;
    color: white;
}

.settings-option-description {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent-hover, #F0BB68);
}

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

/* Settings Modal */
.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-modal.active {
    display: flex;
    opacity: 1;
}

.settings-modal-content {
    background: linear-gradient(135deg, #241A12 0%, #2A1E12 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(229, 169, 79, 0.2);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.settings-modal-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 30px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--accent, #E5A94F), #5BB89C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.settings-modal-close:hover {
    background: rgba(239, 68, 68, 0.8);
    transform: rotate(90deg);
}

.settings-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.settings-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.settings-option-label {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.settings-option-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent, #E5A94F), #5BB89C);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-slider:hover {
    box-shadow: 0 0 10px rgba(229, 169, 79, 0.5);
}


/* Subtitle Settings */
.stream-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.subtitle-setting {
    padding: 15px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subtitle-setting label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.subtitle-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.subtitle-slider-container input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.subtitle-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-hover, #F0BB68);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(240, 187, 104, 0.5);
}

.subtitle-slider-container input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--accent-hover, #F0BB68);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(240, 187, 104, 0.5);
}

.subtitle-slider-container span {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-hover, #F0BB68);
}

/* Cast Device Selection Modal */
.cast-device-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cast-device-modal-content {
    background: #241A12;
    border: 2px solid var(--accent-hover, #F0BB68);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cast-device-modal-content h2 {
    color: var(--accent-hover, #F0BB68);
    margin: 0 0 20px 0;
    font-size: 24px;
    text-align: center;
}

.cast-device-list {
    margin-bottom: 20px;
}

.cast-loading {
    text-align: center;
    color: #ccc;
    padding: 20px;
    font-size: 16px;
}

.cast-device-item {
    background: rgba(240, 187, 104, 0.1);
    border: 2px solid rgba(240, 187, 104, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.cast-device-item:hover {
    background: rgba(240, 187, 104, 0.2);
    border-color: var(--accent-hover, #F0BB68);
    transform: translateX(5px);
}

.cast-device-name {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cast-device-host {
    color: #999;
    font-size: 14px;
    font-family: monospace;
}

.cast-cancel-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #666;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cast-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #999;
}

.cast-device-modal-content h3 {
    color: var(--accent-hover, #F0BB68);
    margin: 0 0 15px 0;
    font-size: 18px;
}

.cast-subtitle-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.cast-subtitle-item {
    background: rgba(240, 187, 104, 0.1);
    border: 2px solid rgba(240, 187, 104, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    font-size: 16px;
}

.cast-subtitle-item:hover {
    background: rgba(240, 187, 104, 0.2);
    border-color: var(--accent-hover, #F0BB68);
}

.cast-subtitle-item.selected {
    background: rgba(240, 187, 104, 0.3);
    border-color: var(--accent-hover, #F0BB68);
}

.cast-continue-btn {
    width: 100%;
    background: var(--accent-hover, #F0BB68);
    border: 2px solid var(--accent-hover, #F0BB68);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.cast-continue-btn:hover {
    background: #7b2cbf;
    border-color: #7b2cbf;
}

.cast-skip-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #666;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.cast-skip-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #999;
}

/* Double click seek indicators */
.seek-ripple-container {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 9100;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.seek-ripple-container.left {
    left: 0;
    background: linear-gradient(to right, rgba(240, 187, 104, 0.1), transparent);
}

.seek-ripple-container.right {
    right: 0;
    background: linear-gradient(to left, rgba(240, 187, 104, 0.1), transparent);
}

.seek-ripple-container.animate {
    opacity: 1;
    animation: seekFadeOut 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.seek-ripple-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(240, 187, 104, 0.15);
    border: 1px solid rgba(240, 187, 104, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: scale(0.6);
    animation: seekGrow 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    box-shadow: 0 0 30px rgba(240, 187, 104, 0.1), inset 0 0 15px rgba(240, 187, 104, 0.05);
}

.seek-ripple-text {
    color: var(--accent-hover, #F0BB68);
    font-size: 14px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    margin-top: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.seek-ripple-arrows {
    color: var(--accent-hover, #F0BB68);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes seekGrow {
    0% { transform: scale(0.5); }
    100% { transform: scale(1); }
}

@keyframes seekFadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
