﻿/*body {
    font-family: Arial, sans-serif;
    margin: 20px;
}*/

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: sans-serif;
    overflow-x: hidden;
}

form, #form1 {
    height: 100%;
    width: 100%;
}

.section {
    margin-bottom: 20px;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

.error {
    color: #b00020;
    margin-top: 10px;
}

.video-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-list-item {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.video-list li {
    margin-bottom: 10px;
}

.video-link {
    cursor: pointer;
    color: #0d6efd;
    text-decoration: underline;
    font-size: 16px;
    line-height: 1.4;
    word-break: break-word;
}

.video-frame-container {
    max-width: 900px;
}

.video-frame {
    width: 100%;
    height: 500px;
    border: 0;
}

.btn {
    padding: 10px 14px;
    cursor: pointer;
    margin-left: 6px;
    font-size: 16px;
}

.input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="text"] {
    padding: 10px 12px;
    width: 250px;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

#videoTitle {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 80px;
    z-index: 10000;
    color: #ddd;
    font-size: 16px;
    font-weight: normal;
    margin: 0;
    background: rgba(0,0,0,0.4);
    padding: 6px 10px;
    border-radius: 4px;
    line-height: 1.3;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 400;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 28px;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 6px;
}

#videoListSection {
    height: 100vh;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

#videoPlayerSection {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: black;
    z-index: 9999;
    overflow: hidden;
}

#playerContainer,
#playerWrap,
#player {
    width: 100%;
    height: 100%;
}

#player {
    z-index: 100;
    position: relative;
}

#interactionBlocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0);
    pointer-events: auto;
    display: block;
}

#customControls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 10px;
    box-sizing: border-box;
    z-index: 300;
}

    #customControls button {
        padding: 8px 10px;
        font-size: 16px;
        border-radius: 6px;
        border: none;
    }

#volumeSlider {
    padding: 2px;
    font-size: 5px;
    border-radius: 6px;
    border: none;
    width: 90px;
    height: 28px;
}

#seekBar {
    padding: 2px;
    font-size: 5px;
    border-radius: 6px;
    border: none;
    flex: 1 1 240px;
    min-width: 140px;
    max-width: 100%;
    height: 28px;
}

.seek-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 150px;
}

.seek-group label {
    white-space: nowrap;
}

.seek-group input {
    flex: 1;
}

#customControls label {
    color: white;
    font-size: 14px;
    margin: 0 2px;
    text-align: right;
}

#liveIndicator {
    color: gray;
    font-weight: bold;
    margin-left: 10px;
}

    #liveIndicator.live {
        color: red;
    }

#spinnerOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.spinner {
    border: 6px solid #ccc;
    border-top: 6px solid white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#bottomRightWatermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 5px;
    z-index: 100;
    pointer-events: none;
    max-width: 80vw;
    text-align: center;
}

#CurrentProgram {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 5px;
    z-index: 100;
    pointer-events: none;
    text-align: left;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
}

/* Tablet / mobile */
@media screen and (max-width: 768px) {
    #videoListSection {
        padding: 12px;
    }

    input[type="text"] {
        width: 100%;
        max-width: 100%;
    }

    .btn {
        margin-left: 0;
    }

    #videoTitle {
        top: 10px;
        left: 10px;
        right: 60px;
        font-size: 14px;
        padding: 5px 8px;
    }

    .close-btn {
        top: 10px;
        right: 10px;
        font-size: 24px;
        padding: 6px 12px;
    }

    #customControls {
        width: calc(100% - 16px);
        bottom: 8px;
        padding: 8px;
        gap: 6px;
    }

    #seekBar {
        flex-basis: 100%;
        width: 100%;
    }

    #volumeSlider {
        width: 80px;
    }

    #bottomRightWatermark {
        display: none;
    }

    #CurrentProgram {
        bottom: 64px;
        left: 8px;
        transform: none;
        max-width: calc(100% - 16px);
        font-size: 12px;
    }
}

@media screen and (max-width: 600px) {
    .seek-group {
        width: 100%;
    }
}

/* Small phones */
@media screen and (max-width: 480px) {
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    input[type="text"] {
        width: 100%;
        max-width: 100%;
    }

    .video-link {
        font-size: 15px;
    }

    #customControls label {
        font-size: 12px;
    }

    #volumeSlider {
        width: 70px;
    }

    #seekBar {
        min-width: 100%;
    }
}
