/* Global Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Main App Layout */
body, html {
    height: 100vh;
    width: 100vw;  
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    margin: 0; /* Added here to ensure no margin causes overflow */
    font-family: Arial, sans-serif; /* Changed to Arial */
}

/* Header */
.app-header {
    width: 100%;
    padding: 20px;
    background-color: #ff6f00; 
    color: #fff;
    text-align: center;
}

/* Title */
.app-header h1 {
    font-size: 2.5em;
    margin: 0;
}

/* Main Content Container */
.app-container {
    flex: 1; /* Allow it to take available space */
    padding: 20px;
    display: flex;
    justify-content: center; 
    align-items: center; 
}

/* Video Card */
.video-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    width: 100%;
    max-width: 600px; 
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #ff6f00;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000; /* Ensure it appears above other content */
}

.popup button {
    background-color: #ff6f00;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.popup button:hover {
    background-color: #e65100;
}


/* Video Container */
#video-title {
    font-size: 1.5em;
    color: #222;
    margin-bottom: 10px;
}

#video-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#video-container video {
    width: 100%;
    border-radius: 8px;
}

#video-container a {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #ff6f00; 
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

#video-container a:hover {
    background-color: #e65100; 
}

/* Footer */
.app-footer {
    width: 100%;
    padding: 15px;
    background-color: #ff6f00; 
    color: #fff;
    text-align: center;
    position: relative; /* Changed to relative */
}

/* Popup Styles */
.popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    z-index: 1000; /* Ensure it’s on top */
}

.popup button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #ff6f00;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.popup button:hover {
    background-color: #e65100;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .app-header h1 {
        font-size: 2em; 
    }

    .app-container {
        padding: 15px;
    }

    .video-card {
        padding: 15px; 
    }

    #video-title {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.5em; 
    }

    .selector-container {
        flex-direction: column;
        font-size: 0.9em;
    }

    select {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .video-card {
        padding: 10px;
    }

    #video-title {
        font-size: 1.2em;
    }

    #video-container a {
        width: 100%; 
    }
}
