/*
NestDaddy Search Engine - Professional Styles
Clean, Modern, Google-inspired design
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Professional palette */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-link: #1a0dab;
    --text-link-visited: #681da8;
    --border-color: #dfe1e5;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --shadow-sm: 0 1px 6px rgba(32,33,36,.1);
    --shadow-md: 0 1px 6px rgba(32,33,36,.28);
    --shadow-lg: 0 2px 10px rgba(32,33,36,.4);

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HOMEPAGE STYLES
============================================ */

.homepage {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.homepage-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: var(--spacing-lg);
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    animation: fadeInDown 0.6s ease;
}

.logo {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -2px;
}

.logo-nest {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-daddy {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Search Box */
.search-container {
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.search-box {
    position: relative;
    width: 100%;
    margin-bottom: var(--spacing-lg);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 16px;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    outline: none;
    background: var(--bg-primary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.search-input:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(102, 126, 234, 0.3);
}

.search-input:focus {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.error-message {
    color: #d93025;
    font-size: 14px;
    margin-top: var(--spacing-sm);
    text-align: center;
}

/* Location Selector in Footer (Homepage) */
.footer-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: var(--spacing-md) 0;
    padding: 12px 20px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.footer-location:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(102, 126, 234, 0.3);
}

.footer-location svg {
    color: #667eea;
    flex-shrink: 0;
}

.footer-location span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.location-dropdown-footer {
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    padding: 4px 8px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.location-dropdown-footer:hover {
    background: rgba(102, 126, 234, 0.1);
}

.location-dropdown-footer:focus {
    outline: none;
    background: rgba(102, 126, 234, 0.15);
}

/* Buttons */
.search-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-family);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e8eaed;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-2xl);
    max-width: 700px;
    width: 100%;
    animation: fadeIn 0.6s ease 0.4s both;
}

.feature {
    text-align: center;
    padding: var(--spacing-md);
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Stats */
.stats-container {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    animation: fadeIn 0.6s ease 0.6s both;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* ============================================
   RESULTS PAGE STYLES
============================================ */

.results-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: none;
    margin: 0;
    padding: 12px 24px 12px 180px;  /* Left: 180px, Right: 24px */
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: flex-start;
}

.logo-small {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-form-header {
    flex: 1;
    max-width: 600px;
}

.search-box-header {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-header {
    flex: 1;
    padding: 10px 45px 10px 40px;
    font-size: 14px;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    outline: none;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.search-input-header:hover,
.search-input-header:focus {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

.search-button-header {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-button-header:hover {
    background: var(--bg-secondary);
}

.header-links {
    display: flex;
    gap: var(--spacing-md);
}

.header-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.header-links a:hover {
    color: var(--primary-color);
}

/* Results Container */
.results-container {
    max-width: 780px;  /* 20% wider than Google (652px + 20%) */
    margin: 0 0 0 180px;  /* Left margin: 180px, no centering */
    padding: 0 24px;  /* Side padding for content */
    flex: 1;
}

/* Wider container for image grid */
body.results-page .results-container:has(.image-grid) {
    max-width: 1200px;
    margin-left: 180px;  /* Keep left alignment for images */
}

/* Sort Options */
/* Search Tabs - Row 1: Main Tabs (Web, News, Images, Videos) */
.search-tabs-row1 {
    display: flex;
    gap: 8px;
    margin-top: 20px;  /* Space from header/search bar */
    margin-bottom: 8px;  /* Small gap before row 2 */
    flex-wrap: nowrap;  /* Don't wrap, scroll horizontal on mobile */
    overflow-x: auto;  /* Horizontal scroll on mobile */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;  /* Smooth scroll iOS */
    scrollbar-width: none;  /* Hide scrollbar Firefox */
}

.search-tabs-row1::-webkit-scrollbar {
    display: none;  /* Hide scrollbar Chrome/Safari */
}

/* Search Tabs - Row 2: Core Directories (Research, AI, Games, Software) */
.search-tabs-row2 {
    display: flex;
    gap: 8px;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;  /* Allow wrapping if needed */
}

.search-tabs-row1 .tab,
.search-tabs-row2 .tab {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;  /* Keep text in one line */
    flex-shrink: 0;  /* Don't shrink tabs */
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: transparent;
    border-radius: 16px;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.search-tabs-row1 .tab:hover,
.search-tabs-row2 .tab:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.08);
}

.search-tabs-row1 .tab.active,
.search-tabs-row2 .tab.active {
    color: white;
    background: var(--primary-color);
    font-weight: 600;
}

.sort-options {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.sort-option {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sort-option:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sort-option.active {
    background: var(--primary-color);
    color: white;
}

/* Country Filter */
.country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 8px;
}

.country-option {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: white;
    transition: all 0.2s ease;
    font-weight: 500;
}

.country-option:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.country-option.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.results-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Result Items */
.results-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.result-item {
    animation: fadeIn 0.4s ease;
}

.result-url {
    font-size: 12px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.result-domain {
    color: var(--text-secondary);
    font-weight: 500;
}

.result-title {
    font-size: 20px;
    color: var(--text-link);
    text-decoration: none;
    font-weight: 400;
    display: inline-block;
    margin-bottom: 4px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.result-title:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

.result-title:visited {
    color: var(--text-link-visited);
}

.result-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.result-actions {
    display: flex;
    gap: var(--spacing-md);
}

.cached-link {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    margin-right: 12px;
}

.cached-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.report-link {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.report-link:hover {
    color: #d93025;
    text-decoration: underline;
}

/* Cached Page */
.cached-container {
    max-width: 800px;
    margin: var(--spacing-2xl) auto;
    padding: 0 var(--spacing-lg);
}

.cached-error {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.cached-error h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.cached-error p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    word-break: break-all;
}

.cached-info {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-xl);
}

.cached-info h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.cached-meta {
    margin-bottom: var(--spacing-xl);
}

.meta-row {
    display: flex;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 140px;
}

.meta-value {
    color: var(--text-primary);
    word-break: break-word;
}

.cached-notice {
    background: var(--bg-light);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
}

.cached-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Image Grid Layout - Google Images Style */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* 4 columns on desktop = bigger images */
    gap: 16px;
    margin-bottom: var(--spacing-xl);
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

/* Mobile: 2 columns */
@media (max-width: 640px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.image-card {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.image-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.image-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.grid-image {
    width: 100%;
    height: 240px;  /* Bigger for desktop */
    object-fit: cover;
    display: block;
}

/* Mobile: smaller image height */
@media (max-width: 640px) {
    .grid-image {
        height: 160px;
    }

    .image-placeholder {
        height: 160px;
    }
}

.image-placeholder {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.image-icon {
    font-size: 32px;
}

.image-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.image-info {
    padding: 8px;
}

.image-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-domain {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Video List Layout */
.video-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.video-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-primary);
}

.video-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.video-link {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    padding: 16px;
}

.video-thumbnail {
    width: 280px;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-platform-badge {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-platform {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.video-details {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.video-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.video-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg) 0;
}

.page-link,
.page-number {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.page-link:hover,
.page-number:hover {
    background: var(--bg-secondary);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.page-ellipsis {
    padding: 8px;
    color: var(--text-secondary);
}

/* Related Searches */
.related-searches {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.related-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.related-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.related-item {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 14px;
    transition: all 0.2s ease;
}

.related-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
}

.no-results h2 {
    font-size: 24px;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.no-results p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.suggestions {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-radius: 12px;
}

.suggestions strong {
    display: block;
    margin-bottom: var(--spacing-md);
}

.suggestions ul {
    list-style-position: inside;
    color: var(--text-secondary);
}

.suggestions li {
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   FOOTER
============================================ */

.footer {
    background: var(--bg-secondary);
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-simple {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.footer-text .shield {
    font-size: 16px;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   ANIMATIONS
============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

@media (max-width: 768px) {
    .logo {
        font-size: 48px;
    }

    .tagline {
        font-size: 16px;
    }

    /* Footer location - mobile optimization */
    .footer-location {
        flex-direction: column;
        gap: 8px;
        padding: 10px 16px;
        margin: var(--spacing-sm) 0;
    }

    .footer-location span {
        font-size: 12px;
    }

    .location-dropdown-footer {
        font-size: 13px;
        text-align: center;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .search-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: 12px 24px;  /* Reset to normal padding */
    }

    .results-container {
        margin: 0 auto;  /* Center on tablet/mobile */
        padding: 0 24px;
        max-width: 100%;  /* Allow full width */
    }

    .search-form-header {
        width: 100%;
        max-width: none !important;  /* Remove desktop max-width limit */
    }

    .result-title {
        font-size: 18px;
    }

    .results-container {
        padding: var(--spacing-sm);
    }

    /* Ensure no horizontal overflow */
    body {
        overflow-x: hidden;
    }

    .header-content {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);  /* Reduce gap between logo and search */
    }

    .logo-small {
        font-size: 20px;  /* Smaller logo on mobile */
    }

    /* Mobile tabs - smaller, more compact */
    .search-tabs-row1,
    .search-tabs-row2 {
        gap: 6px;
        margin-bottom: 8px;
    }

    .search-tabs-row2 {
        margin-bottom: var(--spacing-md);
    }

    .search-tabs-row1 .tab,
    .search-tabs-row2 .tab {
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 40px;
    }

    /* Reduce padding for mobile phones */
    .header-content {
        padding: 12px 16px;
    }

    .results-container {
        margin: 0 auto;  /* Keep centered on mobile */
        padding: 0 16px;
    }

    /* Footer location - extra compact for small mobile */
    .footer-location {
        padding: 8px 12px;
        gap: 6px;
    }

    .footer-location span {
        font-size: 11px;
    }

    .location-dropdown-footer {
        font-size: 12px;
    }

    .search-input-header {
        font-size: 14px;
        padding: 12px 40px 12px 35px;  /* Bigger touch target */
    }

    .search-box-header {
        min-width: 0;  /* Allow flex shrinking */
        width: 100%;  /* Force full width */
    }

    .search-form-header {
        width: 100% !important;
        max-width: none !important;
        flex: 1;
    }

    .header-content {
        padding: 10px;  /* Minimal padding for max search bar width */
    }

    .logo-small {
        font-size: 18px;  /* Even smaller logo on tiny screens */
    }

    .features {
        grid-template-columns: 1fr;
    }

    /* Extra small screens - even more compact tabs */
    .search-tabs-row1,
    .search-tabs-row2 {
        gap: 5px;
    }

    .search-tabs-row1 .tab,
    .search-tabs-row2 .tab {
        padding: 7px 12px;
        font-size: 11px;
    }

    /* Full width containers on mobile */
    .results-container {
        padding: 10px !important;
    }
}

/* ============================================
   PRINT STYLES
============================================ */

@media print {
    .header,
    .footer,
    .footer-simple,
    .pagination,
    .search-buttons,
    .features {
        display: none;
    }
}

/* ============================================
   IMPROVED RESULT LAYOUT
============================================ */

.result-url-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.result-url-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-path {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
    line-height: 1.3;
    word-break: break-all;
}

.result-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
    padding: 2px 8px;
    background: var(--bg-light);
    border-radius: 4px;
    white-space: nowrap;
}

.result-title {
    font-size: 18px !important;
    line-height: 1.4;
    margin-bottom: 4px;
}

.result-description {
    line-height: 1.5;
    max-width: 600px;
}

/* Number formatting */
.results-info strong {
    font-weight: 600;
}

/* ============================================
   MOBILE RESPONSIVE FIX
============================================ */

@media (max-width: 768px) {
    .result-url-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .result-url-text {
        width: 100%;
    }
    
    .result-path {
        font-size: 11px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    
    .result-title {
        font-size: 16px !important;
    }
    
    .result-description {
        font-size: 14px;
        max-width: 100%;
    }
    
    .result-item {
        padding: 12px 0;
    }
}

@media (max-width: 480px) {
    .result-title {
        font-size: 15px !important;
    }

    .result-description {
        font-size: 13px;
    }

    .result-path {
        font-size: 10px;
    }
}

/* ============================================
   MODERN RESULT ITEMS (Google Typography)
============================================ */

.result-item-modern {
    display: flex;
    gap: 16px;
    padding: 24px 0;  /* Google spacing: more breathing room */
    border-bottom: 1px solid #ebebeb;  /* Google gray */
    animation: fadeIn 0.4s ease;
    transition: all 0.2s ease;
}

.result-item-modern:hover {
    background: #f8f9fa;  /* Lighter Google hover */
    border-radius: 8px;
    padding: 24px 16px;  /* Match top/bottom padding */
    margin: 0 -16px;
}

.result-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;  /* Google uses subtle rounded corners */
    overflow: hidden;
    background: #f1f3f4;  /* Google's neutral gray */
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);  /* Google's easing */
}

.result-item-modern:hover .result-thumbnail img {
    transform: scale(1.05);
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-url-bar-modern {
    display: flex;
    align-items: center;
    gap: 10px;  /* Google spacing */
    margin-bottom: 2px;  /* Tighter spacing to title */
}

.favicon-modern {
    width: 26px !important;  /* Google's favicon size */
    height: 26px !important;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: contain;
    background: white;  /* White background for favicons */
    padding: 2px;
}

.result-url-text-modern {
    display: flex;
    align-items: center;
    gap: 8px;  /* Google spacing between elements */
    font-size: 14px;
    line-height: 20px;
    font-family: Arial, sans-serif;  /* Google's font stack */
}

.result-domain-modern {
    color: #202124;  /* Google's dark gray */
    font-weight: 400;
    letter-spacing: normal;
}

.result-separator {
    color: #70757a;  /* Google's separator gray */
    font-size: 14px;  /* Match surrounding text */
    font-weight: 400;
}

.result-date-modern {
    color: #70757a;  /* Google's metadata gray */
    font-size: 14px;  /* Same as domain for consistency */
    font-weight: 400;
}

.result-title-modern {
    font-size: 20px;  /* Google's exact title size */
    line-height: 26px;  /* Google's exact line height (1.3) */
    color: #1a0dab;  /* Google's blue */
    text-decoration: none;
    display: block;
    margin: 0 0 3px 0;  /* Google's tight spacing */
    font-weight: 400;  /* Regular weight */
    font-family: Arial, sans-serif;  /* Google's font */
    letter-spacing: normal;  /* No letter spacing */
    cursor: pointer;
    transition: color 0.15s ease;
    overflow-wrap: break-word;  /* Handle long words */
}

.result-title-modern:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;  /* Subtle underline */
    text-underline-offset: 2px;
}

.result-title-modern:visited {
    color: #681da8;  /* Google's visited purple */
}

.result-description-modern {
    font-size: 14px;  /* Google's body text size */
    line-height: 22px;  /* Google's exact line height (1.57) */
    color: #4d5156;  /* Google's body text gray */
    font-weight: 400;
    font-family: Arial, sans-serif;
    letter-spacing: normal;
    margin: 0;  /* No margin - let padding control spacing */
    max-width: 600px;  /* Google's max width for readability */
    overflow-wrap: break-word;
}

.result-actions-modern {
    display: flex;
    gap: 20px;  /* Google spacing between actions */
    margin-top: 12px;  /* Space from description */
}

.report-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;  /* Space between icon and text */
    font-size: 12px;  /* Smaller action text */
    font-weight: 400;
    color: #70757a;  /* Google's action gray */
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 16px;  /* Google's pill-shaped buttons */
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);  /* Google's easing */
    font-family: Arial, sans-serif;
}

.report-link-modern:hover {
    background: #f1f3f4;  /* Google's hover gray */
    color: #202124;  /* Darker on hover */
}

.report-link-modern svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Mobile Responsive (Google Standards) */
@media (max-width: 768px) {
    .result-item-modern {
        flex-direction: column;
        gap: 12px;
        padding: 20px 0;  /* Maintain breathing room */
    }

    .result-item-modern:hover {
        padding: 20px 12px;
        margin: 0 -12px;
    }

    .result-thumbnail {
        width: 100%;
        height: 200px;  /* Larger for better visibility */
        border-radius: 12px;
    }

    .result-title-modern {
        font-size: 18px;  /* Slightly smaller on tablet */
        line-height: 24px;
    }

    .result-description-modern {
        font-size: 14px;  /* Keep same as desktop */
        line-height: 20px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .result-item-modern {
        padding: 16px 0;
    }

    .result-item-modern:hover {
        padding: 16px 8px;
        margin: 0 -8px;
    }

    .result-thumbnail {
        height: 160px;
        border-radius: 8px;
    }

    .result-title-modern {
        font-size: 18px;  /* Google mobile title size */
        line-height: 24px;
    }

    .result-description-modern {
        font-size: 14px;  /* Google mobile body size */
        line-height: 20px;
    }

    .favicon-modern {
        width: 20px !important;
        height: 20px !important;
    }

    .result-url-text-modern {
        font-size: 12px;  /* Smaller on mobile */
        line-height: 18px;
    }

    .result-date-modern {
        font-size: 12px;  /* Match url text */
    }

    .result-actions-modern {
        margin-top: 8px;
        gap: 12px;
    }

    .report-link-modern {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ============================================
   AUTOCOMPLETE SUGGESTIONS
============================================ */

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-left-color: var(--primary-color);
}

.autocomplete-item strong {
    font-weight: 600;
    color: var(--primary-color);
}

/* Suggestion Icons */
.suggestion-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.suggestion-text {
    flex: 1;
}

/* Suggestion Type Variants */
.suggestion-popular {
    background: linear-gradient(to right, #fff5f5, #ffffff);
}

.suggestion-phrase {
    background: linear-gradient(to right, #f0f9ff, #ffffff);
}

.suggestion-country {
    background: linear-gradient(to right, #f0f9ff, #ffffff);
}

.suggestion-company {
    background: linear-gradient(to right, #f0fdf4, #ffffff);
}

.suggestion-place {
    background: linear-gradient(to right, #fefce8, #ffffff);
}

.suggestion-category {
    background: linear-gradient(to right, #faf5ff, #ffffff);
}

/* Make search box parent relative for positioning */
.search-box,
.search-box-header {
    position: relative;
}

@media (max-width: 768px) {
    .autocomplete-suggestions {
        max-height: 300px;
    }

    .autocomplete-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ============================================
   INSTANT ANSWERS (Calculator, Weather, Currency, etc.)
   ============================================ */

.instant-answer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.instant-answer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.instant-answer-header svg {
    color: white;
    opacity: 0.9;
}

.instant-answer-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* Calculator Widget */
.calculator-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.calculator-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calculator-expression {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.9;
}

.calculator-answer {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Weather Widget */
.weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.weather-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weather-location h4 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: white;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.weather-temp {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.weather-icon {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.weather-description {
    font-size: 18px;
    font-weight: 500;
    text-transform: capitalize;
    opacity: 0.95;
}

.weather-details {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.weather-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-detail span {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-detail strong {
    font-size: 16px;
    font-weight: 600;
}

/* Currency Widget */
.currency-widget {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.currency-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.currency-from, .currency-to {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.currency-code {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 1px;
}

.currency-amount {
    font-size: 32px;
    font-weight: 700;
}

.currency-arrow {
    font-size: 28px;
    opacity: 0.8;
}

.currency-rate {
    font-size: 14px;
    opacity: 0.85;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Unit Converter Widget */
.unit-widget {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.unit-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.unit-from, .unit-to {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unit-value {
    font-size: 32px;
    font-weight: 700;
}

.unit-name {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: lowercase;
}

.unit-arrow {
    font-size: 28px;
    opacity: 0.8;
}

/* Time Widget */
.time-widget {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.time-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.time-current {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1px;
}

.time-date {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.95;
}

.time-zone {
    font-size: 14px;
    opacity: 0.85;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .instant-answer {
        padding: 20px;
    }

    .calculator-answer {
        font-size: 36px;
    }

    .weather-temp {
        font-size: 42px;
    }

    .weather-icon {
        width: 60px;
        height: 60px;
    }

    .weather-details {
        flex-direction: column;
        gap: 12px;
    }

    .currency-amount, .unit-value {
        font-size: 24px;
    }

    .time-current {
        font-size: 36px;
    }
}

/* ============================================
   KNOWLEDGE CARD (Wikipedia)
   ============================================ */

.knowledge-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.knowledge-card:hover {
    box-shadow: var(--shadow-md);
}

.knowledge-card-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.knowledge-card-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.knowledge-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.knowledge-card-text {
    flex: 1;
}

.knowledge-card-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.knowledge-card-summary {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.knowledge-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.knowledge-card-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.knowledge-card-link svg {
    width: 16px;
    height: 16px;
}

/* Knowledge Card Expandable Section */
.knowledge-card-expanded {
    margin-top: 12px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 1000px;
        transform: translateY(0);
    }
}

.knowledge-card-full-text {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

/* Show More/Less Button */
.knowledge-card-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    color: #007bff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.knowledge-card-expand-btn:hover {
    background: linear-gradient(to bottom, #e9ecef, #dee2e6);
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.knowledge-card-expand-btn:active {
    transform: translateY(0);
}

.knowledge-card-expand-btn svg {
    transition: transform 0.3s ease;
}

/* ============================================
   KNOWLEDGE CARD CAROUSEL (Google Style)
============================================ */

.knowledge-card-carousel {
    flex-shrink: 0;
    width: 320px;
    position: relative;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f3f4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);  /* Google's easing */
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    opacity: 0;
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn svg {
    color: #5f6368;  /* Google's icon gray */
    stroke-width: 2.5;
}

.carousel-btn-prev {
    left: 12px;
}

.carousel-btn-next {
    right: 12px;
}

/* Carousel Indicators (Dots) */
.carousel-indicators {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 12px 0 0 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dadce0;  /* Google's inactive gray */
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.carousel-dot:hover {
    background: #bdc1c6;  /* Slightly darker on hover */
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #1a73e8;  /* Google's blue */
    width: 10px;
    height: 10px;
}

/* Mobile Responsive for Carousel */
@media (max-width: 768px) {
    .knowledge-card-carousel {
        width: 100%;
    }

    .carousel-container {
        height: 220px;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        opacity: 1;  /* Always visible on mobile */
    }

    .carousel-btn-prev {
        left: 8px;
    }

    .carousel-btn-next {
        right: 8px;
    }
}

/* ============================================
   PEOPLE ALSO ASK (Google Style)
============================================ */

.people-also-ask {
    background: white;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.paa-title {
    font-size: 20px;
    font-weight: 400;
    font-family: Arial, sans-serif;
    color: #202124;
    margin: 0 0 16px 0;
}

.paa-questions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.paa-item {
    border-bottom: 1px solid #ebebeb;
}

.paa-item:last-child {
    border-bottom: none;
}

.paa-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 12px;
}

.paa-question:hover {
    background: #f8f9fa;
}

.paa-question[aria-expanded="true"] {
    background: #f8f9fa;
}

.paa-question-text {
    flex: 1;
    text-align: left;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    font-family: Arial, sans-serif;
    color: #202124;
}

.paa-chevron {
    flex-shrink: 0;
    color: #70757a;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.paa-answer {
    padding: 0 12px 16px 12px;
    background: #f8f9fa;
    animation: paaSlideDown 0.2s ease-out;
}

@keyframes paaSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paa-answer-content {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e8eaed;
}

.paa-answer-text {
    font-size: 14px;
    line-height: 22px;
    font-family: Arial, sans-serif;
    color: #4d5156;
    margin: 0 0 12px 0;
}

.paa-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1a0dab;
    text-decoration: none;
    font-family: Arial, sans-serif;
    padding: 6px 0;
    transition: color 0.15s ease;
}

.paa-source:hover {
    color: #1558d6;
    text-decoration: underline;
}

.paa-source-favicon {
    flex-shrink: 0;
    border-radius: 50%;
}

.paa-source-domain {
    font-weight: 400;
}

.paa-source svg {
    flex-shrink: 0;
    color: #70757a;
}

/* Mobile Responsive for PAA */
@media (max-width: 768px) {
    .paa-title {
        font-size: 18px;
    }

    .paa-question {
        padding: 14px 8px;
    }

    .paa-question-text {
        font-size: 15px;
        line-height: 22px;
    }

    .paa-answer {
        padding: 0 8px 14px 8px;
    }

    .paa-answer-content {
        padding: 12px;
    }

    .paa-answer-text {
        font-size: 13px;
        line-height: 20px;
    }

    .paa-source {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .knowledge-card-content {
        flex-direction: column;
    }

    .knowledge-card-image {
        width: 100%;
        height: 180px;
    }

    .knowledge-card-title {
        font-size: 20px;
    }

    .knowledge-card-expand-btn {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* Location Filter */
.location-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.location-filter svg {
    color: #888;
    flex-shrink: 0;
}

.location-select {
    padding: 8px 36px 8px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.location-select:hover {
    border-color: #007bff;
    background: linear-gradient(to bottom, #ffffff, #f5f9ff);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.12);
    transform: translateY(-1px);
}

.location-select:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15), 0 4px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(0);
}

.detected-location {
    font-size: 13px;
    color: #888;
    font-style: italic;
}

@media (max-width: 768px) {
    .location-filter {
        flex-wrap: wrap;
        font-size: 13px;
    }

    .location-select {
        font-size: 13px;
        padding: 5px 28px 5px 10px;
    }
}
