body {
    font-family: Arial, sans-serif;
    text-align: center;
    background: #000;
    color: white;
    overflow-x: hidden; /* ✅ Change from 'hidden' to 'hidden' for only horizontal */
    overflow-y: auto; /* ✅ Allows vertical scrolling */
}

.error-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* ✅ Centers it both horizontally & vertically */
    background: rgba(255, 50, 50, 0.9);
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 18px;
    text-align: center;
    display: none; /* Hidden by default */
    z-index: 200; /* Keeps it above other elements */
    max-width: 80%;
    width: 400px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

/* 🔄 Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

#countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensures everything stays centered */
    justify-content: center; /* Keeps alignment */
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    z-index: 100;
}

#countdown {
    font-size: 128px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: -20px; /* Adds a small space between countdown and date */
}

#countdown-container h2 {
    margin: 0;
    font-size: 32px;
    font-weight: bold;
}

/* Background Image with Blur Effect */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/couple.jpg') center/cover no-repeat;
    filter: blur(5px);
    transition: filter 2s ease-in-out;
    z-index: -1; /* Lower than video-container */
}

/* When login is successful, remove blur */
.show-content #bg {
    filter: blur(0);
}

/* Center Login Box */
#login-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    z-index: 10;
    
    /* Make width and height customizable */
    width: 90%; /* Adjust this as needed */
    max-width: 400px; /* Set a maximum width */
    height: auto; /* Change to a fixed height if needed */
    min-height: 200px; /* Set a minimum height */
}

#login-form input {
    display: block;
    margin: 10px auto;
    padding: 10px;

    /* Make width customizable separately */
    width: 90%; /* Adjust as needed */
    max-width: 350px; /* Set a maximum width */
}

#login-form button {
    background: #ff4081;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    width: 90%; /* Adjust as needed */
    max-width: 200px; /* Set a maximum width */
}

/* Hide login box after successful login */
.show-content #login-section {
    display: none;
}

button {
    background: #ff4081;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
}

/* 🏠 Ensure Video & Chat Are Side-by-Side */
#main-container {
    display: flex;
    justify-content: center; /* Centers both elements */
    align-items: flex-start; /* Aligns them to the top */
    gap: 40px; /* Space between Video & Chat */
    max-width: 1200px;
    margin: 180px auto 0 auto; /* Push it down below the countdown */
    padding: 20px;
    position: relative;
}
                                                             
/* 🎥 Video Player - Left Side */
#video-container {
    flex-grow: 2; /* Takes 2/3 of available space */
    max-width: 800px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 100;
}

/* 💬 Chat Box - Right Side */
#chat-container {
    flex-grow: 1; /* Takes 1/3 of available space */
    max-width: 400px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 450px; /* Matches video height */
    color: white;
    font-size: 12px;
    position: relative;
    z-index: 100;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#video-wrapper {
    width: 100%;
    height: 100%;
    
}

#livestream {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 101; /* Ensure it's above everything */
}
/* 💬 Chat Box Styling */
#chat-box {
    width: 350px;
    display: flex;
    min-height: 450px; /* ✅ Prevents shrinking */
    max-height: 450px;
    max-width: 350px;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Prevents content from making the box bigger */
}

/* 📩 Message Display Area */
#messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    color: white;
    text-align: left;
    max-height: 350px; /* ✅ Keeps messages inside the chat box */
    scrollbar-width: thin;
    word-wrap: break-word;
}

/* 🏷️ Username Styling */
#messages strong {
    color: #ff4081; /* Change to any color you prefer */
    font-weight: bold;
}

/* 🗨️ Individual Message */
.message {
    padding: 8px;
    margin: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    word-wrap: break-word; /* ✅ Ensures long words wrap */
    overflow-wrap: break-word; /* ✅ Alternative for better support */
    max-width: 100%; /* ✅ Prevents overflow */
}

/* 🔠 Input Field */
#chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#message-input {
    flex-grow: 1;
    padding: 10px;
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#send-btn {
    background: #ff4081;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 5px;
}
/* 🔲 Logout Button - Fixed Top Right (Hidden by Default) */
#logout-btn {
    display: none; /* 🚫 Hide by default */
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 200;
    transition: background 0.3s ease;
}

#logout-btn img {
    width: 60%;
    height: 60%;
}

#logout-btn:hover {
    background: rgba(103, 98, 98, 0.8);
}
/* 🔄 Lang Button - Fixed Top Left */
#lang-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 200;
    transition: background 0.3s ease;
}

#lang-btn img {
    width: 60%;
    height: 60%;
}

#lang-btn:hover {
    background: rgba(103, 98, 98, 0.8);
}

#info-container {
    width: 80%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15); /* Slightly more contrast */
    border-radius: 12px;
    color: white;
    text-align: left;
    font-size: 18px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap; /* Ensures responsiveness */
}

/* 📝 Headings */
#info-container h2 {
    font-size: 26px;
    margin-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

/* 🏠 Wrapper */
#info-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    width: 100%;
}

/* 📌 Columns */
.info-column {
    width: 48%;
    max-width: 900px;
    background: rgba(20, 20, 20, 0.8); /* Darker for contrast */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out;
}

/* 🖱️ Hover effect */
.info-column:hover {
    transform: scale(1.02);
}

/* 📩 Links */
#info-container a {
    color: #ff4081;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

#info-container a:hover {
    color: #ff79b0;
    text-decoration: underline;
}

/* 📋 List Styling */
#info-container ul {
    list-style: none;
    padding: 0;
}

#info-container li {
    padding: 6px 0;
    font-size: 18px;
    line-height: 1.6;
}

/* 🗨️ Paragraph Styling */
#info-container p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }
    #video-container a img {
        width: 100%;
        max-width: 375px;
        height: auto;
        display: block;
    }
    #info-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .info-column {
        width: 100%;
        max-width: 375px;
    }
    /* Position language and logout buttons */
    #lang-btn {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }

    #logout-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    #countdown-container {
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    #countdown {
        font-size: 48px; /* Reduce font size for smaller screens */
        white-space: nowrap;
        margin-bottom: 5px; /* Adjust spacing between countdown and date */
    }

    #countdown-container h2 {
        font-size: 20px; /* Smaller date text */
        font-weight: bold;
        margin-top: 0; /* No extra space on top */
    }

    /* Stack all elements in a vertical layout */
    #main-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 120px;
        padding: 10px;
    }

    /* Resize video to fit screen width */
    #video-container {
        width: 100%;
        max-width: 375px;
        height: auto;
    }

    #livestream {
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        max-width: 100%;
    }

    /* Resize chat box */
    #chat-container {
        width: 100%;
        max-width: 375px;
        min-height: 300px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Stack info sections below chat */
    #info-container {
        width: 100%;
        max-width: 375px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .info-column {
        width: 100%;
        max-width: 375px;
    }
}