body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
    padding-top: 60px; /* To make room for the navbar */
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}
/* Navbar styling */
.navbar {
    background-color: lightgrey;
    color: black;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Default height for desktop screens */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-sizing: border-box; /* Include padding in width calculation */
    overflow: hidden;
}

/* Content starts after the navbar with proper spacing */
.container {
    padding-top: 40px; /* Default padding, accounts for the navbar height */
}

/* For smaller screens */
@media (max-width: 768px) {
    .navbar {
        height: auto; /* Adjust height for mobile screens */
        flex-direction: column; /* Stack items vertically */
        padding: 10px 10px;
    }

    .navbar .nav-links {
        margin-top: 10px;
        flex-direction: column; /* Stack navigation links vertically */
    }

    .container {
        padding-top: 60px; /* Increase padding-top to account for the larger navbar on small screens */
    }
}

.navbar img {
    height: 40px;
    margin-right: 10px;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* Ensure items do not wrap */
}

.navbar .nav-links a {
    color: black;
    text-decoration: none;
    margin-left: 10px;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: black;
}

.form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

h1, h2 {
    color: black;
}

.topic-list, .prompt-container {
    margin-bottom: 20px;
}

.prompt-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.prompt-header {
    margin-bottom: 10px;
}

.buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-start; /* Align buttons to the left */
    margin-top: 10px;
}

.newButton, .savedAiButton, .expertButton, .closeButton, .saveButton {
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

/* Button Colors */
.newAiButton {
    background-color: Green; /* Light orange background */
    color: white; /* Dark orange text */
    border: none; /* Remove border */
    outline: none; /* Remove outline */
}

.newAiButton:hover {
    background-color: #ffb366; /* Slightly darker orange on hover */
}

.closeButton {
    background-color: #add8e6; /* Light blue background */
    color: #1f4e79; /* Dark blue text */
}

.closeButton:hover {
    background-color: #87cefa; /* Slightly darker blue on hover */
}

.savedAiButton {
    background-color: #b8e994; /* Light green background */
    color: #1e8449; /* Dark green text */
}

.savedAiButton:hover {
    background-color: #a3e584; /* Slightly darker green on hover */
}

.expertButton {
    background-color: #ffcccb; /* Pink background */
    color: #e74c3c; /* Red text */
}

.expertButton:hover {
    background-color: #ff9999; /* Slightly darker pink on hover */
}

.saveButton {
    background-color: #000000;
}

.saveButton:hover {
    background-color: #333333;
}

.response {
    margin-top: 10px;
    padding: 15px;
    background-color: #eaf4fc;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-size: 1em;
}

.topic {
    cursor: pointer;
    color: #3498db;
    text-decoration: underline;
    margin-bottom: 10px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .newButton, .savedAiButton, .closeButton, .expertButton, .saveButton {
        font-size: 0.8em; /* Smaller font size */
        padding: 8px 12px; /* Adjust padding */
        min-width: 70px; /* Reduce the minimum width */
    }

    .prompt-container {
        padding: 15px;
    }

    .response {
        font-size: 0.9em; /* Slightly smaller text for responses */
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .newButton, .savedAiButton, .closeButton, .expertButton, .saveButton {
        font-size: 0.75em; /* Even smaller font size */
        padding: 6px 10px; /* Smaller padding */
        min-width: 60px; /* Reduce min-width further */
    }

    .response {
        font-size: 0.85em; /* Further reduced font size for response */
        padding: 8px;
    }
}
/* Table styling for displaying prompts */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #3498db;
    color: white;
}

table td {
    background-color: #fff;
}

table td input[type="text"], table td input[type="number"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
}

table td button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9em;
}

/* Add specific button styles */
button.updateButton {
    background-color: #3498db; /* Blue background */
    color: white;
}

button.updateButton:hover {
    background-color: #2980b9; /* Darker blue on hover */
}

button.deleteButton {
    background-color: #e74c3c; /* Red background */
    color: white;
}

button.deleteButton:hover {
    background-color: #c0392b; /* Darker red on hover */
}

/* Styling for the form used to add new prompts */
.add-prompt-form {
    margin-top: 20px;
    padding: 20px;
    background-color: lightblue;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.add-prompt-form h3 {
    margin-bottom: 15px;
}

.add-prompt-form input[type="text"],
.add-prompt-form input[type="number"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.add-prompt-form button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #2ecc71; /* Green background */
    color: white;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.add-prompt-form button:hover {
    background-color: #27ae60; /* Darker green on hover */
}

/* Style for the topic selection dropdown */
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

/* Add some margin to the container */
.container {
    margin: 0 auto;
    max-width: 900px;
}

/* Buttons for small screens */
@media (max-width: 768px) {
    table td button {
        font-size: 0.8em;
        padding: 6px 10px;
    }

    .add-prompt-form button {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    form select {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    table td button {
        font-size: 0.75em;
        padding: 5px 8px;
    }

    .add-prompt-form button {
        font-size: 0.75em;
        padding: 6px 10px;
    }
}

/* Search bar styling */
#searchTopic {
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#searchTopic:focus {
    outline: none;
    border-color: #007BFF; /* Change to the primary color of your website */
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
}


/* Add Topic form styling */
#addTopicForm {
    background-color: lightblue;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto; /* Center the form */
    text-align: center;
}

#addTopicForm h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
}

#addTopicForm input[type="text"] {
    width: 80%;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#addTopicForm button {
    background-color: #007BFF; /* Your site's primary button color */
    color: white;
    padding: 10px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
    transition: background-color 0.3s ease;
}

#addTopicForm button:hover {
    background-color: #0056b3; /* Darker shade for hover */
}

