/* Basic Reset */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #000;
}

/* General Styles (applies to both desktop and mobile) */
#loadingScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    z-index: 10;
}

#loadingScreen img {
    max-width: 100%;
    max-height: 100%;
}

/* Desktop and Large Screens */
    #mainContainer {
        display: flex;
        height: 100%;
        width: 100%;
    }

    /* Video area styling */
    #videoContainer {
        flex: 3;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #000;
    }

    #videoPlayer {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Custom controls */
    #customControls {
        position: absolute;
        bottom: 10px;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.7);
        padding: 5px;
        box-sizing: border-box;
    }

    #selectedFeed {
        color: white;
        margin-left: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }

    #controlButtons {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    #playPauseBtn, #chatSendBtn {
        background-color: #007bff;
        border: none;
        color: white;
        padding: 8px;
        cursor: pointer;
        border-radius: 3px;
        transition: background-color 0.3s ease;
    }

    #playPauseBtn:hover, #chatSendBtn:hover {
        background-color: #0056b3;
    }

    #qualitySelector {
        padding: 5px;
        background-color: black;
        color: white;
        border: none;
        border-radius: 3px;
    }

    #volumeSlider {
        width: 80px;
    }

    /* Chat Container */
    #chatContainer {
        flex: 1;
        display: flex;
        flex-direction: column;
        background-color: #1a1a1a;
        color: white;
        padding: 10px;
        overflow-y: auto;
    }

    /* Chat Messages */
    #chatMessages {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
        margin-bottom: 10px;
    }

    .chatMessage {
        margin-bottom: 10px;
    }

    .chatMessage span.username {
        font-weight: bold;
        color: #00aaff;
    }

    .chatMessage span.timestamp {
        font-size: 12px;
        color: #888;
        margin-left: 5px;
    }

    /* Chat Input Container */
    #chatInputContainer {
        display: flex;
        margin-top: 10px;
    }

    #chatInput {
        flex: 1;
        padding: 10px;
        border: none;
        background: #333;
        color: white;
        border-radius: 3px;
    }

    #chatSendBtn {
        background-color: #007bff;
        border: none;
        color: white;
        padding: 10px;
        margin-left: 5px;
        cursor: pointer;
        border-radius: 3px;
    }

    #introVideo{
        width: 100%;
        height: auto;
        object-fit: cover;
    }

/* Mobile Portrait */
@media (max-width: 1024px) and (orientation: portrait) {

    #videoContainer {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background-color: #000;
        position: relative;
    }

    #videoPlayer {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    #customControls {
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.7);
        padding: 5px; /* Reduced padding */
        box-sizing: border-box;
        margin-top: 5px;
    }

    #selectedFeed {
        color: white;
        font-size: 0.8rem; /* Smaller text size */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }

    #controlButtons {
        display: flex;
        align-items: center;
        gap: 5px; /* Reduced gap between controls */
    }

    #playPauseBtn, #qualitySelector, #volumeSlider {
        background-color: #007bff;
        border: none;
        color: white;
        padding: 5px; /* Reduced padding for buttons */
        cursor: pointer;
        border-radius: 3px;
        font-size: 0.8rem; /* Smaller font size */
    }

    #playPauseBtn {
        width: 30px; /* Smaller button size */
        height: 30px;
    }

    #qualitySelector {
        padding: 2px 5px; /* Smaller padding for dropdown */
    }

    #volumeSlider {
        width: 60px; /* Narrower slider */
    }

    /* Ensure chat input container stays at the bottom */
    #chatContainer {
        display: flex;
        flex-direction: column;
        background-color: #1a1a1a;
        color: white;
        width: 100%;
        padding: 10px;
        overflow-y: auto;
        position: relative;
        flex-grow: 1;
    }

    #chatMessages {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 10px;
        border-bottom: 1px solid #333;
        margin-bottom: 10px;
    }

    #chatInputContainer {
        display: flex;
        padding: 10px;
        background: #1a1a1a;
        width: 100%;
        position: absolute;
        bottom: 0;
        left: 0;
        box-sizing: border-box;
    }

    #chatInput {
        flex: 1;
        padding: 10px;
        border: none;
        background: #333;
        color: white;
        border-radius: 3px;
    }

    #chatSendBtn {
        background-color: #007bff;
        border: none;
        color: white;
        padding: 10px;
        margin-left: 5px;
        cursor: pointer;
        border-radius: 3px;
        width: 20%;
        box-sizing: border-box;
    }
}

