:root {
    --primary: #25D366;
    --secondary: #075E54;
    --dark: #0c1e1c;
    --light: #f5f9f8;
    --accent: #128C7E;
    --text: #333333;
    --border: #e0e7e5;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f0f7fa 0%, #e6f3f1 100%);
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

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

/* ======================
   头部样式
   ====================== */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    height: 60px;
}

.logo img {
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo i {
    margin-right: 10px;
    color: var(--primary);
}

.logo:hover {
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary);
}

/* ======================
   英雄区域
   ====================== */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiPjxkZWZzPjxwYXR0ZXJuIGlkPSJwYXR0ZXJuIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHBhdHRlcm5UcmFuc2Zvcm09InJvdGF0ZSg0NSkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjA1KSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNwYXR0ZXJuKSIvPjwvc3ZnPg==');
    opacity: 0.2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-whatsapp i {
    margin-left: 10px;
    font-size: 1.5rem;
}

/* ======================
   功能区域
   ====================== */
.features {
    padding: 40px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
    color: var(--secondary);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

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

.feature-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.feature-content {
    padding: 30px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.feature-card ul {
    list-style: none;
    padding-left: 20px;
}

.feature-card ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.feature-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ======================
   汇率表格
   ====================== */
.exchange-rates {
    padding: 100px 0;
    background-color: var(--light);
}

.rate-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.rate-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    background-color: var(--secondary);
    color: white;
    padding: 15px 30px;
    font-weight: 600;
}

.rate-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: var(--transition);
}

.rate-row:hover {
    background-color: rgba(7, 94, 84, 0.03);
}

.rate-row:last-child {
    border-bottom: none;
}

.rate-card {
    display: flex;
    align-items: center;
}

.rate-card img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    object-fit: contain;
    border-radius: 6px;
}

.rate-value {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

.update-time {
    text-align: center;
    margin-top: 20px;
    color: #777;
    font-size: 0.9rem;
    font-style: italic;
}

/* ======================
   计算器区域（优化后）
   ====================== */
.calculator {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: white;
}

/* 布局容器 */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        align-items: start;
    }
}

/* 国家选择器优化 */
.country-selector {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: fit-content;
}

.country-selector h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.country-selector h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.flag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .flag-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .flag-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.flag-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.flag-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.flag-card.active {
    background: rgba(7, 94, 84, 0.4);
    border: 2px solid var(--primary);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.flag-card.active::before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.flag-img-container {
    width: 60px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flag-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flag-card span {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.country-note {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
    text-align: center;
    line-height: 1.5;
}

/* 计算器表单优化 */
.calc-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
    .calc-container {
        padding: 40px;
    }
}

.calc-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 500;
    font-size: 1rem;
}

.input-group select,
.input-group input {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    color: var(--text);
    transition: var(--transition);
    width: 100%;
}

.input-group select:focus,
.input-group input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3);
}

.input-group input.error {
    border: 2px solid #ff5252;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.result-box {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.result-label {
    font-size: 1rem;
    margin-bottom: 5px;
    opacity: 0.8;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

@media (min-width: 480px) {
    .result-value {
        font-size: 2.5rem;
    }
}

#currency-symbol {
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-calculate {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 10px;
}

.btn-calculate:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ======================
   WhatsApp浮动按钮
   ====================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: var(--primary);
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float a:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* ======================
   页脚
   ====================== */
footer {
    background-color: var(--dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary);
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}



.legal-links {
    float: right;
    margin-top: 10px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.legal-links a {
    color: #888; /* 初始颜色 */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.legal-links a:hover {
    color: #25D366; /* 移上去变绿色，与你网站主色调一致 */
    text-decoration: underline;
}

.contact-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.contact-info i {
    color: var(--primary);
    font-size: 1.2rem;
    min-width: 24px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ======================
   支付方式
   ====================== */
.payment-badges {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.payment-method:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

.payment-icon {
    font-size: 1.8rem;
    color: #4CAF50;
}

.trust-badge {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(76, 175, 80, 0.15);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
}

.trust-icon {
    font-size: 2.5rem;
    color: #4CAF50;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    color: #FFD700;
}

.legal-links {
    display: flex;
    gap: 20px;
}

.copyright-bar {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 40px;
    display: flex;
}

/* ======================
   响应式设计（优化后）
   ====================== */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 15px;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        z-index: 999;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0;
        text-align: center;
        padding: 12px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features,
    .exchange-rates,
    .calculator {
        padding: 60px 0;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float a {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    /* 国家选择器响应式调整 */
    .flag-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .flag-card {
        padding: 12px 8px;
    }

    .flag-img-container {
        width: 50px;
        height: 35px;
    }

    .flag-card span {
        font-size: 0.85rem;
    }

    .country-selector h3 {
        font-size: 1.1rem;
    }

    /* 计算器表单响应式优化 */
    .calc-container {
        padding: 25px;
    }

    .result-value {
        font-size: 1.8rem;
    }

    .btn-calculate {
        padding: 16px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn-whatsapp {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* 国家选择器响应式调整 */
    .flag-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .flag-card {
        padding: 10px 5px;
    }

    /* 计算器表单响应式优化 */
    .calc-container {
        padding: 20px 15px;
    }

    .result-value {
        font-size: 1.6rem;
    }
}

/* ======================
   顶部栏样式
   ====================== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.top-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.top-link i {
    color: var(--primary);
}

.top-link:hover {
    color: var(--accent);
}