.top-topics-section {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.top-expert-topics, .top-student-topics {
    width: 48%;
}

.top-expert-topics h3, .top-student-topics h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.top-expert-topics ul, .top-student-topics ul {
    list-style-type: none;
    padding: 0;
}

.top-expert-topics li, .top-student-topics li {
    margin-bottom: 8px;
}

.top-expert-topics li a, .top-student-topics li a {
    text-decoration: none;
    color: #007bff;
}

.top-expert-topics li a:hover, .top-student-topics li a:hover {
    text-decoration: underline;
}

/* Style the move up/down buttons */
button.move-up, button.move-down {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 5px;
    color: #333;
}

/* Add hover effect */
button.move-up:hover, button.move-down:hover {
    background-color: #ddd;
    border-color: #999;
}

/* Disabled state */
button.move-up:disabled, button.move-down:disabled {
    background-color: #e9e9e9;
    color: #999;
    cursor: not-allowed;
}

/* Change the text color on hover */
button.move-up:hover, button.move-down:hover {
    color: #000;
}

/* Style for ordered and unordered lists inside response */
.response ol, .response ul {
    margin-left: 20px;
    padding-left: 20px;
}

.response ol {
    list-style-type: decimal; /* For numbered lists */
}

.response ul {
    list-style-type: disc; /* For bulleted lists */
}

.response li {
    margin-bottom: 5px;
}

/* Ensure the ordered list has proper numbering */
ol {
    list-style-type: decimal; /* Ensure numbers are shown */
}

li {
    margin-bottom: 10px; /* Optional: adds space between list items */
}


/* Form styling for adding new terms */
.vocab-form {
    margin-top: 20px;
    padding: 20px;
    background-color: #f4f4f4;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.vocab-form input[type="text"] {
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.vocab-form button {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.vocab-form button:hover {
    background-color: #0056b3;
}

    /* Spinner styling */
  


  

    .comment {
        display: flex;
        margin-top: 10px;
    }
    
    .user-image {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin-right: 10px;
    }
    
    .comment-details {
        background-color: #f4f4f4;
        padding: 10px;
        border-radius: 5px;
        flex-grow: 1;
    }
    
    .comment-details p {
        margin: 0;
    }
    
    .comment-details small {
        color: #888;
    }
    
    .comment-form {
        margin-top: 10px;
    }
    
/* Styling the comment form */
.styled-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background-color: #ffffff; /* White background */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
    border: 1px solid #ddd; /* Border to separate the form */
}

.styled-comment-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: vertical; /* Allows the textarea to be resized vertically */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    background-color: #f9f9f9;
}

.styled-comment-form textarea:focus {
    outline: none;
    border-color: #007BFF; /* Highlight the border on focus */
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.3); /* Blue glow when focused */
}

.styled-comment-form button {
    align-self: flex-start;
    padding: 10px 15px;
    background-color: #28a745; /* Green background */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.styled-comment-form button:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Styles scoped to registration and login pages */
.registration-page #mainContent {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.registration-page .form-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    margin-top: 50px;
}

.registration-page .form-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.registration-page .modern-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.registration-page .modern-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    outline: none;
}

.registration-page .modern-button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.registration-page .modern-button:hover {
    background-color: #0056b3;
}

/* Mobile Responsiveness for registration pages */
@media (max-width: 768px) {
    .registration-page .form-container {
        padding: 20px;
    }
}

.centered-div {
    width: fit-content; /* Adjusts the width to fit the content */
    margin: 0 auto; /* Centers the div horizontally */
    text-align: left; /* Aligns the text inside the div to the left */
}

h1 {
    margin: 0; /* Removes default margin for h1 */
}

.comment.ai {
    background-color: #f0f8ff;
    border-left: 4px solid #0073e6;
    padding: 10px;
    margin: 10px 0;
}

/* Spinner CSS */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button style */
.generateAiComment {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.generateAiComment:hover {
    background-color: #2980b9;
}

.ai-comment-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
}


/* Spinner style */
.ai-spinner {
    font-size: 14px;
    color: gray;
    display: inline-block;
    margin-left: 10px;
}

/* Styled button */
.generate-ai-comment {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.generate-ai-comment:hover {
    background-color: #0056b3;
}

.ai-comment-button {
    background-color: #00AEEF;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    margin-top: 10px;
}

/* Spinner styling */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 24px;
    height: 24px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    display: inline-block;
}


/* Optional: Customize for specific breakpoints */
@media (min-width: 768px) {
    .container {
        max-width: 95%; /* Slightly reduce max-width */
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 90%; /* Further reduce max-width on larger screens */
    }
}

.aiCommentButton {
    background-color: #f39c12;  /* Orange for contrast */
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Adds some spacing from the previous element */
}

/* Change color on hover */
.aiCommentButton:hover {
    background-color: #e67e22;  /* Slightly darker orange */
}

/* Optional: Add some box-shadow for depth */
.aiCommentButton {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.aiCommentButton:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.3);  /* Subtle glow when focused */
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.category-card {
    width: 200px;
    height: 200px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: scale(1.05);
}

.card-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}
.card-label {
    padding: 10px;
    font-size: 1.2em;
    color: #333;
}

.user-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.comment-form textarea {
    resize: none;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.comment-submit-icon i {
    font-size: 24px;
    color: #3498db;
}

.comment-submit-icon:hover i {
    color: #1f78b4; /* Slightly darker blue on hover */
}

p.reduced-p {
    line-height: 1.2; /* Adjust line spacing */
    margin: 5px 0;    /* Adjust space between paragraphs */
}

.response-actions {
    display: none; /* Hidden initially */
}

/* Spinner container */
.spinner-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Spinner animation */
.spinner {
    width: 24px;
    height: 24px;
    border: 4px solid #3498db;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Static text next to the spinner */
.spinner-text {
    font-size: 14px;
    color: #333;
}

/* Keyframes for spinner rotation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
