/* =============================================
   Modern Search Box Styles with Search Tabs
   ============================================= */

/* Search Tabs - Tab Switching Interface */
.search-tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    justify-content: center;
}

.search-tab {
    background: none;
    border: none;
    font-size: 15px;
    color: #666;
    cursor: pointer;
    padding: 8px 16px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-tab:hover {
    color: #333;
}

.search-tab.active {
    color: #2f80ed;
    border-bottom-color: #2f80ed;
    font-weight: 600;
}

/* Simple Search Box - for Baidu/Google */
.search-box-simple {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e1e4e8;
    border-radius: 24px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box-simple:focus-within {
    border-color: #2f80ed;
    box-shadow: 0 4px 24px rgba(47, 128, 237, 0.12);
}

.search-box-simple input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
}

.search-box-simple input::placeholder {
    color: #9ca3af;
}

.simple-search-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #2f80ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(47, 128, 237, 0.3);
    flex-shrink: 0;
}

.simple-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(47, 128, 237, 0.4);
}

.simple-search-btn:active {
    transform: scale(0.95);
}

.simple-search-btn i {
    width: 20px;
    height: 20px;
}

/* Search Section - Container */
.search-section {
    padding: 60px 40px 40px;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
}

.search-container {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Modern Search Box - Main Container for AI */
.search-box-modern {
    position: relative;
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e1e4e8;
    border-radius: 24px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100px;
}

.search-box-modern:focus-within {
    border-color: #2f80ed;
    box-shadow: 0 4px 24px rgba(47, 128, 237, 0.12);
}

/* Model Selector - Lower Left */
.model-selector {
    position: relative;
    align-self: flex-end;
    flex-shrink: 0;
    z-index: 10;
}

.model-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.model-selector-btn:hover {
    background: #f0f2f5;
    border-color: #c8ccd0;
}

.model-selector-btn:active {
    transform: scale(0.98);
}

.model-icon {
    font-size: 18px;
    line-height: 1;
}

.model-name {
    font-size: 14px;
}

/* Model Dropdown */
.model-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 8px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.model-group {
    margin-bottom: 8px;
}

.model-group:last-child {
    margin-bottom: 0;
}

.model-group-title {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    padding: 8px 12px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #333;
}

.model-option:hover {
    background: #f0f2f5;
}

.model-option.selected {
    background: #e7f3ff;
    color: #2f80ed;
    font-weight: 500;
}

/* Input Area - Expandable */
.search-input-area {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

#search-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
    resize: none;
    line-height: 1.6;
    padding: 8px 12px;
    font-family: inherit;
    min-height: 60px;
}

#search-input::placeholder {
    color: #9ca3af;
}

/* Function Icons - Right Side */
.search-icons {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.icon-btn:hover {
    background: #f0f2f5;
    color: #333;
}

.icon-btn:active {
    transform: scale(0.95);
}

.icon-btn i {
    width: 20px;
    height: 20px;
}

/* Send Button - Circular with Arrow */
.search-btn {
    width: 44px !important;
    height: 44px !important;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.search-btn:active {
    transform: scale(0.95);
}

.search-btn i {
    width: 20px;
    height: 20px;
}

.search-btn:disabled {
    background: #e1e4e8;
    cursor: not-allowed;
    box-shadow: none;
}

/* AI Prompts - Suggestion Chips */
.ai-prompts {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.prompt-chip {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.prompt-chip:hover {
    border-color: #2f80ed;
    color: #2f80ed;
    background: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(47, 128, 237, 0.1);
}

.prompt-chip:active {
    transform: translateY(0);
}

/* AI Result Container */
.ai-result-container {
    width: 100%;
    margin-top: 24px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: none;
    border: 1px solid #e1e4e8;
}

.ai-result-container.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2f80ed;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 15px;
}

.ai-result-header i {
    width: 20px;
    height: 20px;
}

.ai-result-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    white-space: pre-wrap;
}

/* Loading State */
.ai-result-content.loading::after {
    content: '●';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '●';
    }

    40% {
        content: '●●';
    }

    60% {
        content: '●●●';
    }

    80%,
    100% {
        content: '●';
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-section {
        padding: 40px 20px 20px;
    }

    .search-box-modern,
    .search-box-simple {
        border-radius: 20px;
        padding: 14px 16px;
    }

    .search-box-modern {
        min-height: 90px;
    }

    #search-input {
        font-size: 14px;
        min-height: 50px;
    }

    .model-selector-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .search-icons {
        gap: 4px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
    }

    .search-btn,
    .simple-search-btn {
        width: 40px !important;
        height: 40px !important;
    }

    .ai-prompts {
        margin-top: 16px;
        gap: 8px;
    }

    .prompt-chip {
        padding: 6px 14px;
        font-size: 13px;
    }

    .model-dropdown {
        min-width: 200px;
        max-height: 300px;
    }

    .search-tabs {
        gap: 16px;
    }

    .search-tab {
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: #f8f9fa;
}

.mobile-menu-btn i {
    width: 20px;
    height: 20px;
    color: #333;
}

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }
}

/* Accessibility */
.search-box-modern:focus-within .model-selector-btn,
.search-box-simple:focus-within {
    outline: 2px solid #2f80ed;
    outline-offset: 2px;
}

.icon-btn:focus,
.search-btn:focus,
.simple-search-btn:focus {
    outline: 2px solid #2f80ed;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}