/* Sticky footer pattern */
html, body {
    height: 100%;
}

/* General Body and Container Styling */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #202124;
    padding-top: 60px;
    box-sizing: border-box;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Initial Load State */
body.initial-load {
    justify-content: flex-start;
    padding-top: 0;
}

/* Ensure main content grows and pushes footer down */
main, #content, .container {
    flex: 1 0 auto;
}

.container {
    text-align: center;
    width: 90%;
    max-width: 580px;
    margin-left: 5%;
}

/* Logo Styling */
.logo-placeholder {
    font-size: 50px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4285f4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: -3px;
}

/* Search Form Styling (for initial search, not header) */
.search-form {
    display: flex;
    flex-direction: column; /* Default for main form: items stack vertically */
    align-items: center;
    width: 100%;
}

.search-input-wrapper {
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    box-shadow: 0 1px 6px rgba(32, 33, 36, .1);
}

.search-input-wrapper:hover {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .2); /* Slightly more prominent shadow on hover */
    border-color: #dadce0;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .2); /* Keep consistent shadow on focus */
    border-color: #4285f4; /* Subtle blue border on focus */
}

.search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 8px 0;
    margin-left: 10px;
    color: #202124;
}

.search-buttons { /* Only for main search form */
    display: flex;
    gap: 10px;
}

.search-button {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    padding: 10px 24px;
    cursor: pointer;
    outline: none;
    transition: background-color .2s ease-in-out, border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}

.search-button:hover {
    background-color: #f1f3f4;
    border-color: #dadce0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}

/* Header Search Bar */
#header-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.header-logo {
    font-size: 20px;
    font-weight: bold;
    color: #4285f4;
    margin-right: 20px; /* Space between logo and search form */
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.header-form {
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    width: 100%;
}

.header-form .search-input-wrapper {
    margin-bottom: 0;
    box-shadow: 0 1px 6px rgba(32, 33, 36, .1);
    border-color: #dfe1e5;
    padding: 0 16px;
    flex-grow: 1;
    width: 100%;
    gap: 8px;
    display: flex;
    align-items: center;
    height: 44px;
    box-sizing: border-box;
    margin: 0 12px;
}

.header-form .search-input-wrapper:hover {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .2);
    border-color: #dadce0;
}

.header-form .search-input-wrapper:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .2);
    border-color: #4285f4;
}

.header-form .search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    margin-left: 0;
    color: #202124;
    height: 100%; /* Make input take full height of wrapper */
    box-sizing: border-box; /* Include padding in height */
}

.header-form .search-button {
    display: none; /* Hide the AI Search button in the header if it's not needed */
    margin-left: 10px;
    padding: 10px 16px;
    font-size: 13px;
    flex-shrink: 0;
}

/* Icon Button Base Styling */
.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px; /* Set a fixed width for the button itself */
    height: 24px; /* Set a fixed height for the button itself */
    transition: opacity 0.3s ease;
}

.icon-button:hover {
    opacity: 0.8; /* Subtle hover effect */
}

/* Magnifying Glass Search Icon (inside input wrapper) */
/* This one is NOT a button, it's just an SVG */
.search-icon {
    fill: #9aa0a6; /* Standard grey color */
    width: 20px; /* Size of the icon */
    height: 20px; /* Size of the icon */
    vertical-align: middle;
    flex-shrink: 0; /* Prevent it from shrinking */
}

/* Clear Search Icon (Cross/X icon) */
.clear-search-button {
    opacity: 0.7;
}

.clear-search-button.hidden {
    display: none !important; /* Ensure it's hidden when the class is present */
}

/* Target the SVG specifically for clear icon */
.clear-search-button .clear-icon {
    fill: #9aa0a6;
    width: 20px;
    height: 20px;
}

/* Voice Search Icon */
/* Target the SVG specifically for voice icon */
.voice-search-icon .voice-icon {
    fill: #9aa0a6; /* Standard grey color, override any specific path colors */
    width: 20px;
    height: 20px;
}
.voice-search-icon .voice-icon path[fill] {
    fill: unset; /* Remove explicit fill on paths if you want them to inherit from parent button's SVG */
}

/* Image Search Icon */
/* Target the SVG specifically for image icon */
.image-search-icon .image-icon {
    fill: #9aa0a6; /* Standard grey color */
    width: 20px;
    height: 20px;
}

/* Main Content Area - New Flex Container for Results and Right Panel */
#main-content-area {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 1200px;
    padding: 20px 20px 20px 0px; /* CHANGE THIS: Reduced left padding to 5px */
    box-sizing: border-box;
}

/* Results Section */
#results-container {
    width: 90%; /* This might be adjusted depending on your layout goals */
    /*margin-left: -46px; */
    box-sizing: border-box;
    box-shadow: none;
    background-color: transparent;
    border-radius: 0;
    flex-shrink: 0;
    /*max-width: 1200px;*/ /* Keep your max-width */
    margin-top: 20px;
}

