/* --- Global Styles & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121214; /* Slightly darker than modal background for depth */
    color: #f0f0f0;
    line-height: 1.6;
    display: flex;
    flex-direction: column; /* For proper footer/version placement */
    position: relative; /* For hero image positioning */
    min-height: 100vh;
}

/* --- Hero Section --- */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh; /* Adjust height as desired, e.g., 60vh, 70vh */
    overflow: hidden;
    z-index: -1; /* Place behind content */
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    object-position: center; /* Centers the image */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, #121214 0%, rgba(18, 18, 20, 0.7) 50%, rgba(18, 18, 20, 0.4) 100%);
    /* A gradient overlay to make text more readable and blend with background */
}

/* --- Main Content Layout --- */
.container {
    flex: 1; /* Allow container to grow and push version display to bottom */
    max-width: 1200px;
    margin: 0 auto;
    padding: 60vh 20px 40px; /* Top padding to place content below hero image */
    text-align: center;
    position: relative; /* For z-index context */
    z-index: 1; /* Ensure content is above hero image */
}

.content {
    background: rgba(26, 26, 29, 0.8); /* Semi-transparent background for readability */
    backdrop-filter: blur(8px); /* Blur effect for modern look */
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(78, 204, 163, 0.1); /* Subtle border matching accent color */
    margin-top: -10vh; /* Pull content up over the hero image blend */
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.2rem; /* Larger and more impactful */
    color: #4ECCA3; /* Highlight color */
    text-shadow: 0 0 15px rgba(78, 204, 163, 0.6), 0 0 5px rgba(78, 204, 163, 0.3);
    margin-bottom: 40px;
    letter-spacing: 1px;
}

/* --- Button Group --- */
.button-group {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to wrap on smaller screens */
    justify-content: center;
    gap: 20px; /* Space between buttons */
    margin-top: 30px;
    margin-bottom: 40px;
}

.chat-button {
    display: inline-block;
    text-decoration: none;
    color: white;
    background: linear-gradient(45deg, #4ECCA3, #2b9e78); /* Gradient for primary action */
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(78, 204, 163, 0.2);
    min-width: 180px; /* Ensure buttons have a minimum width */
    text-align: center;
}

.chat-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 35px rgba(78, 204, 163, 0.35);
    background: linear-gradient(45deg, #5AD6B0, #38B08A);
}

/* You can add specific styles for different buttons if you want unique colors */
.akinator-button { /* Example of a slightly different button style */
    /* background: linear-gradient(45deg, #6C757D, #555E64); */
    /* box-shadow: 0 6px 20px rgba(108, 117, 125, 0.2); */
}
/* .akinator-button:hover {
    background: linear-gradient(45deg, #7A848D, #626B72);
    box-shadow: 0 10px 35px rgba(108, 117, 125, 0.35);
} */


/* --- Version Display --- */
.version-display {
    text-align: center;
    margin-top: auto; /* Push to the bottom */
    padding: 20px 20px;
    font-size: 0.9rem;
    color: #909090;
    /* backdrop-filter: blur(3px); */ /* Optional: for a subtle blur effect on version bar */
    /* background: rgba(0, 0, 0, 0.3); */ /* Optional: for a subtle background */
}

.version-text {
    font-weight: 500;
}

.version-separator {
    margin: 0 15px;
    color: #606060;
}

.latest-version {
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.latest-version:hover {
    color: #4ECCA3;
}

.latest-version.up-to-date {
    color: #4ECCA3; /* Green for up-to-date */
    text-decoration: none;
    cursor: default;
}

.latest-version.update-available {
    color: #FFD700; /* Gold for update available */
    font-weight: 600;
}

/* --- User Bar (Logged-in Status) --- */
#user-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1em;
    color: #f0f0f0;
    font-weight: 500;
    z-index: 10000;
    background: rgba(26, 26, 29, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(78, 204, 163, 0.2);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#user-bar span {
    margin-right: 8px;
}

#logout-btn {
    background: #3a3a3d; /* Darker button background */
    color: #ddd;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

#logout-btn:hover {
    background: #4ECCA3;
    color: white;
}


/* --- Update Overlay --- */
.update-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85); /* Darker overlay for update */
    z-index: 10002; /* Higher than auth modal */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.update-content {
    background: #25282c; /* Consistent with modal inputs */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(78, 204, 163, 0.3);
    max-width: 400px;
    width: 90%;
}

.update-content h2 {
    font-family: 'Orbitron', sans-serif;
    color: #4ECCA3;
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(78, 204, 163, 0.4);
}

.update-content p {
    font-size: 1.1rem;
    color: #ccc;
}

.update-spinner {
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid #4ECCA3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Auth Modal (Original content from your provided styles.css) --- */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 20, 40, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.auth-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: #1A1A1D; /* Dark background */
    color: #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 30px 35px;
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(78, 204, 163, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.visible .auth-modal-content {
    transform: scale(1);
}

.auth-modal-content h2 {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #4ECCA3; /* Highlight color */
    text-shadow: 0 0 8px rgba(78, 204, 163, 0.5);
}

.auth-input-group {
    margin-bottom: 18px;
}

.auth-input {
    width: 100%;
    background: #25282c;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    color: #f0f0f0;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-input::placeholder {
    color: #6c757d;
}

.auth-input:focus {
    border-color: #4ECCA3;
    box-shadow: 0 0 0 3px rgba(78, 204, 163, 0.3);
}

#auth-error {
    color: #FF6B6B; /* Red for errors */
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
    margin-bottom: 15px;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#auth-submit-btn {
    background: linear-gradient(45deg, #4ECCA3, #2b9e78);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 204, 163, 0.1);
}

#auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 204, 163, 0.25);
}

.auth-link-container {
    text-align: center;
    margin-top: 15px;
}

.auth-link {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
    padding: 5px;
}

.auth-link:hover {
    color: #4ECCA3;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .chat-button {
        padding: 12px 20px;
        font-size: 1rem;
        min-width: unset; /* Remove min-width on smaller screens */
        width: 100%; /* Make buttons full width */
    }

    .button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .content {
        padding: 30px 20px;
    }
    
    .hero-image {
        height: 40vh;
    }

    .container {
        padding: 45vh 15px 30px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    .auth-modal-content {
        padding: 20px;
        margin: 0 15px;
    }
    .update-content {
        padding: 30px 20px;
    }
}