/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #121212;
    color: #fff;
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: #000; /* Change to solid black background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

header .logo img {
    max-width: 150px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
}

.language-toggle button {
    background: #444;
    color: #fff;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.language-toggle button:hover {
    background: #777;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 25px;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 4px;
    background: #fff;
    border-radius: 2px;
}

/* Mobile Menu Styles */
.nav-list {
    display: flex;
    list-style: none;
}

.nav-list li {
    margin-right: 20px;
}

@media (max-width: 768px) {
    /* Hide the navigation links on mobile */
    .nav-list {
        display: none;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    }

    .nav-list li {
        margin-bottom: 15px;
        text-align: center;
    }

    .nav-list.active {
        display: flex;
    }

    /* Show hamburger menu icon on mobile */
    .hamburger {
        display: flex;
    }

    /* Language toggle in mobile view */
    .language-toggle {
        display: none;
    }
}

/* Main Content */
main {
    padding-top: 100px;
    padding-bottom: 40px;
    background: url('astro-background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-bottom: 20px;
    color: #fff;
}

.intro-text {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #ddd;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

textarea {
    resize: vertical;
}

button.submit-btn {
    background-color: #5c6bc0;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    transition: background-color 0.3s;
}

button.submit-btn:hover {
    background-color: #3949ab;
}

/* Popup */
.popup {
    display: none; /* Ensures flex properties work */
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
}

.popup-content {
    background: #fff;
    color: #333;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 400px;
}

.popup-content p {
    font-size: 18px;
    margin-bottom: 20px;
}

.popup-content button {
    background-color: #5c6bc0;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.popup-content button:hover {
    background-color: #3949ab;
}

/* Footer */
footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* Logo styling */
header .logo img {
    max-width: 80px; /* Adjust the max width for desktop */
    height: auto; /* Maintain aspect ratio */
}

/* Mobile-specific Logo */
@media (max-width: 768px) {
    header .logo img {
        max-width: 150px; /* Adjust the max width for mobile */
    }
}

/* About Us Page */
.about-container {
    padding: 50px;
    text-align: center;
}

.about-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-bottom: 20px;
}

.about-container h2 {
    font-size: 24px;
    margin-top: 30px;
}

.about-container ul {
    list-style: none;
    margin-top: 20px;
}

.about-container li {
    font-size: 16px;
    color: #ddd;
}

/* Contact Page */
.contact-container {
    padding: 50px;
    text-align: center;
}

.contact-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-bottom: 20px;
}

.contact-container h2 {
    font-size: 24px;
    margin-top: 30px;
}

.contact-container p {
    font-size: 16px;
    color: #ddd;
    margin-top: 10px;
}

.contact-container form {
    margin-top: 40px;
}

.contact-container .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.contact-container button.submit-btn {
    background-color: #5c6bc0;
    color: #fff;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    transition: background-color 0.3s;
}

.contact-container button.submit-btn:hover {
    background-color: #3949ab;
}

/* Services Page */
.services-container {
    padding: 50px;
    text-align: center;
}

.services-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    margin-bottom: 20px;
}

.services-container p {
    font-size: 16px;
    color: #ddd;
    margin-bottom: 40px;
}

.service {
    margin-bottom: 40px;
}

.service h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.service p {
    font-size: 16px;
    color: #ddd;
}

.button-spinner {
    border: 3px solid #ccc;
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

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

.footer-links a {
    margin-right: 15px; /* Adds space between the links */
    text-decoration: none; /* Optional: to remove underline */
    color: white;
}

.footer-links a:last-child {
    margin-right: 0; /* Removes space after the last link */
}

.preparing-container {
    text-align: center;
    padding: 50px 20px;
    max-width: 600px;
    margin: 100px auto;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    margin-bottom: 20px;
}

p {
    font-size: 16px;
    margin-bottom: 18px;
}

.progress-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress {
    width: 0;
    height: 20px;
    background: #5c6bc0;
    transition: width 0.3s ease;
}

#pay-button {
    background-color: #5c6bc0;
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#pay-button:hover {
    background-color: #3949ab;
}

.offer-banner {
    background-color: #ff9800;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 20px;
}

.offer-banner p {
    margin: 0;
}

