/* ================================
   GeoBrand.AI - Light Theme Search Bar
   ================================ */

/* 搜索栏容器 - 高级浅色背景 */
.search-bar-section {
    background: linear-gradient(
        to bottom,
        rgba(248, 249, 251, 0.98) 0%,
        rgba(243, 244, 247, 0.95) 100%
    );
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 80px;
    z-index: 100;
    transition: all 0.3s ease;
}

/* 顶部装饰线 */
.search-bar-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.2) 20%,
        rgba(139, 92, 246, 0.2) 50%,
        rgba(99, 102, 241, 0.2) 80%,
        transparent 100%
    );
}

/* 搜索栏内部容器 */
.search-bar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 24px;
}

/* 搜索表单 */
.google-search-form {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
}

/* 搜索框 - 精致的白色设计 */
.google-search-box {
    width: 100%;
    height: 50px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 25px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.06);
}

.google-search-box:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 
        0 4px 16px rgba(99, 102, 241, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.06);
}

.google-search-box:focus-within {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.08),
        0 8px 24px rgba(99, 102, 241, 0.12);
}

/* 搜索图标 - 灰色 */
.search-icon {
    width: 20px;
    height: 20px;
    margin-right: 14px;
    flex-shrink: 0;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.google-search-box:focus-within .search-icon {
    color: #6366f1;
}

/* 搜索输入框 */
.google-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    font-family: var(--font-sans);
    color: #1f2937;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.google-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* 清除按钮 */
.clear-button {
    width: 24px;
    height: 24px;
    margin: 0 8px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #9ca3af;
}

.clear-button:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #6b7280;
}

.google-search-input:not(:placeholder-shown) ~ .clear-button {
    display: flex;
}

/* 分隔线 */
.search-divider {
    width: 1px;
    height: 28px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0 12px;
}

/* AI 诊断按钮 - 精致的紫色渐变 */
.ai-diagnosis-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    margin-left: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 22px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 
        0 2px 8px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 按钮光效 */
.ai-diagnosis-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s ease;
}

.ai-diagnosis-button:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ai-diagnosis-button:hover::before {
    left: 100%;
}

.ai-diagnosis-button:active {
    transform: translateY(0);
}

/* AI 图标 */
.ai-icon {
    width: 16px;
    height: 16px;
    color: white;
}

/* 快捷提示 - 优雅的样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.suggestion-chip {
    padding: 6px 16px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.suggestion-chip:hover {
    background: #f9fafb;
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.08);
}

/* 滚动效果 */
.search-bar-section.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 入场动画 */
.search-bar-section {
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-bar-section {
        top: 60px;
    }
    
    .search-bar-container {
        padding: 12px 16px;
    }
    
    .google-search-box {
        height: 44px;
        padding: 0 20px;
    }
    
    .google-search-input {
        font-size: 14px;
    }
    
    .ai-diagnosis-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .ai-diagnosis-button span {
        display: none;
    }
    
    .ai-diagnosis-button {
        padding: 8px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .search-suggestions {
        display: none;
    }
}

/* Hero 区域间距调整 */
.hero {
    padding-top: 180px;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 140px;
    }
}

/* 导航栏收缩时的调整 */
@media (min-width: 769px) {
    .navbar.scrolled + .search-bar-section {
        top: 60px;
    }
}