#right-panel {
    flex-grow: 1;
    width: 35%;
    min-width: 250px;
    max-width: 400px;
    padding-left: 30px;
    box-sizing: border-box;
}

#main-answer-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
}

#main-answer-section h2 {
    font-size: 18px;
    color: #202124;
    margin-top: 0;
    margin-bottom: 10px;
}

#main-answer-section p {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
}

.section-title {
    font-size: 18px;
    color: #202124;
    margin-bottom: 15px;
    margin-top: 30px;
}

/* Individual Search Result (Record) Styling */
.record {
    padding: 0;
    margin-bottom: 20px;
    border: none;
    background-color: transparent;
}

.record-title {
    font-size: 18px;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 4px;
}

.record-title a {
    color: #1a0dab;
    text-decoration: none;
}

.record-title a:hover {
    text-decoration: underline;
}

.record-summary {
    color: #4d5156;
    font-size: 14px;
    line-height: 1.58;
    margin-top: 0;
    margin-bottom: 0;
}

.record-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #70757a;
    font-size: 13px;
}

.record-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    width: 16px;
    height: 16px;
    fill: #70757a;
    flex-shrink: 0;
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Error and Loading Messages */
.error-message {
    color: #d93025;
    font-weight: bold;
    margin-top: 20px;
}

/* Modern Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 40px 0 30px 0;
    padding: 0;
    border: none;
}

.pagination-button {
    background: transparent;
    border: none;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    cursor: pointer;
    outline: none;
    border-radius: 50%;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.pagination-button:hover {
    background-color: rgba(26, 115, 232, 0.08);
    transform: scale(1.05);
}

.pagination-button.active {
    background-color: #1a73e8;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.pagination-button:disabled {
    color: #dadce0;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-button:disabled:hover {
    background: transparent;
    transform: none;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
    position: relative;
    z-index: 1002;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: #5f6368;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 20px;
    min-width: 280px;
    max-width: 320px;
    z-index: 1001;
    border: 1px solid #e0e0e0;
    animation: slideDown 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mobile-menu .header-link.mobile {
    display: block;
    padding: 12px 8px;
    text-decoration: none;
    color: #5f6368;
    font-size: 14px;
    border-radius: 6px;
    margin: 2px 0;
    transition: all 0.2s ease;
}

.mobile-menu .header-link.mobile:hover {
    background: #f8f9fa;
    color: #202124;
    transform: translateX(4px);
}

.mobile-menu .ai-click-more-button.mobile {
    width: 100%;
    margin: 8px 0;
    position: static;
}

.desktop-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-links {
    position: relative;
}

/* --- Mobile Responsiveness (Media Queries) --- */

@media (max-width: 768px) {
    body {
        padding-top: 50px;
    }

    .logo-placeholder {
        font-size: 80px;
        margin-bottom: 20px;
    }

    .search-input-wrapper {
        padding: 8px 12px;
    }

    .search-input {
        font-size: 14px;
    }

    .search-button {
        font-size: 12px;
        padding: 8px 18px;
    }

    #header-search-bar {
        padding: 8px 10px;
    }

    .header-logo {
        font-size: 20px;
        margin-right: 10px;
    }
    
    .header-center {
        margin-left: 10px;
        max-width: none;
        flex-grow: 1;
    }
    
    .header-search-input-wrapper {
        padding: 6px 12px;
    }
    
    .header-search-input {
        font-size: 13px;
    }

    .header-form .search-input-wrapper {
        padding: 6px 10px;
        gap: 6px;
        height: 40px;
    }

    .header-form .search-input {
        padding: 4px 0;
    }

    .header-form .search-button {
        padding: 8px 14px;
    }
    
    /* Show mobile menu toggle, hide desktop links */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .desktop-links {
        display: none;
    }

    #main-content-area {
        flex-direction: column;
        padding: 10px;
    }

    #results-container {
        width: 100%;
        padding-right: 0;
        margin-left: 0;
    }

    #right-panel {
        width: 100%;
        padding-left: 0;
        margin-top: 20px;
        min-width: unset;
        max-width: 100%;
    }

    .record-title {
        font-size: 18px;
    }

    .record-summary, .record-url, .record-meta-info {
        font-size: 13px;
    }

    .pagination-button {
        font-size: 13px;
        padding: 10px 14px;
        min-width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 45px;
    }

    .logo-placeholder {
        font-size: 60px;
        margin-bottom: 15px;
    }

    .search-input-wrapper {
        padding: 6px 10px;
    }

    .search-input {
        font-size: 13px;
    }

    .search-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .search-button {
        width: 100%;
        font-size: 13px;
        padding: 10px 15px;
    }

    #header-search-bar {
        padding: 7px 8px;
    }

    .header-logo {
        font-size: 18px;
        margin-right: 8px;
    }
    
    .header-center {
        margin-left: 8px;
    }
    
    .header-search-input-wrapper {
        padding: 5px 10px;
    }
    
    .header-search-input {
        font-size: 12px;
    }

    .header-form .search-input-wrapper {
        padding: 5px 8px;
        flex-grow: 1;
        height: 36px;
    }

    .header-form .search-input {
        font-size: 12px;
    }

    .header-form .search-button {
        margin-left: 5px;
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .mobile-menu {
        right: 5px;
        min-width: 240px;
        max-width: calc(100vw - 30px);
    }
}

