/* Reset default margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style the body with black background */
body {
    background-color: #000000;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    min-height: 100vh;
}

/* Container for centering the image */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    gap: 30px;
    padding: 20px;
}

/* Style the image */
.centered-image {
    max-width: 90%;
    width: 100%;  /* Control width better on mobile */
    height: auto;
    animation: fadeIn 1s ease-out;
    transition: transform 0.3s ease;
}

.centered-image:hover {
    transform: scale(1.02);
}

/* Style the join form container */
.join-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Style the input field */
.code-input {
    padding: 10px 15px;
    border: 2px solid #333;
    border-radius: 5px;
    font-size: 16px;
    background-color: #ffffff;
    width: 300px;
    max-width: 90%;
}

/* Style the main join button */
.container .join-button {  /* Make selector more specific */
    padding: 12px 40px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.container .join-button:hover {  /* Make selector more specific */
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.container .join-button:active {  /* Make selector more specific */
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.2);
}

/* Style the error message */
.error-message {
    color: #ff0000;
    font-size: 14px;
    margin-top: 5px;
}

/* White text class */
.white-text {
    color: #ffffff;
}

/* Style the popup overlay */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

/* Style the popup content */
.popup-content {
    background-color: #1a1a1a;
    padding: 35px 35px 25px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;  /* Reduce overall gap */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 320px;
    animation: popupFadeIn 0.3s ease-out;
}

/* Style the input field */
.code-input {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 12px 20px;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.code-input:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: rgba(255, 255, 255, 0.15);
}

.code-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Style the popup buttons */
.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: 10px;  /* Add space between input and buttons */
    margin-bottom: 0;
}

.popup-buttons .join-button,
.popup-buttons .cancel-button {
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 12px;
    min-width: 120px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #ffffff;  /* Add explicit color for both buttons */
}

.popup-buttons .join-button {
    background-color: #4CAF50;
    border: none;
    color: #ffffff;  /* Ensure Submit button text is white */
}

.popup-buttons .join-button:hover {
    background-color: #45a049;
}

.popup-buttons .cancel-button {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;  /* Ensure Cancel button text is white */
}

.popup-buttons .cancel-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Add popup animation */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error message styling */
.error-message {
    color: #ff4444;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    opacity: 0.9;
}

/* Style the slogan */
.slogan {
    color: #ffffff;
    font-size: 1.5rem;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1.5px;
    margin-top: -10px;
    opacity: 0.9;
    font-family: 'Poppins', sans-serif;
    animation: fadeIn 1s ease-out 0.3s backwards;
}

/* Style the subslogan */
.subslogan {
    color: #ffffff;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 300;
    opacity: 0.8;
    font-family: 'Poppins', sans-serif;
    animation: fadeIn 1s ease-out 0.4s backwards;
    margin-top: -15px;
}

.separator {
    color: #4CAF50;  /* Match the button color */
    margin: 0 10px;
    font-weight: 500;
}

/* Add fade-in animation for elements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        gap: 20px;  /* Reduce gap on mobile */
    }

    .centered-image {
        max-width: 95%;  /* Allow image to be slightly wider on mobile */
    }

    .slogan {
        font-size: 1.1rem;  /* Slightly smaller font on mobile */
        padding: 0 15px;
        letter-spacing: 1px;  /* Reduce letter spacing on mobile */
        margin-top: 0;  /* Remove negative margin on mobile */
    }

    .join-button {
        padding: 12px 35px;
        font-size: 16px;
        width: auto;  /* Ensure button isn't too wide */
        min-width: 140px;  /* Minimum width for button */
    }
}

/* Additional mobile optimization */
@media (max-width: 480px) {
    .container {
        gap: 15px;
        justify-content: center;
        min-height: 100vh;
        padding: 20px;
        padding-bottom: 0; /* Remove bottom padding on mobile */
    }

    body {
        min-height: 100vh;
        height: 100%;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .centered-image {
        max-width: 100%;  /* Full width on very small devices */
    }

    .slogan {
        font-size: 1rem;
        padding: 0 10px;
    }

    /* Adjust popup for mobile */
    .popup-content {
        padding: 25px 25px 20px;  /* Even smaller padding for mobile */
    }

    .code-input {
        width: 100%;
        font-size: 16px;  /* Prevent zoom on mobile */
        padding: 8px 12px;
    }

    .popup-buttons {
        width: 100%;
        gap: 10px; /* Reduce gap between buttons */
        justify-content: center; /* Keep buttons centered */
    }

    .popup-buttons .join-button,
    .popup-buttons .cancel-button {
        padding: 8px 15px;
        min-width: 100px; /* Set equal minimum width */
        margin: 0 5px; /* Add small margin for spacing */
    }

    .subslogan {
        font-size: 0.9rem;
        padding: 0 10px;
        margin-top: -10px;
    }
    
    .separator {
        margin: 0 5px;
    }
}

/* Style social media links */
.social-links {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

.social-link {
    color: #ffffff;
    font-size: 24px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.social-link:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: #4CAF50;
}

/* Adjust for mobile */
@media (max-width: 480px) {
    .social-links {
        margin-top: 15px;
        gap: 30px;
    }

    .social-link {
        font-size: 22px;
    }
}

/* Style the access code link */
.access-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    margin-top: 0;  /* Keep this at 0 */
    transition: all 0.3s ease;
}

.access-link:hover {
    color: #4CAF50;
    text-decoration: underline;
}

/* About page styles */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.nav-image {
    height: 60px;
    width: auto;
}

.about-content {
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
    flex: 1;
}

.about-content h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1rem;
    opacity: 0.9;
}

.feature {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.feature h2 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Style the about page buttons container */
.about-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

/* Common styles for both buttons */
.about-buttons .back-button,
.about-buttons .join-button {
    padding: 12px 40px;
    width: 240px;  /* Set fixed width for both buttons */
    border-radius: 25px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Back button specific styles */
.about-buttons .back-button {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.about-buttons .back-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Join button specific styles */
.about-buttons .join-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.about-buttons .join-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .about-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .about-buttons .back-button,
    .about-buttons .join-button {
        width: 200px;
        padding: 12px 0;
        font-size: 16px;
    }
}

/* Prevent content shift on mobile */
@media screen and (max-width: 768px) {
    .about-container {
        min-height: -webkit-fill-available;
    }
}

/* About link on home page */
.about-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.about-link:hover {
    color: #4CAF50;
}