/* Global Styles */
body {
    font-family: "Source Sans Pro", sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f7; /* Light grey background for a clean look */
    color: #333333; /* Dark grey text for readability */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar Styles */
.top-bar {
    width: 100%;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff; /* White background for the top bar */
    border-bottom: 1px solid #e0e0e0; /* Subtle border for separation */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for depth */
}

/* Logo Container Styles */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    max-width: 120px; /* Slightly smaller logo */
    height: auto;
}

/* Content Wrapper Styles */
.content-wrapper {
    flex: 1;
    width: 100%;
    padding-top: 80px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Container Styles for Pages */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Chat and CV Containers Wrapper */
.columns-container {
    display: flex;
    flex: 1.2;
    justify-content: space-between;
    gap: 25px;
    padding: 20px 0;
}

/* Chat Box Styles */
.chat-container {
    flex: 1; /* Allow chat container to take slightly more space */
    background-color: #ffffff; /* White background for chat container */
    color: #333333; /* Dark text color */
    border: 1px solid #dddddd; /* Light grey border */
    border-radius: 8px;
    padding: 20px;
    height: calc(100vh - 150px); /* Adjusted height based on the top bar */
    overflow-y: auto; /* Enable scroll if content overflows */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Chat Box Styles */
.chat-box {
    flex: 1; /* Allow the chat box to grow and fill available space */
    overflow-y: auto; /* Scroll if the content overflows */
    padding: 10px;
    margin-bottom: 15px; /* Add some space between the chat box and the input */
    border: 1px solid #dddddd; /* Light grey border */
    border-radius: 8px;
    background-color: #f9f9f9; /* Slightly different background color */
    max-height: calc(100vh - 200px); /* Ensure it doesn't overflow the container */
}

/* Message Styles */
.message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    max-width: 100%;
    word-wrap: break-word;
}

.message.user {
    background-color: #007aff; /* Blue background for user messages */
    color: #ffffff; /* White text for user messages */
    align-self: flex-end;
}

.message.bot {
    background-color: #e0e0e0; /* Light grey background for bot messages */
    color: #333333; /* Dark text for bot messages */
    align-self: flex-start;
}

/* Input Group Styles */
.input-group {
    margin-top: 20px;
}

.input-group .form-control {
    border-radius: 20px; /* Rounded input field */
}

.input-group .btn-primary {
    border-radius: 20px; /* Rounded button */
}

/* CV Container Styles */
.cv-container {
    flex: 1; /* Allow CV container to take slightly more space */
    background-color: #ffffff; /* White background for CV container */
    color: #333333; /* Dark text color */
    border: 1px solid #dddddd; /* Light grey border */
    border-radius: 8px;
    padding: 20px;
    height: calc(100vh - 150px); /* Adjusted height based on the top bar */
    overflow-y: auto; /* Enable scroll if content overflows */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* CV Content Styles */
.cv-content {
    color: #333333; /* Dark text color */
    padding: 20px;
    background-color: #f5f5f7; /* Light grey background for CV content */
    border-radius: 8px;
    overflow-y: auto;
    max-height: 100%;
    box-sizing: border-box;
    white-space: pre-wrap;
}

/* Profile Page Styles */
.profile-container {
    background-color: #ffffff; /* White background for profile container */
    padding: 20px;
    border-radius: 8px;
    box-sizing: border-box;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

.profile-container img {
    border-radius: 8px;
    max-width: 200px;
    height: auto;
}

/* Authentication Page Styles */
.auth-container {
    display: flex;
    justify-content: space-between; /* Space between forms */
    flex-wrap: wrap; /* Allow wrapping if necessary */
    gap: 30px; /* Adjust this value to control spacing */
}

.auth-box {
    background-color: #ffffff; /* White background for auth box */
    border-radius: 12px;
    padding: 40px 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    width: 100%;
    max-width: 500px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Auth Box Adjustments */
    .auth-box {
        padding: 30px 20px; /* Reduce padding for better fit */
        max-width: 90%;
    }

    /* Buttons */
    .btn-primary {
        width: 100%; /* Make buttons full-width for easier tapping */
    }

    /* Column Layout for Chat and CV Containers */
    .columns-container {
        flex-direction: column; /* Stack containers vertically */
        gap: 10px; /* Reduce gap for better spacing on small screens */
    }

    /* Chat and CV Containers */
    .chat-container,
    .cv-container {
        width: 100%; /* Full-width containers on mobile */
        margin: 0; /* Remove margins to prevent overflow */
        padding: 15px; /* Reduce padding for better fit */
        height: auto; /* Let height adjust naturally */
    }

    /* Logo Adjustments */
    .logo-container {
        left: 5%; /* Adjust logo position on mobile */
        transform: none; /* Remove centering transform */
    }
    .logo {
        max-width: 100px; /* Slightly smaller logo on mobile */
    }

    /* Input Group Adjustments */
    .input-group .form-control,
    .input-group .btn-primary {
        font-size: 0.9rem; /* Slightly smaller text for better fit */
    }

    /* Chat Box Adjustments */
    .chat-box {
        max-height: none; /* Allow natural height adjustment */
        margin-bottom: 10px; /* Reduce bottom margin */
    }

    /* Message Adjustments */
    .message {
        padding: 8px 12px; /* Reduce padding in messages */
        font-size: 0.9rem; /* Slightly smaller text */
    }

    /* Profile Container Adjustments */
    .profile-container {
        padding: 15px; /* Reduce padding */
        margin-top: 10px; /* Reduce top margin */
    }
    .profile-container img {
        max-width: 150px; /* Smaller image size */
    }

    /* Loading Screen Adjustments */
    #loading-screen p {
        font-size: 1rem; /* Slightly smaller loading text */
    }

    .loading-animation {
        width: 40px; /* Smaller spinner */
        height: 40px;
    }
}

/* Additional Small Device Adjustments */
@media (max-width: 480px) {
    /* Further reduce padding and margins */
    .container {
        padding: 15px; /* Less padding on very small screens */
    }
    .auth-box {
        padding: 20px 10px; /* Reduce padding */
    }

    /* Top Bar Adjustments */
    .top-bar {
        padding: 0 10px; /* Narrow padding in top bar */
        height: 65px; /* Shorter top bar height */
    }

    /* Adjust chat box and CV container */
    .chat-container,
    .cv-container {
        padding: 10px; /* Less padding for small screens */
    }

    /* Reduce size of buttons and inputs for very small screens */
    .input-group .form-control,
    .input-group .btn-primary {
        font-size: 0.8rem; /* Smaller text */
    }
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* White background for loading screen */
    color: #333333; /* Dark text color */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Ensure it covers all other elements */
}

/* Loading Animation Styles */
.loading-animation {
    border: 8px solid #e0e0e0; /* Light grey border */
    border-top: 8px solid #007aff; /* Apple-like blue for spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

#loading-screen p {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #333333; /* Dark text color */
}

/* Global transition for page fade-out */
body.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}