/* --- Footer Styling --- */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f1f1f1;
    padding: 8px 10px;
    font-size: 12px;
    color: #555;
    z-index: 999;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-right {
    flex: 1;
    text-align: right;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .footer-left,
    .footer-right {
        text-align: center;
        flex: none;
    }
}

.footer-container p {
    margin: 0;
}

.footer-link {
    color: #007bff;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-separator {
    margin: 0 8px;
    color: #70757a;
}

.cache-status-message {
    font-size: 11px;
    color: #5f6368;
    font-style: italic;
    text-align: left;
    margin: 0;
    padding: 0;
}

/* Responsive */
@media (max-width: 600px) {
    .site-footer {
        font-size: 11px;
        padding: 12px 5px;
    }
    
    .footer-separator {
        margin: 0 4px;
    }
}

/* Updated Search Modes Bar */
#search-modes-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    background-color: #fff;
    box-sizing: border-box;
    position: fixed;
    top: 60px;
    left: 0;
    z-index: 990;
    height: 48px;
}

.search-mode-item {
    background: none; /* This removes any default button background */
    border: none; /* This removes any default button borders */
    padding: 10px 12px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative; /* Essential for positioning the ::after pseudo-element */
    transition: color 0.3s ease;
}

.search-mode-item:hover {
    color: #202124;
    background-color: transparent; /* Ensure no background on hover either */
}

/* Active search mode button styling */
.search-mode-item.active {
    color: #1a73e8; /* Google blue for active text */
    font-weight: 500; /* Slightly bolder for active text */
    border-bottom: none; /* Explicitly ensure no bottom border on the element itself */
}

/* Underline for the active search mode button */
.search-mode-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Positions the underline just below the mode item, overlapping the bar's border */
    left: 0;
    width: 100%;
    height: 3px; /* Thickness of the underline */
    background-color: #1a73e8; /* Google blue color for the underline */
    border-radius: 2px 2px 0 0; /* Slightly rounded corners */
    transition: width 0.3s ease, left 0.3s ease, background-color 0.3s ease;
}
.search-mode-item.disabled {
    opacity: 0.6; /* Dim disabled items */
    cursor: default; /* Change cursor for non-clickable */
    pointer-events: none; /* Prevent any click events on disabled items */
}

/* Override hover for disabled items */
.search-mode-item.disabled:hover {
    color: #5f6368; /* Keep original color on hover */
    background-color: transparent; /* No background change */
    border-bottom-color: transparent; /* No underline */
}

.search-mode-item .mode-icon {
    width: 18px; /* Size of the icon */
    height: 18px;
    margin-right: 5px; /* Space between icon and text */
    fill: currentColor; /* Inherit color from parent */
}

/* Adjust body padding to account for the new modes bar */
body:not(.initial-load) {
    padding-top: 70px;
    padding-bottom: 80px;
}

/* Adjustments for smaller screens */
@media (max-width: 768px) {
    #search-modes-bar {
        top: 50px; /* Adjust if header height changes on mobile */
        height: 40px;
        padding: 0 10px;
        overflow-x: auto; /* Allow horizontal scrolling if items overflow */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .search-mode-item {
        padding: 6px 10px;
        margin-right: 10px;
        font-size: 13px;
        flex-shrink: 0; /* Prevent items from shrinking */
    }

    .search-mode-item .mode-icon {
        width: 16px;
        height: 16px;
    }

    body:not(.initial-load) {
        padding-top: 95px; /* Header (50px) + Modes Bar (40px) + buffer (5px) */
        padding-bottom: 50px;
    }
}

@media (max-width: 480px) {
    #search-modes-bar {
        top: 45px; /* Adjust if header height changes on very small mobile */
        height: 38px;
        padding: 0 8px;
    }

    .search-mode-item {
        padding: 5px 8px;
        font-size: 12px;
        margin-right: 8px;
    }

    .search-mode-item .mode-icon {
        width: 14px;
        height: 14px;
    }

    body:not(.initial-load) {
        padding-top: 85px; /* Header (45px) + Modes Bar (38px) + buffer (2px) */
        padding-bottom: 45px;
    }
}
/* In your style.css */