.testimonials {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
}

.testimonials h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 20px;
    color: #ff9800;
}

.testimonial {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    color: #fff;
    font-style: italic;
}

.testimonial span {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: #ccc;
}

.payment-security {
    margin-top: 20px;
    color: #5c6bc0;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-security i {
    margin-right: 10px;
}

.progress {
    width: 0;
    height: 20px;
    background: linear-gradient(90deg, #5c6bc0, #3949ab);
    transition: width 0.3s ease;
    animation: progress-animation 3s linear infinite;
}

@keyframes progress-animation {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

#pay-button {
    position: relative;
    overflow: hidden;
    background-color: #5c6bc0;
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

#pay-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Styles for the Payment Methods Section */
.payment-methods {
    margin-top: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.payment-methods h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.payment-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    justify-items: center;
}

.payment-icon {
    text-align: center;
    color: white;
}

.payment-icon i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #5c6bc0; /* Payment method icon color */
}

.payment-icon p {
    font-size: 14px;
    color: #ddd;
}

/* Checkbox Container */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-top: 6px;
}

/* Custom Checkbox Style */
.checkbox-container input[type="checkbox"] {
    width: 22px;
    height: 22px;
    background-color: #2a2a2a;  /* Dark background for checkbox */
    border: 2px solid #444;  /* Soft border */
    border-radius: 5px;
    appearance: none;
    cursor: pointer;
    position: relative;
    margin-right: 12px;
    transition: all 0.3s ease;  /* Smooth transition for hover and check */
}

/* Custom Checkmark Appearance when Checked */
.checkbox-container input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 14px;
    height: 14px;
    background-color: #4CAF50;  /* Green for checked state */
    border-radius: 3px;
    transform: scale(1.1);  /* Slight scaling when checked */
}

/* Hover Effect for Checkbox */
.checkbox-container input[type="checkbox"]:hover {
    border-color: #f39c12;  /* Golden hover effect */
    background-color: #333;  /* Darker background on hover */
}

/* Label Styling */
.checkbox-container label {
    font-size: 16px;
    margin-top: 5px;
    color: #f5f5f5;  /* Light text color */
    cursor: pointer;
    font-family: 'Arial', sans-serif;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Change label color when checkbox is checked */
.checkbox-container input[type="checkbox"]:checked + label {
    color: #4CAF50;  /* Green color for checked state */
}

/* Hover Effect on Label */
.checkbox-container label:hover {
    color: #f39c12;  /* Golden color when hovering over label */
    transform: scale(1.05);  /* Slightly enlarge label on hover */
}

/* Active State for Label */
.checkbox-container input[type="checkbox"]:active + label {
    color: #e67e22;  /* Orange color when checkbox is clicked */
}

/* Styles for the Locked Report Field */
#locked-report {
    background-color: #333; /* New background color */
    color: #fff; /* White text color */
    padding: 20px; /* Padding around the text */
    border-radius: 10px; /* Rounded corners */
    margin-top: 20px; /* Space above the element */
    font-size: 16px; /* Font size */
    line-height: 1.5; /* Line height for readability */
    text-align: left; /* Align text to the left */
    position: relative; /* Position relative for the lock icon */
}

/* Lock Icon */
#locked-report::after {
    content: '\f023'; /* Font Awesome lock icon */
    font-family: 'Font Awesome 5 Free'; /* Font Awesome font family */
    font-weight: 900; /* Font weight for the icon */
    margin-left: 8px; /* Space between text and icon */
    font-size: 18px; /* Font size for the icon */
    color: #f39c12; /* Golden color for the icon */
    vertical-align: middle; /* Align icon with text */
}


#report-count-stats {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent background */
    color: #ff9800; /* Orange text color */
    padding: 15px; /* Padding around the text */
    border-radius: 10px; /* Rounded corners */
    font-size: 18px; /* Font size */
    font-weight: normal; /* Bold text */
    text-align: center; /* Centered text */
    margin-top: 20px; /* Space above the element */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: transform 0.3s ease; /* Smooth transition for hover effect */
    display: flex; /* Flexbox layout */
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    flex-wrap: wrap; /* Allow text to wrap */
}

