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

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

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.brand-link {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.brand-link:hover {
    color: #1d4ed8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #2563eb;
    background-color: #f1f5f9;
}

.nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    min-width: 120px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    list-style: none;
    padding: 4px;
    margin: 0;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: #334155;
}

.dropdown-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

/* 主要内容 */
.main-content {
    min-height: calc(100vh - 128px);
    padding: 40px 0;
}

/* 页面标题 */
.page-title {
    font-size: 48px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 16px;
}

.page-subtitle {
    font-size: 18px;
    color: #64748b;
    text-align: center;
    margin-bottom: 48px;
}

/* 查询区域 */
.lookup-section {
    max-width: 800px;
    margin: 0 auto;
}

.search-container {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 32px;
}

.search-form {
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-button {
    padding: 16px 32px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.search-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
}

.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 8px 16px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

/* 结果区域 */
.results-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    overflow: hidden;
}

.result-section {
    padding: 32px;
}

.result-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.result-value {
    font-size: 16px;
    color: #1e293b;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    word-break: break-all;
    white-space: pre-line; /* 支持多行文本显示 */
    line-height: 1.4; /* 改善多行文本的可读性 */
}

/* 错误信息 */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #dc2626;
    margin: 20px;
}

/* 加载状态 */
.loading-spinner {
    color: #6b7280;
}

/* API页面样式 */
.api-section {
    max-width: 900px;
    margin: 0 auto;
}

.api-card {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.api-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.method {
    background: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.api-endpoint code {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    color: #1e293b;
}

.api-params {
    margin-bottom: 24px;
}

.param-item {
    display: grid;
    grid-template-columns: 150px 100px 1fr;
    gap: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.param-name {
    font-weight: 600;
    color: #1e293b;
}

.param-type {
    background: #e0e7ff;
    color: #3730a3;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.param-desc {
    color: #64748b;
}

.code-block {
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.code-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    background: #1e293b;
    color: #f1f5f9;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', Monaco, monospace;
    font-size: 14px;
    line-height: 1.5;
}

.api-test {
    margin-top: 24px;
}

.test-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 12px;
    outline: none;
}

.test-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.test-button {
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-button:hover {
    background: #1d4ed8;
}

.test-result {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.test-result .error {
    color: #dc2626;
}

.test-result .loading {
    color: #64748b;
}

.result-json {
    background: #1e293b;
    color: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.usage-limits {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.usage-limits ul {
    margin: 0;
    padding-left: 20px;
}

.usage-limits li {
    margin-bottom: 8px;
}

/* 关于页面样式 */
.about-section {
    max-width: 900px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-card {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.about-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.about-card p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    color: #475569;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.feature-list li:last-child {
    border-bottom: none;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.tech-item {
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.tech-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 8px;
}

.tech-item p {
    color: #64748b;
    margin: 0;
}

.about-card ul {
    color: #475569;
    line-height: 1.7;
}

.about-card a {
    color: #2563eb;
    text-decoration: none;
}

.about-card a:hover {
    text-decoration: underline;
}

.contact-info {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.contact-info p {
    margin-bottom: 8px;
}

.changelog {
    margin-top: 16px;
}

.version {
    margin-bottom: 16px;
}

.version strong {
    color: #1e293b;
}

.version ul {
    margin-top: 8px;
    padding-left: 20px;
}

/* 页脚 */
footer {
    background: #1e293b;
    color: #f1f5f9;
    padding: 32px 0;
    margin-top: 48px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 20px;
        gap: 16px;
    }
    
    .nav-menu {
        gap: 16px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .search-container {
        padding: 24px 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .param-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .search-container,
    .api-card,
    .about-card {
        padding: 20px 16px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
}