.record {
    display: flex; /* Makes the record a flex container */
    align-items: flex-start; /* Aligns items to the top */
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.record-content-wrapper {
    display: flex;
    gap: 15px; /* Space between image and text */
    width: 100%;
}

.book-cover-thumbnail {
    width: 100px; /* Adjust as needed */
    height: auto;
    object-fit: contain; /* Ensures the whole image is visible */
    border: 1px solid #eee;
    border-radius: 4px;
    flex-shrink: 0; /* Prevents the image from shrinking */
}

.record-details {
    flex-grow: 1; /* Allows the details to take up remaining space */
}

.record-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.2em;
}

.book-title-link {
    color: #1a0dab;
    text-decoration: none;
}

.book-title-link:hover {
    text-decoration: underline;
}

.record-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #5f6368;
}

.record-meta-item {
    display: flex;
    align-items: center;
}

.record-meta-item .meta-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    color: #5f6368; /* Or any other desired color */
}

.record-summary {
    line-height: 1.5;
    color: #444;
}
/* In your style.css or a similar CSS file */

.record-content-wrapper {
    display: flex; /* Enables flexbox for side-by-side layout */
    align-items: flex-start; /* Aligns items to the start of the cross-axis (top) */
    gap: 15px; /* Adds space between the image and the details */
}

.book-cover-thumbnail {
    width: 100px; /* Adjust as needed */
    height: auto; /* Maintain aspect ratio */
    border: 1px solid #ddd; /* Optional: subtle border */
    border-radius: 4px; /* Optional: rounded corners */
    flex-shrink: 0; /* Prevents the image from shrinking */
}

.book-cover-placeholder {
    width: 100px; /* Match thumbnail width */
    height: 150px; /* Adjust as needed, possibly matching average cover height */
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex-shrink: 0;
}

.record-details {
    flex-grow: 1; /* Allows the details section to take up remaining space */
}
/* style.css */

/* ... (your existing CSS) ... */

/* New styles for Google-like search results */

#results-container {
    margin-top: 20px;
    margin-left: 5%;
    padding: 0 20px;
    width: 95%;
    box-sizing: border-box;
    text-align: left;
}

/* Hide section titles if you no longer want them */
#metadata-section-title,
#semantic-section-title {
    display: none; /* Hide the section titles for a unified look */
}

/* Style for individual search result containers */
.search-result-item {
    background-color: #ffffff;
    flex-direction: row-reverse;
    padding: 20px;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-bottom: 1px solid #ebebeb;
    width: 78%;
    text-align: left;
    margin-left: 0;
}
.search-result-item:last-child {
    border-bottom: none; /* Remove border from the last item */
}

.search-result-item:hover {
    box-shadow: none; /* No shadow on hover either */
    transition: none; /* No transition on hover */
}
.book-cover-thumbnail {
    width: 100px; /* Adjust as needed */
    height: auto; /* Maintain aspect ratio */
    border: 1px solid #ddd; /* Optional: subtle border */
    border-radius: 4px; /* Optional: rounded corners */
    flex-shrink: 0; /* Prevents the image from shrinking */
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.book-cover-placeholder {
    width: 100px;
    height: 150px; /* Standard book aspect ratio */
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.8em;
    text-align: center;
    flex-shrink: 0;
}

.result-details {
    flex-grow: 1; /* Allows details to take up remaining space */
}

.result-title {
    font-size: 1.2em; /* Slightly larger title */
    color: #1a0dab; /* Google blue for links */
    margin-bottom: 5px;
    text-decoration: none; /* Remove underline by default */
}

.result-title:hover {
    text-decoration: underline; /* Underline on hover */
}

.result-snippet {
    font-size: 0.9em;
    color: #4d5156; /* Darker grey for snippet */
    line-height: 1.5;
    margin-bottom: 10px;
}

.record-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Increase gap between meta items */
    margin-top: 10px;
    font-size: 0.85em; /* Slightly smaller for metadata */
    color: #5f6368;
    align-items: center; /* Vertically align icons and text */
}

.record-meta-item {
    display: flex;
    align-items: center; /* Ensures icon and text are aligned */
    white-space: nowrap; /* Prevent wrapping for each meta item */
}

.record-meta-item .meta-icon {
    width: 18px; /* Slightly larger icons */
    height: 18px;
    margin-right: 6px; /* Space between icon and text */
    fill: #5f6368; /* Icon color */
    flex-shrink: 0; /* Prevent icons from shrinking */
}

/* Pagination controls - ensure they are centered and styled well */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.pagination-button {
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 0.9em;
    color: #1a0dab;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-button:hover {
    background-color: #e8eaed;
}

.pagination-button:disabled {
    background-color: #f0f0f0;
    color: #9aa0a6;
    cursor: not-allowed;
}

/* Adjustments for semantic results if you still want a distinct section */
#semantic-results {
    margin-top: 30px; /* Space between metadata and semantic results */
}

