/* 搜索小工具样式 */

/* 通用样式 */
.zibll-search-widget {
    width: 100%;
    margin: 15px 0;
    transition: all 0.3s;
}

/* 样式一（简洁版） */
.zibll-search-style1 .zibll-search-banner {
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
}

.zibll-search-style1 .zibll-search-container {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: inherit;
}

.zibll-search-style1 input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dfe1e5;
    border-radius: 4px;
    font-size: 14px;
    background: inherit;
    color: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.zibll-search-style1 input[type="text"]:focus {
    border-color: #0066FF;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

.zibll-search-style1 button {
    padding: 8px 16px;
    background: #0066FF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.zibll-search-style1 button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 样式二（经典版） */
.zibll-search-style2 {
    background-color: white;
    padding: 15px;
    overflow: hidden;
    transition: all 0.3s;
    border-radius: 4px;
    position: relative;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.zibll-search-style2 .zibll-search-title {
    position: relative;
    top: -15px;
    display: inline-block;
    color: #fff;
    padding: 4px 15px;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
    margin-bottom: -5px;
}

.zibll-search-style2 .zibll-search-title strong {
    font-weight: 600;
}

.zibll-search-style2 form {
    position: relative;
    margin-top: 10px;
}

.zibll-search-style2 input[type="text"] {
    border: 1px solid #45B6F7;
    border-radius: 4px;
    width: calc(100% - 2px);
    padding: 8px 30px 8px 12px;
    outline: none;
    font-size: 16px;
    box-sizing: border-box;
    resize: none;
    background: white;
    color: #333;
}

.zibll-search-style2 input[type="submit"] {
    position: absolute;
    right: 2px;
    top: 2px;
    background-color: #45B6F7;
    color: #fff;
    font-size: 13px;
    margin: 1px;
    height: 31px;
    line-height: 31px;
    padding: 0 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.zibll-search-style2 input[type="submit"]:hover {
    background-color: #3596d7;
    transform: translateY(-1px);
}

/* 样式三（现代版） */
.zibll-search-style3 {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.zibll-search-style3:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

.zibll-search-style3 .zibll-search-banner {
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.zibll-search-style3 .zibll-search-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: zibll_shimmer 4s ease-in-out infinite;
}

@keyframes zibll_shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

.zibll-search-style3 .zibll-search-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    position: relative;
}

.zibll-search-style3 input[type="text"] {
    flex: 0.7;
    padding: 10px 16px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.zibll-search-style3 input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 1);
    box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.1),
                0 0 0 2px rgba(116, 185, 255, 0.3);
}

.zibll-search-style3 .zibll-search-button {
    flex: 0.3;
    padding: 0 10px;
    height: 40px;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(116, 185, 255, 0.3);
    transition: all 0.3s ease;
}

.zibll-search-style3 .zibll-search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(116, 185, 255, 0.4);
}

/* 暗色模式适配 */
body.dark-mode .zibll-search-style1 .zibll-search-container {
    border-color: #5f6368;
    background: #202124;
}

body.dark-mode .zibll-search-style1 input[type="text"] {
    background: #303134;
    border-color: #5f6368;
    color: #e8eaed;
}

body.dark-mode .zibll-search-style1 button {
    background: #8ab4f8;
    color: #202124;
}

body.dark-mode .zibll-search-style1 button:hover {
    background: #aecbfa;
}

body.dark-mode .zibll-search-style2 {
    background: #2d3436;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.dark-mode .zibll-search-style2 input[type="text"] {
    background: #404040;
    color: #f5f6fa;
    border-color: #0984e3;
}

body.dark-mode .zibll-search-style2 input[type="submit"] {
    background-color: #0984e3;
}

body.dark-mode .zibll-search-style2 input[type="submit"]:hover {
    background-color: #0a73c4;
}

body.dark-mode .zibll-search-style3 {
    background: linear-gradient(145deg, #2d3436, #1e272e);
}

body.dark-mode .zibll-search-style3 input[type="text"] {
    background: rgba(0, 0, 0, 0.2);
    color: #f5f6fa;
}

body.dark-mode .zibll-search-style3 .zibll-search-button {
    background: linear-gradient(45deg, #0984e3, #74b9ff);
    box-shadow: 0 4px 10px rgba(9, 132, 227, 0.3);
}

body.dark-mode .zibll-search-style3 .zibll-search-button:hover {
    box-shadow: 0 5px 14px rgba(9, 132, 227, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .zibll-search-style1 .zibll-search-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .zibll-search-style1 button {
        width: 100%;
    }
    
    .zibll-search-style3 .zibll-search-container {
        flex-direction: column;
    }
    
    .zibll-search-style3 input[type="text"],
    .zibll-search-style3 .zibll-search-button {
        flex: 1;
        width: 100%;
    }
}

/* 焦点状态 */
.zibll-search-widget *:focus {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
}

/* 加载状态 */
.zibll-search-loading {
    position: relative;
    pointer-events: none;
}

.zibll-search-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0066FF;
    border-radius: 50%;
    animation: zibll_spin 1s linear infinite;
}

@keyframes zibll_spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}