/* style.css - 全局样式 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: #f2f4f7;
    padding: 25px;
    max-width: 450px;
    margin: 0 auto;
    padding-bottom: 50px;
    min-height: 100vh;
}

/* 导航栏样式 */
.nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: -25px -25px 25px;
    padding: 0 25px;
}

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

.nav-logo {
    font-size: 18px;
    font-weight: bold;
    color: #007aff;
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #374151;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #6b7280;
    font-size: 15px;
    padding: 5px 0;
    position: relative;
}

.nav-link.active {
    color: #007aff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #007aff;
}

/* 标题样式 */
.page-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    color: #111827;
}

.page-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 25px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
}

/* 输入框样式 */
.input-group {
    margin-bottom: 18px;
}

.input-label {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.input-field:focus {
    border-color: #007aff;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #0056cc;
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}

/* 结果框样式 */
.result-box {
    background: #e8f0fe;
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    margin-bottom: 20px;
}

.result-title {
    font-size: 16px;
    color: #374151;
    margin-bottom: 8px;
}

.result-value {
    font-size: 28px;
    font-weight: bold;
    color: #007aff;
}

.result-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin: 0 -22px;
    padding: 0 22px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    min-width: 400px;
}

.data-table th {
    background: #007aff;
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    font-size: 14px;
}

.data-table tr:nth-child(even) {
    background: #f9fafb;
}

.data-table tr:hover {
    background: #f0f7ff;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.tag-china {
    background: #d1fae5;
    color: #065f46;
}

.tag-usa {
    background: #dbeafe;
    color: #1e40af;
}

/* 备注框 */
.note-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.info-box {
    background: #e8f0fe;
    border-left: 4px solid #007aff;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 500px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 15px 25px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    body {
        padding: 20px;
        padding-bottom: 40px;
    }
}

/* 转换器特定样式 */
.converter-group {
    margin-bottom: 25px;
}

.converter-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #374151;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.converter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.converter-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.converter-input:focus {
    border-color: #007aff;
}

.converter-select {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    min-width: 120px;
    outline: none;
}

.converter-result {
    margin-top: 10px;
    padding: 15px;
    background: #e8f0fe;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #007aff;
    text-align: center;
}

.converter-note {
    font-size: 14px;
    color: #6b7280;
    margin-top: 5px;
    font-style: italic;
}

/* 搜索框 */
.search-box {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #007aff;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.filter-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.filter-btn.active {
    background: #007aff;
    color: white;
    border-color: #007aff;
}

/* 关于页面特定样式 */
.feature-list {
    list-style-type: none;
    padding-left: 0;
}

.feature-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
}

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

.feature-list i {
    color: #007aff;
    margin-right: 10px;
    font-size: 18px;
}

.contact-info {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.contact-btn {
    flex: 1;
    padding: 12px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.contact-btn:hover {
    background: #0056cc;
}

.version-info {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}