/* If you want semantic results to also adopt the card-like structure */
.semantic-result-item {
    background-color: #f0fffee8; /* Light blueish tint for semantic results */
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #cceeff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.semantic-result-item .result-title {
    color: #0d47a1; /* Darker blue for semantic titles */
}
.semantic-result-item .result-snippet {
    color: #333;
}

#loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    
    position: relative; /* Ensures it participates in normal document flow */
    margin-top: 20px; /* Adds space between the buttons and the indicator */
    margin-bottom: 20px; /* Optional: adds space below the indicator if other content follows */
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3; /* Light grey base for the circle */
    border-top: 3px solid #4285f4; /* Google blue for the spinning part */
    border-radius: 50%; /* Makes it a perfect circle */
    width: 24px; /* Slightly larger size for visibility */
    height: 24px; /* Matches width for circular shape */
    animation: spin 1s linear infinite; /* Keeps it spinning */
}

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

/* Loading Message */
#loading-message { /* Changed from .loading-message to #loading-message for consistency with HTML ID */
    font-size: 1em; /* Reduced font size for a less prominent look */
    color: #5f6368; /* A subtle grey */
    font-weight: bold;
    text-align: center;
}

/* Responsive adjustments for .search-result-item */
@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column; /* Stack image and text vertically */
        align-items: center; /* Center items when stacked */
        text-align: center; /* Center text */
        padding: 15px 10px; /* Adjust padding */
    }

    .book-cover-thumbnail,
    .book-cover-placeholder {
        margin-bottom: 15px; /* Add space below image when stacked */
    }

    .record-meta-info {
        justify-content: center; /* Center meta info items */
        margin-top: 10px; /* Adjust margin */
    }
}

@media (max-width: 480px) {
    .record-meta-info {
        gap: 8px; /* Reduce gap between meta items */
        font-size: 0.8em; /* Further reduce font size */
    }

    .record-meta-item .meta-icon {
        width: 16px;
        height: 16px;
    }

    .result-title {
        font-size: 1.1em; /* Adjust title size */
    }

    .result-snippet {
        font-size: 0.85em; /* Adjust snippet size */
    }

    .pagination-controls {
        gap: 2px;
        margin: 30px 0 20px 0;
    }

    .pagination-button {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 36px;
        height: 36px;
    }
}

/*new css added - 30th July 2025*/

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 20px;
    background-color: #f9f9f9;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-link {
    text-decoration: none;
    color: #5d5d5d;
    font-size: 12px;
    transition: color 0.3s ease;
    padding: 5px;
}

.header-link:hover {
    color: #007bff;
}

.donate-button {
    background-color: #d9534f;
    color: #fff !important;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
}



/* Responsive */
@media (max-width: 768px) {
    .header-right {
        justify-content: center;
        margin-top: 10px;
    }
    #header-search-form {
        margin-top: 10px;
    }
}


/*About us CSS*/

.about-section {
    padding: 5px 30px;
    background-color: #f9f9f9;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: left;
    margin-top: 30px;
    margin-bottom: 50px;
    border-radius: 10px;
}

.container_abt {
    /*max-width: 900px;*/
    /*margin: 0 auto;*/
    text-align: left;
}

.about-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #222;
}

.about-intro {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.about-subtitle {
    font-size: 22px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 15px;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.features-list li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.jain-quote {
    font-style: italic;
    font-size: 16px;
    background: #fff;
    padding: 15px 20px;
    border-left: 4px solid #007bff;
    margin: 20px 0;
    color: #555;
}

.jain-quote span {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: bold;
    color: #333;
}

.closing-note {
    font-size: 16px;
    font-weight: normal;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 600px) {
    .about-title {
        font-size: 22px;
    }

    .about-subtitle {
        font-size: 18px;
    }

    .features-list li {
        font-size: 14px;
    }

    .jain-quote {
        font-size: 14px;
    }
}



.ai-click-more-button {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 160px;
    height: 40px;
    white-space: nowrap;
    margin-right: 30px;
}

.ai-click-more-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.footer-link {
    color: #007bff;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .site-footer {
        font-size: 11px;
        padding: 12px 5px;
    }
    
    .footer-separator {
        margin: 0 4px;
    }
}
/* Home page top bar */
.home-top-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.home-login {
    display: flex;
    align-items: center;
}

#ai-overview-section {
    width: 100%;
    background: transparent;
    padding: 0;
    margin: 0 0 20px 0;
    position: relative;
}

.ai-overview-card {
    position: relative;
    width: 65%;
    margin-left: 20px;
    padding: 0;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    max-height: 300px;
    overflow-y: auto;
}

.ai-overview-card.collapsed {
    max-height: 90px;
    overflow: hidden;
    position: relative;
}

.ai-overview-card.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
}

.ai-expand-button {
    background: none;
    border: none;
    color: #1a73e8;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ai-expand-button:hover {
    text-decoration: underline;
}