#report-count-stats i {
    margin-right: 10px; /* Space between icon and text */
    font-size: 24px; /* Larger icon size */
    vertical-align: middle; /* Align icon with text */
}

#report-count-stats:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
}

/* Feedback Form */
.feedback-form {
    display: none;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    position: fixed; /* Change to fixed positioning */
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Adjust position to center */
    z-index: 1002; /* Ensure it appears above other content */
    width: 90%; /* Ensure it takes 90% of the viewport width */
    max-width: 500px; /* Maximum width */
}

.feedback-form h3 {
    color: #fff;
    margin-bottom: 10px;
    text-align: center; /* Center the heading */
    width: 100%; /* Ensure it takes the full width */
    display: block; /* Ensure it is a block element */
}

.feedback-form select,
.feedback-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
}

.feedback-form button {
    background-color: #ff9800; /* Orange background */
    color: #fff; /* White text color */
    padding: 10px 20px; /* Padding */
    font-size: 16px; /* Font size */
    border: none; /* No border */
    cursor: pointer; /* Pointer cursor */
    border-radius: 5px; /* Rounded corners */
    margin-top: 10px; /* Space above the button */
    transition: background-color 0.3s, transform 0.3s; /* Smooth transition */
}

.feedback-form button:hover {
    background-color: #e67e22; /* Darker orange on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
}

#no-thanks-button {
    background-color: transparent; /* Transparent background */
    color: #fff; /* White text color */
    padding: 10px 20px; /* Padding */
    font-size: 16px; /* Font size */
    border: 2px solid #fff; /* White border */
    cursor: pointer; /* Pointer cursor */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s, color 0.3s; /* Smooth transition */
    margin-top: 10px; /* Space above the button */
}

#no-thanks-button:hover {
    background-color: #fff; /* White background on hover */
    color: #121212; /* Dark text color on hover */
}

.feedback-form .close-button {
    background-color: transparent; /* Transparent background */
    color: #fff; /* White text color */
    padding: 10px 20px; /* Padding */
    font-size: 16px; /* Font size */
    border: 2px solid #fff; /* White border */
    cursor: pointer; /* Pointer cursor */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s, color 0.3s; /* Smooth transition */
    margin-top: 10px; /* Space above the button */
}

.feedback-form .close-button:hover {
    background-color: #fff; /* White background on hover */
    color: #121212; /* Dark text color on hover */
}

/* Landing Page */
.landing-container {
    padding-top: 100px;
    padding-bottom: 40px;
    background: url('astro-background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.landing-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
}

.landing-container .intro-text {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 30px;
}

.services-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.service-link {
    background: #111; /* Even darker background */
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    width: 300px;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7); /* Enhanced shadow effect */
}

.service-link:hover {
    background: #222; /* Slightly lighter on hover */
    transform: scale(1.1); /* More pronounced scale effect */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9); /* Further enhanced shadow effect on hover */
}

/* Mobile-specific padding for service section */
@media (max-width: 768px) {
    .service-link {
        width: calc(100% - 40px); /* Leave some space on the left and right */
    }
}

/* Service Sections */
.service-section {
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #1e1e1e, #2a2a2a); /* Gradient background */
    border: 1px solid #444; /* Border */
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s; /* Added transition for transform and box-shadow */
}

.service-section:hover {
    transform: scale(1.02); /* Slightly enlarge on hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Added shadow effect */
}

