/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 主要内容区域 */
main {
    flex: 1;
}

/* 搜索区域 */
.search-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center; /* 居中对齐 */
    align-items: center;
}

#searchInput {
    width: 30ch; /* 25个字符的宽度 */
    max-width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#searchInput::placeholder {
    font-size: 14px; /* placeholder字体小一点 */
    color: #999;
}

#searchInput:focus {
    outline: none;
    border-color: #3498db;
}

#searchBtn {
    padding: 12px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#searchBtn:hover {
    background: #2980b9;
}

#searchBtn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #3498db;
    background-color: #3498db;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 加载状态 */
.loading-section {
    text-align: center;
    padding: 40px;
}

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

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

/* 结果区域 */
.results-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* 分栏布局 */
.results-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.results-column {
    min-height: 200px;
}

.column-header {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

/* 单栏布局 */
.results-single {
    width: 100%;
}

/* 完整查询词无记录时的提示（tab 栏上方） */
.full-query-no-record {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

/* Tab导航 */
.tab-nav {
    display: flex;
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #7f8c8d;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: #3498db;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 结果列表 */
.result-item {
    padding: 15px 0;
    border-bottom: 1px solid #ecf0f1;
}

.result-item:last-child {
    border-bottom: none;
}

.result-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
}

.result-details {
    color: #7f8c8d;
    font-size: 0.95rem;
    line-height: 1.5;
    padding-left: 1em; /* 缩进2个字符 */
}

/* 复制链接样式 */
.copy-link {
    color: #95a5a6;
    font-size: 0.85rem;
    text-decoration: none;
    margin-left: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.copy-link:hover {
    color: #3498db;
    text-decoration: underline;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 错误信息 */
.error-section {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.error-message {
    color: #e74c3c;
    font-size: 16px;
    text-align: center;
}

/* 反馈区域 */
.feedback-section {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 10px;
}

.feedback-section img {
    display: block;
    margin: 0 auto;
    width: 150px;
}

.feedback-section p {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #ecf0f1;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .results-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tab-nav {
        justify-content: center;
    }
    
    .tab-button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .search-section {
        padding: 15px;
    }
    
    #searchInput {
        font-size: 16px; /* 防止iOS缩放 */
    }
}