/**
 * SMART SEARCH - Modern UI & Responsive Styling
 * Designed for Desktop & Mobile with Bottom Navigation Bar
 * Created by: createdby@armadayogie (https://www.tiktok.com/@armadayogi)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-subtle: #eff6ff;
    --accent-color: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    --surface-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);
    --mobile-nav-height: 68px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--surface-bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 0;
}

/* Ensure no text or component overflows container */
* {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Glassmorphism Effects */
.glass-panel {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-md);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Top Navbar Styling */
.navbar-brand-badge {
    background: var(--accent-gradient);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.3);
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: var(--primary-subtle);
}

/* ============================================================
   GOOGLE STYLE SEARCH ENGINE AESTHETICS
   ============================================================ */
.google-container {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.google-container.has-results {
    min-height: auto;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Google-style Multi-colored Logo */
.google-logo {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 3.75rem;
    letter-spacing: -1.5px;
    margin-bottom: 0.2rem;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.google-logo .g-blue   { color: #4285F4; }
.google-logo .g-red    { color: #EA4335; }
.google-logo .g-yellow { color: #FBBC05; }
.google-logo .g-green  { color: #34A853; }

.google-sub-badge {
    color: #5f6368;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}

/* Google-style Pill Search Bar */
.google-search-bar {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border: 1px solid #dfe1e5;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.14);
    border-radius: 28px;
    display: flex;
    align-items: center;
    padding: 0.65rem 1.25rem;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    margin: 0 auto;
}

.google-search-bar:hover, .google-search-bar:focus-within {
    box-shadow: 0 2px 14px rgba(32, 33, 36, 0.22);
    border-color: rgba(223, 225, 229, 0);
}

.google-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1.05rem;
    color: #202124;
    background: transparent;
    padding: 0 0.5rem;
    font-weight: 400;
}

.google-search-input::placeholder {
    color: #80868b;
    font-weight: 400;
}

.google-btn {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 6px;
    color: #3c4043;
    font-size: 0.875rem;
    padding: 0.55rem 1.25rem;
    margin: 0.65rem 0.35rem 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease;
}

.google-btn:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    background-color: #f1f3f4;
    border-color: #dadce0;
    color: #202124;
}

/* Google Search Results Layout */
.google-results-container {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    padding-top: 1rem;
    text-align: left;
}

.google-result-stats {
    color: #70757a;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 0.65rem;
}

.google-result-item {
    margin-bottom: 1.75rem;
}

.google-result-url {
    font-size: 0.825rem;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.google-result-url-domain {
    font-weight: 500;
    color: #202124;
}

.google-result-url-path {
    color: #4d5156;
}

.google-result-title {
    color: #1a0dab;
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
}

.google-result-title:hover {
    text-decoration: underline;
    color: #1a0dab;
}

.google-result-snippet {
    color: #4d5156;
    font-size: 0.925rem;
    line-height: 1.55;
    margin-bottom: 6px;
}

.google-result-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* Category Quick Filter Chips */
.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    border-radius: 50rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    white-space: nowrap;
}

.category-chip:hover, .category-chip.active {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #ffffff;
}

/* Card Enhancements */
.card-smart {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-smart:hover {
    box-shadow: var(--shadow-md);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Search Result Item Card */
.search-result-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent-color);
}

/* Tables & Badges */
.table-smart thead th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.825rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--border-color);
    padding: 0.85rem 0.75rem;
    white-space: nowrap;
}

.table-smart tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.badge-soft-primary { background-color: #dbeafe; color: #1e40af; }
.badge-soft-success { background-color: #dcfce7; color: #166534; }
.badge-soft-warning { background-color: #fef3c7; color: #92400e; }
.badge-soft-danger  { background-color: #fee2e2; color: #991b1b; }
.badge-soft-info    { background-color: #e0f2fe; color: #075985; }
.badge-soft-secondary { background-color: #f1f5f9; color: #475569; }

/* Custom Buttons */
.btn-primary-smart {
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.25);
    transition: all 0.25s ease;
}

.btn-primary-smart:hover {
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.35);
    transform: translateY(-1px);
    color: white;
}

/* Dropzone & Import Styling */
.dropzone-box {
    border: 2px dashed #93c5fd;
    background-color: #f8fafc;
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone-box:hover, .dropzone-box.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-subtle);
}

/* Footer Styling */
.smart-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.smart-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.smart-footer a:hover {
    color: #06b6d4;
    text-decoration: underline;
}

/* ============================================================
   MOBILE RESPONSIVENESS & BOTTOM NAVIGATION BAR (CRITICAL)
   ============================================================ */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    /* Extra padding at bottom so content is never hidden by mobile bar */
    body {
        padding-bottom: calc(var(--mobile-nav-height) + 16px);
    }

    .smart-footer {
        margin-bottom: calc(var(--mobile-nav-height) + 8px);
        text-align: center;
    }

    .hero-search-wrapper {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .hero-search-wrapper h1 {
        font-size: 1.6rem;
    }

    /* Fixed Bottom Nav Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-nav-height);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(226, 232, 240, 0.9);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        z-index: 1040;
        align-items: center;
        justify-content: space-around;
        padding: 0 4px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: #64748b;
        text-decoration: none;
        font-size: 0.725rem;
        font-weight: 600;
        transition: all 0.2s ease;
        position: relative;
        padding-top: 2px;
    }

    .mobile-nav-item i {
        font-size: 1.3rem;
        margin-bottom: 2px;
        transition: transform 0.2s ease;
    }

    .mobile-nav-item.active {
        color: var(--primary-color);
    }

    .mobile-nav-item.active i {
        transform: translateY(-2px);
    }

    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 4px;
        width: 16px;
        height: 3px;
        background: var(--primary-color);
        border-radius: 4px;
    }

    /* Hide standard top nav links on mobile to keep header uncluttered */
    .desktop-nav-items {
        display: none !important;
    }

    /* Table adjustments on mobile */
    .table-responsive {
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-color);
    }
}

/* Animations */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.2s ease;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}
