/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    color: #333;
}

/* 顶部区域样式 */
.top-section {
    height: 32vh;
    background-image: url('https://chatbotcos.weixin.qq.com/chatbot/unlimited-openaiassets_1a6b263b14f965683a0ea42bd5a5d128_3795211755864172215.jpeg');
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s ease;
}

.top-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

/* 搜索容器样式 */
.search-container {
    position: absolute;
    width: 60%;
    min-width: 350px;
    max-width: 700px;
    z-index: 10;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.search-box {
    width: 100%;
    padding: 18px 25px 18px 60px;
    border: none;
    border-radius: 35px;
    font-size: 18px;
    outline: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    height: 60px;
    background-color: rgba(255, 255, 255, 0.9);
    background-image: url('https://pp.myapp.com/ma_icon/0/icon_80858_1672391327/256');
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: 25px center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box:focus {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* 清除按钮样式 */
.clear-button {
    position: absolute;
    right: 100px;
    top: 8px;
    background-color: transparent;
    color: #999;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    height: 44px;
    width: 44px;
    transition: all 0.3s ease;
    display: none;
}

.clear-button:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.1);
}

/* 搜索按钮样式 */
.search-button {
    position: absolute;
    right: 8px;
    top: 8px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    height: 44px;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #3367d6;
}

/* 搜索引擎选择器样式 */
.selector-container {
    position: absolute;
    width: 100%;
    top: 70px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 20;
    padding: 10px;
}

.selector-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.selector-item {
    padding: 10px 20px 10px 45px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: 15px center;
    border: none;
    border-radius: 20px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.selector-item:hover {
    background-color: #4285f4;
    color: white;
}

/* 搜索建议样式 */
.suggestion-container {
    position: absolute;
    width: 100%;
    top: 70px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 20;
}

.suggestion-content {
    padding: 10px;
}

.search-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.search-option-btn {
    padding: 10px 20px 10px 45px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: 15px center;
    font-size: 14px;
    white-space: nowrap;
}

.search-option-btn:hover {
    background-color: #4285f4;
    color: white;
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    margin: 2px 0;
}

.suggestion-item:hover, 
.suggestion-item.highlighted,
.search-option-btn.highlighted {
    background-color: #4285f4;
    color: white;
}

.loading-text {
    color: #999;
    font-style: italic;
    padding: 12px 20px;
}

/* 分类按钮样式 */
.category-buttons {
    position: absolute;
    bottom: 82px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 5;
}

.category-button {
    padding:10px 20px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.category-button:hover {
    background-color: #4285f4;
    color: white;
    transform: translateY(-2px);
}

/* 底部内容区域样式 */
.bottom-section {
    flex: 1;
    padding: 30px;
    background-color: #ffffff;
    width: 85%;
    margin: 0 auto;
    max-width: 1600px;
    border-radius: 15px;
    margin-top: -70px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
    margin-bottom:90px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.website-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    display: none;
}

.website-links.active {
    display: grid;
}

.website-links a {
    display: flex;
    align-items: center;
    padding:15px;
    background-color: white;
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    justify-content: flex-start;
}

.website-links a img{
    width: 32px;
    display: flex;
    margin: 0 10px 0 0;
    transition: transform 0.5s ease;
}

.website-links a:hover {
    background-color: #4285f4;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.3);
}

.website-links a:hover img{
    transform: scale(1.2);
}

/* 设置面板样式 */
.settings-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    width: 800px;
    max-width: 90%;
    height: 600px;
    max-height: 85vh;
    background-color: white;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 30px;
    overflow-y: auto;
    border-radius: 12px;
}

.settings-container.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.settings-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.close-settings {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-settings:hover {
    color: #333;
}

/* 设置选项卡样式 */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.settings-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    position: relative;
    transition: all 0.3s ease;
}

.settings-tab.active {
    color: #4285f4;
}

.settings-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4285f4;
}

.settings-tab-content {
    display: none;
    padding: 10px 0;
    height: calc(100% - 100px);
    overflow-y: auto;
}

.settings-tab-content.active {
    display: block;
}

/* 主页设置样式 */
.setting-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.setting-group h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.setting-group h5 {
    font-size: 14px;
    margin: 15px 0 10px;
    color: #555;
}

.bg-preview-container {
    margin-bottom: 20px;
}

.bg-preview {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}

.bg-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.bg-preset {
    width: calc(33.333% - 7px);
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.bg-preset:hover {
    transform: scale(1.03);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.bg-preset.selected {
    border-color: #4285f4;
}

.bg-upload, .bg-url {
    margin-bottom: 20px;
}

.bg-upload input[type="file"] {
    display: none;
}

#uploadBtn, #applyUrlBtn {
    padding: 8px 15px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: background-color 0.2s;
}

#uploadBtn:hover, #applyUrlBtn:hover {
    background-color: #3367d6;
}

.height-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.height-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.height-options input[type="radio"] {
    margin-right: 8px;
}

.custom-height-slider {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

#heightSlider {
    flex: 1;
    margin-right: 10px;
}

#heightValue {
    width: 40px;
    text-align: center;
}

.setting-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

#saveSettingsBtn, #resetSettingsBtn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

#saveSettingsBtn {
    background-color: #4285f4;
    color: white;
}

#saveSettingsBtn:hover {
    background-color: #3367d6;
}

#resetSettingsBtn {
    background-color: #f1f1f1;
    color: #333;
}

#resetSettingsBtn:hover {
    background-color: #e0e0e0;
}

/* 页脚样式 */
.footer-section {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0 0 10px 0;
    z-index: 10;
}

.footer-content {
    text-align: center;
    font-size: 13px;
    color: #666;
}

.footer-content p {
    margin: 5px 0;
}

.footer-content p a {
    text-decoration: none;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        width: 85%;
        min-width: 280px;
    }
    
    .search-box {
        padding-left: 50px;
        background-position: 15px center;
        font-size: 16px;
    }
    
    .selector-item, .search-option-btn {
        padding-left: 40px;
        background-position: 10px center;
        font-size: 12px;
    }
    
    .category-buttons {
        gap: 10px;
        padding: 0 10px;
        flex-wrap: wrap;
    }
    
    .category-button {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .website-links {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .bottom-section {
        width: 90%;
        padding: 20px;
    }
    
    .clear-button {
        right: 80px;
    }
    
    .settings-container {
        height: auto;
        max-height: 90vh;
        padding: 20px;
    }
    
    .bg-preset {
        width: calc(50% - 5px);
    }
}