.ai-expand-button::after {
    content: '';
    width: 12px;
    height: 12px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%231a73e8"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat center;
    background-size: contain;
    transition: transform 0.2s ease;
}

.ai-overview-card.collapsed .ai-expand-button::after {
    transform: rotate(-90deg);
}

#metadata-results {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    margin-left: 20px;
    width: 78%;
}

@media (max-width: 768px) {
    .ai-overview-card {
        width: 90%;
        margin-left: 10px;
        padding: 0;
    }
    
    #metadata-results {
        width: 90%;
        margin-left: 10px;
    }
    
    .ai-overview-card.collapsed {
        max-height: 75px;
    }
    
    .ai-click-more-button {
        position: static;
        margin-top: 16px;
        width: auto;
        right: auto;
    }
    
    .ai-short-answer {
        font-size: 15px;
    }
    
    .ai-detailed-answer {
        font-size: 13px;
    }
}

.ai-overview-card h3 {
    font-size: 16px;
    font-weight: 400;
    color: #70757a;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-overview-card h3::before {
    content: '';
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%234285f4"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.ai-short-answer {
    font-size: 16px;
    font-weight: 400;
    color: #202124;
    margin-top: 60px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.ai-short-answer a {
    background: #1a73e8;
    color: white !important;
    padding: 4px 12px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.2);
}

.ai-short-answer a:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(26, 115, 232, 0.3);
}

.ai-short-answer a::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.2s ease;
}

.ai-short-answer a.expanded::after {
    transform: rotate(180deg);
}

.ai-detailed-answer {
    font-size: 14px;
    color: #4d5156;
    line-height: 1.58;
    margin-bottom: 20px;
    display: none;
}

.ai-detailed-answer.show {
    display: block;
}

.ai-reference-section {
    display: none;
}

.ai-reference-section.show {
    display: block;
}

.ai-reference-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.ai-reference-list li {
    margin-bottom: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-reference-list li::before {
    content: '';
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%235f6368"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>') no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.ai-reference-list a {
    color: #1a73e8;
    text-decoration: none;
    line-height: 1.4;
}

.ai-reference-list a:hover {
    text-decoration: underline;
}

.search-arrow-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.search-arrow-button:hover {
    color: #1a73e8;
}

.mic-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    margin-right: 4px;
}

.mic-button:hover {
    color: #4285f4;
}

.intro-text {
    max-width: 500px;
    margin: 30px auto 0;
    text-align: center;
}

.intro-text p {
    font-size: 14px;
    line-height: 1.5;
    color: #5f6368;
}

.header-center {
    margin-left: 20px;
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
    margin-right: 20px;
}

/* Header Search Form Styles */
.header-search-form {
    width: 100%;
    display: flex;
    align-items: center;
}

.header-search-input-wrapper {
    width: 100%;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #fff;
    box-shadow: 0 1px 6px rgba(32, 33, 36, .1);
    transition: all 0.2s ease;
}

.header-search-input-wrapper:hover {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .2);
    border-color: #dadce0;
}

.header-search-input-wrapper:focus-within {
    box-shadow: 0 1px 6px rgba(32, 33, 36, .2);
    border-color: #4285f4;
}

.header-search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    margin-left: 8px;
    color: #202124;
    background: transparent;
}

.header-search-input::placeholder {
    color: #9aa0a6;
}

.header-search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    margin-left: 8px;
}

.header-search-button:hover {
    color: #1a73e8;
}

.cache-status-message {
    font-size: 11px;
    color: #5f6368;
    font-style: italic;
    text-align: left;
    margin: 0;
    padding: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-separator {
    margin: 0 8px;
    color: #70757a;
}

/* Login Modal Styles */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-modal-content h2 {
    color: #202124;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 400;
}

.login-modal-content p {
    color: #5f6368;
    margin-bottom: 24px;
    line-height: 1.5;
}

.close-modal-btn {
    background: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 8px 16px;
    margin-top: 16px;
    cursor: pointer;
    color: #3c4043;
}

.close-modal-btn:hover {
    background: #f1f3f4;
}

/* Donation Popup Styles */
.donation-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.donation-popup-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
}

.donation-popup-content h3 {
    color: #202124;
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 500;
}

.donation-popup-content p {
    color: #5f6368;
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 14px;
}

.donation-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.donate-btn {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.donate-btn:hover {
    background: #1557b0;
}

.skip-btn {
    background: #f8f9fa;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.skip-btn:hover {
    background: #f1f3f4;
}

.close-popup-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #5f6368;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup-btn:hover {
    background: #f1f3f4;
    border-radius: 50%;
}

/* Forget Me Modal Styles */
.forget-me-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.forget-me-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: left;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.forget-me-modal-content h2 {
    color: #d93025;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 500;
}

.forget-me-modal-content p {
    color: #202124;
    margin-bottom: 12px;
    line-height: 1.5;
}

