/* Video Player Styles - Inline with Native Controls */

#player-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#player-container.hidden {
    display: none;
}

#video-player {
    width: 100%;
    max-height: 100%;
    background-color: #000;
}

/* Hide timeline scrubber — meaningless on live streams */
#video-player::-webkit-media-controls-timeline,
#video-player::-webkit-media-controls-current-time-display,
#video-player::-webkit-media-controls-time-remaining-display {
    display: none;
}

#close-inline-player {
    position: absolute;
    top: env(safe-area-inset-top, 10px);
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: env(safe-area-inset-top, 0);
}

#close-inline-player:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Stream Loading Overlay - fullscreen spinner shown while stream buffers */
#stream-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#stream-loading.hidden {
    display: none;
}

#stream-loading .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#stream-loading .channel-name {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 500;
}

#stream-loading .status {
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

#tap-to-play {
    margin-top: 20px;
    padding: 14px 36px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#tap-to-play.hidden {
    display: none;
}

#cancel-loading {
    position: absolute;
    bottom: max(40px, env(safe-area-inset-bottom, 40px));
    padding: 8px 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

#cancel-loading.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
