/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto 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;
    }
}

/* 加载动画 - 简化版本避免getBoundingClientRect错误 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
}

/* 关税表格样式 */
.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;
}