.forget-me-modal-content ul {
    color: #5f6368;
    margin: 16px 0;
    padding-left: 20px;
}

.forget-me-modal-content li {
    margin-bottom: 8px;
}

#forget-confirmation {
    width: 100%;
    padding: 12px;
    border: 2px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    margin: 16px 0;
    box-sizing: border-box;
}

#forget-confirmation:focus {
    border-color: #1a73e8;
    outline: none;
}

.forget-me-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.delete-btn {
    background: #d93025;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 500;
}

.delete-btn:hover {
    background: #b52d20;
}

.cancel-btn {
    background: #f8f9fa;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
}

.cancel-btn:hover {
    background: #f1f3f4;
}

.forget-me-link {
    color: #d93025 !important;
    font-size: 12px;
}

.forget-me-link:hover {
    color: #b52d20 !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Regenerate button styles */
.regenerate-button {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.2);
}

.regenerate-button:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.3);
}

.regenerate-button:disabled {
    background: #dadce0;
    color: #5f6368;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinning animation for regenerate button */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Google Sign-In Button Styling */
.g_id_signin {
    margin: 16px 0;
}

/* Mobile responsiveness for modals */
@media (max-width: 480px) {
    .login-modal-content,
    .donation-popup-content,
    .forget-me-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .donation-buttons,
    .forget-me-buttons {
        flex-direction: column;
    }
    
    .donate-btn,
    .skip-btn,
    .delete-btn,
    .cancel-btn {
        width: 100%;
    }
}

/* New Home Page Styles */

/* Hero Container */
.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 0 40px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 72px;
    font-weight: 300;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #4285f4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px 0;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 20px;
    color: #5f6368;
    margin: 0 0 48px 0;
    font-weight: 300;
}

/* Authentication Card */
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    max-width: 400px;
    margin: 0 auto;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.auth-card h3 {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 16px 0;
}

.auth-card p {
    color: #5f6368;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.signin-button-container {
    display: flex;
    justify-content: center;
}

/* Home Chat Button */
.home-chat-button-container {
    margin: 0 0 32px 0;
    text-align: center;
}

.home-chat-button {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    border: none;
    border-radius: 32px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    color: white;
    overflow: hidden;
}

.home-chat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 115, 232, 0.4);
}

.home-chat-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

/* Search Container */
.search-container {
    max-width: 580px;
    margin: 0 auto;
}

/* Enhanced Search Form */
.hero-section .search-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-section .search-input-wrapper {
    width: 100%;
    max-width: 580px;
    border: 2px solid #dadce0;
    border-radius: 32px;
    display: flex;
    align-items: center;
    padding: 16px 24px;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.hero-section .search-input-wrapper:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    border-color: #4285f4;
}

.hero-section .search-input-wrapper:focus-within {
    box-shadow: 0 6px 24px rgba(66, 133, 244, 0.2);
    border-color: #4285f4;
}

.hero-section .search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 0;
    margin-left: 16px;
    color: #202124;
    background: transparent;
}

.hero-section .search-input::placeholder {
    color: #9aa0a6;
}

/* Quick Examples */
.quick-examples {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.example-label {
    color: #5f6368;
    font-size: 14px;
    margin-right: 8px;
    width: 100%;
    text-align: center;
    margin-bottom: 16px;
}

.example-query {
    background: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13px;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    box-sizing: border-box;
}

.example-query:hover {
    background: #e8f0fe;
    border-color: #4285f4;
    color: #1a73e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

/* Status Cards */
.status-card {
    background: white;
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    max-width: 400px;
    margin: 0 auto;
}

.status-card.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-color: #c3e6cb;
}

.status-icon {
    font-size: 48px;
    margin-bottom: 24px;
}

.status-card h3 {
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    margin: 0 0 16px 0;
}

.status-card p {
    color: #5f6368;
    margin: 0;
    line-height: 1.5;
}

/* Access Form */
.access-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.access-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #dadce0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.access-form textarea:focus {
    outline: none;
    border-color: #4285f4;
}

.primary-button {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-button:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: white;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: 16px;
    background: #f8f9fa;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin: 0 0 16px 0;
}

