/* ===== 新增：联网搜索开关样式（追加到 style.css 末尾）===== */
.web-search-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.08);
    cursor: help;
    transition: all 0.3s;
}

.web-search-toggle:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateX(2px);
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.toggle-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    white-space: nowrap;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: bold;
    cursor: help;
    flex-shrink: 0;
}

.web-search-note {
    margin-top: 20px;
    padding: 14px;
    background: rgba(255, 193, 7, 0.15);
    border-left: 3px solid #ffc107;
    border-radius: 0 10px 10px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
    color: #5d4037;
}

.web-search-note .highlight {
    color: var(--error);
    font-weight: 600;
}

.web-search-note a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.system-message {
    background: rgba(255, 193, 7, 0.12) !important;
    border-left: 3px solid #ffc107 !important;
    color: #5d4037 !important;
    font-size: 0.95rem !important;
    padding: 14px 20px !important;
    border-radius: 16px !important;
    max-width: 90% !important;
    margin: 10px auto !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* 深色模式适配 */
[data-theme="dark"] .web-search-note {
    background: rgba(255, 193, 7, 0.1);
    color: #ffe082;
    border-color: #ffb300;
}

[data-theme="dark"] .web-search-note a {
    color: #81d4fa;
}

[data-theme="dark"] .system-message {
    background: rgba(255, 193, 7, 0.1) !important;
    color: #ffe082 !important;
    border-color: #ffb300 !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .web-search-toggle {
        width: 100%;
        justify-content: center;
        padding: 10px;
        background: rgba(102, 126, 234, 0.1);
    }
    
    .controls {
        flex-wrap: wrap;
    }
    
    .model-selector, .web-search-toggle, .theme-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .web-search-note {
        font-size: 0.9rem;
        padding: 12px;
    }
}