/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding-bottom: 40px;
}

/* 头部样式 */
.header {
    background: white;
    padding: 20px 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.issearch {
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header h2 {
    margin-bottom: 20px;
    text-align: center;
}

.header h2 a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #42505c;
    font-size: 1.8rem;
    font-weight: 600;
}

.header h2 a:hover {
    color: #06a17e;
}

.header h2 .icon {
    transition: transform 0.3s ease;
}

.header h2 a:hover .icon {
    transform: rotate(360deg);
}

/* 搜索框样式 */
#sousuo {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

#sousuo:focus-within {
    border-color: #06a17e;
    box-shadow: 0 0 0 3px rgba(6, 161, 126, 0.1);
}

#ssInput {
    flex: 1;
    padding: 14px 18px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    outline: none;
}

#ssInput::placeholder {
    color: #8a94a6;
}

#ssInput.issearch {
    font-weight: 500;
}

#ssBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background: #06a17e;
    cursor: pointer;
    transition: all 0.3s ease;
}

#ssBtn:hover {
    background: #058a6b;
}

#ssBtn svg {
    transition: transform 0.3s ease;
}

#ssBtn:hover svg {
    transform: scale(1.1);
}

/* 清空按钮 */
.deleteAll {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 600px;
    margin: 20px auto;
    padding: 10px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    color: #66758a;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.deleteAll:hover {
    background: #f8f9fa;
    color: #06a17e;
    border-color: #06a17e;
}

.deleteAll svg {
    transition: transform 0.3s ease;
}

.deleteAll:hover svg {
    transform: translateY(-1px);
}

/* 搜索结果区域 */
#content {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
}

.result-count {
    text-align: center;
    color: #66758a;
    margin: 20px 0;
    font-size: 14px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 项目盒子 */
.iterm-box {
    background: white;
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.iterm-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    border-color: #06a17e;
}

.iterm-box a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.iterm-content {
    padding: 18px;
}

.iterm-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #2d3748;
    line-height: 1.5;
}

.iterm-title .highlight {
    background: #e6f7f3;
    color: #06a17e;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
}

.iterm-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #8a94a6;
}

.iterm-info .date {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.iterm-info .website {
    background: #e6f7f3;
    color: #06a17e;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* 加载动画 */
.loading-box {
    text-align: center;
    padding: 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #06a17e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 返回顶部按钮 */
.toTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #06a17e;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(6, 161, 126, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toTop:hover {
    background: #058a6b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(6, 161, 126, 0.4);
}

.toTop:active {
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 15px;
    }
    
    .header h2 a {
        font-size: 1.5rem;
    }
    
    #sousuo {
        border-radius: 10px;
    }
    
    #ssInput {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    #ssBtn {
        padding: 0 15px;
    }
    
    .iterm-content {
        padding: 15px;
    }
    
    .iterm-title {
        font-size: 15px;
    }
    
    .toTop {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .header h2 a {
        font-size: 1.3rem;
    }
    
    .header h2 .icon {
        width: 20px;
        height: 20px;
    }
    
    .iterm-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .deleteAll {
        margin: 15px;
        padding: 8px 15px;
    }
}