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

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* 语言切换器 */
.language-switcher {
    position: relative;
}

.lang-dropdown {
    background: rgba(255,255,255,0.95);
    border: 2px solid rgba(255,255,255,0.8);
    color: #2c3e50;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 120px;
    outline: none;
}

.lang-dropdown:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-color: white;
}

.lang-dropdown:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.lang-dropdown option {
    background: white;
    color: #2c3e50;
    padding: 0.5rem;
    font-weight: normal;
}

.lang-dropdown option:hover {
    background: #f8f9fa;
}

/* 主要内容 */
.main-content {
    padding: 2rem 0;
}

.hero-section {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

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

.search-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.search-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.country-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.country-selector label {
    font-weight: 500;
    color: #555;
}

.country-select {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1rem;
    min-width: 200px;
    background: white;
    transition: border-color 0.3s;
}

.country-select:focus {
    outline: none;
    border-color: #667eea;
}

.arrow {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: bold;
    margin-top: 1.5rem;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 1.5rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 热门路线 */
.popular-routes {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.popular-routes h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

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

.route-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.route-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.route-card p {
    opacity: 0.9;
}

/* 国家列表 */
.country-list {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.country-list h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.country-link {
    background: #f8f9fa;
    color: #495057;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
    font-weight: 500;
}

.country-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* 尾部 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #ecf0f1;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }
    
    .country-select {
        min-width: auto;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .search-section,
    .popular-routes,
    .country-list {
        padding: 1.5rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 关税表格样式 */
.tariff-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tariff-table th,
.tariff-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.tariff-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.tariff-table tr:hover {
    background: #f8f9fa;
}

.tariff-rate {
    font-weight: 600;
    color: #e74c3c;
}

/* 关税页面样式 */
.tariff-header {
    text-align: center;
    padding: 2rem 0;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tariff-header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.tariff-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

.tariff-summary {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border-radius: 10px;
}

.summary-card h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    opacity: 0.9;
}

.rate-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tariff-details {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tariff-details h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* 国家页面样式 */
.country-header {
    text-align: center;
    padding: 2rem 0;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.country-header h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.country-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.country-overview {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.overview-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 10px;
}

.overview-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.trade-partners {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.trade-partners h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.partner-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.partner-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.partner-card p {
    opacity: 0.9;
}

.tariff-categories {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tariff-categories h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* 相关链接样式 */
.related-links {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.related-links h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.link-card {
    background: #f8f9fa;
    color: #495057;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
    font-weight: 500;
}

.link-card:hover {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
    transform: translateY(-2px);
}

/* 面包屑导航 */
.breadcrumb {
    background: white;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-list li a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-list li a:hover {
    text-decoration: underline;
}

.breadcrumb-list li:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
    color: #6c757d;
}

/* ---- chip link lists (Related Trade Routes / Related Countries) ---- */
.chip-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    row-gap: 12px;
    margin: 0 0 1.6rem;
}
.chip-links a {
    display: inline-block;
    padding: 9px 18px;
    background: #f0f7f2;
    border: 1px solid #d6e8dc;
    border-radius: 20px;
    color: #15803d;
    font-size: 14px;
    line-height: 1.6;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip-links a:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}
.chip-links span {
    display: inline-block;
    padding: 9px 18px;
    color: #95a5a6;
    font-size: 14px;
    line-height: 1.6;
}

/* === 2026-10-12 tariff content normalization === */
.hub-faq, .country-extra, .country-az-index {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 1.6rem 1.8rem;
    margin: 2.5rem 0;
}
.country-az-index h2, .hub-faq h2 {
    font-size: 1.4rem;
    color: #15803d;
    margin: 0 0 1.2rem;
    padding-bottom: .7rem;
    border-bottom: 2px solid #e6f2ea;
}
.country-extra h2 {
    font-size: 1.25rem;
    color: #15803d;
    margin: 1.6rem 0 .8rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #e6f2ea;
}
.country-extra h2:first-of-type { margin-top: .2rem; }
.country-extra > p:first-of-type { margin-top: 0; }

/* FAQ accordion */
.hub-faq details, .country-extra details {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafcfb;
    margin: .55rem 0;
    overflow: hidden;
    transition: border-color .2s, background .2s;
}
.hub-faq details[open], .country-extra details[open] {
    background: #fff;
    border-color: #bfe3cd;
}
.hub-faq summary, .country-extra summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    padding: .8rem 1rem .8rem 2.3rem;
    position: relative;
    list-style: none;
    user-select: none;
}
.hub-faq summary::-webkit-details-marker,
.country-extra summary::-webkit-details-marker { display: none; }
.hub-faq summary::before, .country-extra summary::before {
    content: "\25B8";
    position: absolute;
    left: 1rem;
    top: .82rem;
    color: #15803d;
    font-size: .95rem;
    line-height: 1;
    transition: transform .2s;
}
.hub-faq details[open] summary::before,
.country-extra details[open] summary::before { transform: rotate(90deg); }
.hub-faq details p, .country-extra details p {
    margin: 0;
    padding: 0 1rem 1rem 2.3rem;
    color: #4b5563;
    line-height: 1.8;
    font-size: .95rem;
}

/* country-extra overview paragraph + link pills */
.country-extra > p {
    color: #333;
    line-height: 1.8;
    margin: 0 0 1rem;
}
.country-extra ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin: .5rem 0 1.6rem;
    padding: 0;
}
.country-extra ul li { margin: 0; line-height: 1.6; }
.country-extra ul li a {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f7f2;
    border: 1px solid #d6e8dc;
    border-radius: 20px;
    color: #15803d;
    font-size: 14px;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.country-extra ul li a:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

/* A-Z index */
.az-group { margin-bottom: 1.1rem; }
.az-group:last-child { margin-bottom: 0; }
.az-group h3 {
    display: inline-block;
    width: 2rem;
    font-size: 1.1rem;
    color: #15803d;
    vertical-align: top;
    margin: 0;
}
.az-links {
    display: inline-block;
    max-width: calc(100% - 2.5rem);
    vertical-align: top;
}
.az-links a {
    display: inline-block;
    margin: 0 .4rem .5rem 0;
    padding: .25rem .6rem;
    background: #f1f5f9;
    border-radius: 4px;
    color: #1e293b;
    text-decoration: none;
    font-size: .9rem;
    transition: background .2s, color .2s;
}
.az-links a:hover { background: #15803d; color: #fff; }

@media (max-width: 640px) {
    .hub-faq, .country-extra, .country-az-index { padding: 1.2rem 1rem; }
    .hub-faq summary, .country-extra summary { padding-left: 2rem; }
    .hub-faq summary::before, .country-extra summary::before { left: .8rem; }
    .az-group h3 { display: block; width: auto; margin-bottom: .4rem; }
    .az-links { display: block; max-width: none; }
}

/* === HS chapter database styles (multilang) === */
.hs-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1.2rem; margin:1.5rem 0; }
.hs-card { display:block; padding:1rem 1.1rem; background:rgba(255,255,255,0.95); border:1px solid #e3e9f2; border-left:4px solid #15803d; border-radius:10px; text-decoration:none; color:#2c3e50; transition:transform .2s, box-shadow .2s; }
.hs-card:hover { transform:translateY(-3px); box-shadow:0 6px 18px rgba(21,128,61,0.15); }
.hs-card .hs-num { display:block; font-weight:700; color:#15803d; font-size:.9rem; margin-bottom:.2rem; }
.hs-ex { list-style:none; padding:0; margin:1rem 0; display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:.6rem; }
.hs-ex li { background:#f6faf7; border:1px solid #e3eef0; border-radius:8px; padding:.55rem .8rem; font-size:.92rem; }
.hs-ex .hs-code { display:inline-block; min-width:3.2rem; font-weight:700; color:#15803d; margin-right:.5rem; }
.hs-index-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:1rem; margin:2rem 0; }

/* === Duty rate table (multilang) === */
.duty-sec { margin:2rem 0; padding:1.5rem; background:#fff; border:1px solid #e3e9f2; border-radius:10px; }
.duty-sec h2 { color:#15803d; font-size:1.25rem; margin:0 0 .5rem; }
.duty-note { font-size:.85rem; color:#64748b; margin:0 0 1rem; }
.duty-tbl { width:100%; border-collapse:collapse; font-size:.92rem; }
.duty-tbl th, .duty-tbl td { padding:.55rem .8rem; border-bottom:1px solid #eef2f7; text-align:left; }
.duty-tbl th { background:#f0f7f2; color:#1e2a3a; font-weight:600; }
.duty-tbl td.rate { font-weight:700; color:#15803d; white-space:nowrap; }
.duty-tbl small { color:#94a3b8; font-weight:400; }
.hs-rate { display:inline-block; margin-left:.4rem; padding:.1rem .45rem; background:#e8f5ec; color:#15803d; border-radius:6px; font-size:.75rem; font-weight:700; }
.duty-cal { margin-top:1rem; font-size:.9rem; }
.duty-cal a { color:#15803d; font-weight:700; text-decoration:none; }
.duty-cal a:hover { text-decoration:underline; }