/* Mobile-specific padding for service section */
@media (max-width: 768px) {
    .service-section {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.service-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 20px;
    color: #ff9800;
}

.service-section .service-link {
    display: inline-block;
    margin: 10px;
    background: linear-gradient(135deg, #333, #444); /* Gradient background */
    padding: 40px; /* Further increased padding */
    border: 1px solid #555; /* Border */
    border-radius: 10px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    width: 300px; /* Further increased width */
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s; /* Added transition for transform and box-shadow */
}

.service-section .service-link:hover {
    background: linear-gradient(135deg, #444, #555); /* Slightly lighter gradient on hover */
    transform: scale(1.05); /* Slightly enlarge on hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); /* Added shadow effect */
}

.service-section .service-link i {
    font-size: 40px;
    margin-bottom: 10px;
}

.service-section .service-link span {
    display: block;
    font-size: 18px;
    font-weight: 500;
}

.service-section .coming-soon {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #ff9800;
    font-weight: bold;
}

/* Book List Page */
.book-list-container {
    padding: 50px;
    text-align: center;
}

.book-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.book-item {
    background: #111;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    color: #fff;
    text-decoration: none;
    width: 300px; /* Adjust width for single book */
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-item:hover {
    background: #222;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9);
}

.book-item img {
    width: 100%;
    height: auto; /* Adjust height to auto to prevent cropping */
    border-radius: 5px;
    object-fit: contain; /* Ensure the image fits within the container */
    margin-bottom: 15px;
}

.book-info {
    text-align: center;
}

.details-button, .buy-button {
    background-color: #5c6bc0;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
    display: inline-block;
}

.details-button:hover, .buy-button:hover {
    background-color: #3949ab;
    transform: scale(1.05);
}

/* Book Details Page */
.book-details-container {
    padding: 50px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-cover img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.book-details {
    text-align: center;
}

.book-details h1 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    margin-bottom: 20px;
}

.book-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.dark-theme-info p {
    font-size: 18px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #ff9800;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.dark-theme-info p i {
    margin-right: 5px;
}

.dark-theme-info p span {
    display: block;
    margin-top: 5px;
    color: #fff;
}

.buy-button {
    background-color: #5c6bc0;
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none;
    display: inline-block;
}

.buy-button:hover {
    background-color: #3949ab;
    transform: scale(1.05);
}

/* Styles for the instant download note */
.instant-download-note {
    margin-top: 10px;
    font-size: 16px;
    color: #ff9800;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instant-download-note i {
    margin-right: 5px;
}

/* Styles for the ebooks link */
.ebooks-link {
    display: inline-block;
    background: #5c6bc0;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background 0.3s, transform 0.3s;
}

.ebooks-link:hover {
    background: #3949ab;
    transform: scale(1.05);
}


/* Language Modal */
.modal {
    display: none; /* Hidden by default, set to flex via JS */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #1e1e1e;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2);
    border: 1px solid #333;
}

.modal-content h2 {
    color: #ffd700;
    margin-bottom: 30px;
}

.language-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.lang-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border: 2px solid #ffd700;
    background: transparent;
    color: #fff;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: #ffd700;
    color: #000;
    transform: translateY(-2px);
}

/* Chat Interface Styles */
.chat-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px); /* Adjust based on header height */
    padding-top: 80px; /* Header space */
    background: #121212;
}

.chat-container {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 10px 20px;
    background: #2c2c2c;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header .profile-pic img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffd700;
}

.chat-header .chat-info h2 {
    color: #ffd700;
    margin: 0;
    font-size: 1.2rem;
    text-align: left;
}

.chat-header .chat-info p {
    color: #aaa;
    font-size: 0.8rem;
    margin: 0;
    text-align: left;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background: #333;
    border-radius: 12px;
    border-top-left-radius: 0;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #aaa;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
 /* default delay */
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-color: #ffd700 #2c2c2c;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2c2c2c;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #ffd700;
    border-radius: 10px;
}

.message {
    display: flex;
    max-width: 80%;
}

.message.ai-message {
    align-self: flex-start;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.5;
}

.ai-message .message-content {
    background: #333;
    color: #fff;
    border-top-left-radius: 0;
}

.user-message .message-content {
    background: #ffd700;
    color: #000;
    border-top-right-radius: 0;
}

.chat-input-area {
    padding: 20px;
    background: #2c2c2c;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px;
    border-radius: 25px;
    border: 1px solid #444;
    background: #1e1e1e;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.chat-input-area input:focus {
    border-color: #ffd700;
}

.chat-input-area button {
    background: #ffd700;
    color: #000;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.chat-input-area button:hover {
    background: #e6c200;
}




/* Mobile Optimization */
@media (max-width: 768px) {
    header {
        display: none !important;
    }
    .chat-layout {
        padding-top: 0 !important;
        height: 100dvh !important; /* Use dynamic viewport height */
        box-sizing: border-box;
        overflow: hidden;
    }
    .chat-container {
        width: 100%;
        height: 100%; /* Fill the parent instead of forcing 100vh */
        border-radius: 0;
    }
}