.feature-card p {
    color: #5f6368;
    line-height: 1.6;
    margin: 0;
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.stats-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-divider {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 1px;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.about-content h2 {
    font-size: 32px;
    font-weight: 300;
    color: #202124;
    margin: 0 0 32px 0;
}

.about-content p {
    font-size: 16px;
    line-height: 1.7;
    color: #5f6368;
    margin: 0 0 24px 0;
}

.disclaimer {
    font-style: italic;
    color: #9aa0a6;
    font-size: 14px;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-section {
        padding: 40px 0 30px;
        min-height: 50vh;
    }
    
    .hero-section .search-input-wrapper {
        width: 90%;
    }
    
    .auth-card,
    .status-card {
        padding: 32px 20px;
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0 16px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 32px;
        padding: 32px 16px;
        margin: 0 16px;
    }
    
    .stat-divider {
        width: 60px;
        height: 2px;
    }
    
    .home-chat-button {
        font-size: 16px;
        padding: 14px 24px;
        min-width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .quick-examples {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0;
    }
    
    .example-label {
        margin-bottom: 12px;
    }
    
    .example-query {
        text-align: center;
        padding: 12px 16px;
        min-width: auto;
        width: 100%;
        font-size: 12px;
        white-space: normal;
        line-height: 1.3;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 36px;
        word-break: break-word;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-section .search-input-wrapper {
        padding: 12px 16px;
    }
    
    .auth-card,
    .status-card {
        padding: 24px 16px;
        margin: 0;
    }
    
    .features-section,
    .about-section {
        padding: 60px 0;
    }
    
    .features-grid {
        padding: 0 12px;
    }
    
    .stats-section {
        padding: 40px 0;
    }
    
    .stats-container {
        margin: 0 12px;
        padding: 24px 12px;
    }
    
    .about-content {
        padding: 0 12px;
    }
    
    .about-content h2 {
        font-size: 24px;
    }
    
    .about-content p {
        font-size: 14px;
    }
    
    .home-chat-button {
        font-size: 15px;
        padding: 12px 20px;
        min-width: auto;
        width: auto;
        max-width: 100%;
    }
    
    .example-query {
        font-size: 11px;
        padding: 10px 12px;
    }
}

/* Content Policy Modal Styles */
.content-policy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.content-policy-modal-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    text-align: left;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid #ea4335;
}

.content-policy-modal-content h2 {
    color: #ea4335;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.policy-message {
    color: #202124;
    margin-bottom: 16px;
    line-height: 1.5;
    font-size: 15px;
    background: #fef7f0;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #ea4335;
}

.policy-info {
    color: #5f6368;
    margin-bottom: 20px;
    font-size: 13px;
    font-style: italic;
}

.policy-guidelines {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.policy-guidelines h3 {
    color: #1a73e8;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
}

.policy-guidelines ul {
    margin: 0;
    padding-left: 20px;
    color: #202124;
}

.policy-guidelines li {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 14px;
}

.policy-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.policy-ok-btn {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.policy-ok-btn:hover {
    background: #1557b0;
}

.policy-terms-btn {
    background: #f8f9fa;
    color: #1a73e8;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
    display: inline-block;
}

.policy-terms-btn:hover {
    background: #f1f3f4;
    text-decoration: none;
}

/* Mobile responsiveness for content policy modal */
@media (max-width: 480px) {
    .content-policy-modal-content {
        padding: 24px 20px;
        margin: 20px;
    }
    
    .policy-buttons {
        flex-direction: column;
    }
    
    .policy-ok-btn,
    .policy-terms-btn {
        width: 100%;
        text-align: center;
    }
    
    .policy-guidelines {
        padding: 16px;
    }
    
    .policy-message {
        padding: 12px;
        font-size: 14px;
    }
}

/* Cache indicator styles */
.cache-indicator {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cache-indicator::before {
    content: '⚡';
    font-size: 14px;
}

/* Smooth transitions for pagination */
.search-result-item {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results section transitions */
.results-section {
    transition: opacity 0.3s ease-in-out;
}

.results-section.loading {
    opacity: 0.7;
}

/* Client-side pagination improvements */
#pagination-controls {
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
}

#page-numbers {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #9aa0a6;
}

.pagination-button:disabled:hover {
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

/* Pagination ellipsis styling */
.pagination-ellipsis {
    color: #5f6368;
    font-size: 14px;
    padding: 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 44px;
    user-select: none;
}

/* Smooth result transitions */
.search-result-item {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Suggestions Dropdown Styles */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dadce0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #202124;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Search Disclaimer Styles */
.search-disclaimer {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #70757a;
}

.search-disclaimer a {
    color: #1a73e8;
    text-decoration: none;
}

.search-disclaimer a:hover {
    text-decoration: underline;
}

/* Bottom Disclaimer Styles */
.bottom-disclaimer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e8eaed;
}

.bottom-disclaimer p {
    margin: 0;
    font-size: 12px;
    color: #70757a;
}

.bottom-disclaimer a {
    color: #1a73e8;
    text-decoration: none;
}

.bottom-disclaimer a:hover {
    text-decoration: underline;
}

/* AI Chat Continue Button Styles */
.ai-chat-continue-btn {
    background: #1a73e8 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.2) !important;
}

.ai-chat-continue-btn:hover {
    background: #1557b0 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3) !important;
}

.ai-chat-continue-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.2) !important;
}

@media (max-width: 768px) {
    .ai-chat-continue-btn {
        font-size: 13px !important;
        padding: 7px 14px !important;
    }
}