:root {
    --primary-color: #000;
    --text-color: #333;
    --border-color: #eee;
    --fortune-line-color: #f8cf47;
    --about-bg-color: #F8CF47;
    --input-btn-bg: #ed562e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-color);
    line-height: 1.5;
    background-color: #fff;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
    position: relative;
    z-index: 100;
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.logo img {
    height: 40px;
}

.header-right {
    display: flex;
    align-items: center;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.icon-earth {
    width: 20px;
    height: 20px;
}

/* Hero Section (restoring demo style) */
.section-hero {
    background-color: #000; /* 背景黑色 */
    width: 100%;
    /* 移除之前的 flex/center，因为我们现在用内部容器来控制 */
    display: block; 
}

.hero-container {
    max-width: 1400px; /* 限制最大宽度，超出会显示左右黑边 */
    margin: 0 auto;    /* 居中 */
    display: flex;     /* flex布局让左右部分并排 */
    width: 100%;
}

.hero-left {
    /* flex: 1; -> 50% */
    flex: 1;
    /* max-width不要设置50%了，flex:1会自动处理 */
    background-color: #000;
    display: flex;
    justify-content: center; 
    align-items: center;
    position: relative;
    /* 保持高度适应 */
}
.hero-left img {
    height: 100%;
    width: 100%; /* 充满容器 */
    display: block; 
    object-fit: cover; /* 或者 contain，视图片比例而定。cover能填满，contain会留空 */
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
}

.hero-desc {
    font-size: 18px;
    color: #b8b8b8;
    margin-bottom: 40px;
    max-width: 80%;
}

.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: fit-content;
}

.hero-right {
    flex: 1; /* 50% */
    background-color: #000;
    /* Grid 堆叠布局，让图片自然撑开高度 */
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    justify-items: center;
}


/* Pure CSS Carousel Animation */
@keyframes fadeLoop {
    0% { opacity: 0; }
    4% { opacity: 1; }  /* Fade in duration roughly 0.6s out of 15s */
    20% { opacity: 1; } /* Display for 3s */
    24% { opacity: 0; } /* Fade out */
    100% { opacity: 0; }
}

.hero-right .slide-item {
    /* Grid 堆叠 */
    grid-area: 1 / 1 / 2 / 2;
    width: 100%;
    position: relative; /* For text positioning */
    opacity: 0;         /* 初始隐藏 */
    animation: fadeLoop 15s infinite; /* 5 images * 3s = 15s */
}

.hero-right .slide-item img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.slide-text {
    position: absolute;
   width: 100%;
    text-align: center;
    top:20%;
    color: #fff;
    text-shadow: #2790f1 2px 2px 10px;
}
.slide-text h1 {
    font-size: 50px;
    font-weight: bold;
    margin-bottom: 10px;
}
.slide-text span {
    font-size: 30px;
    /* font-weight: bold; */
    margin-bottom: 10px;
}


/* Stagger Animations */
.hero-right .slide-item:nth-child(1) { animation-delay: 0s; }
.hero-right .slide-item:nth-child(2) { animation-delay: 3s; }
.hero-right .slide-item:nth-child(3) { animation-delay: 6s; }
.hero-right .slide-item:nth-child(4) { animation-delay: 9s; }
.hero-right .slide-item:nth-child(5) { animation-delay: 12s; }



/* Fortune Section (center-3 restoration) */
.section-fortune {
    display: flex;
    align-items: flex-start;
    padding: 100px 0; /* Adjusted from 150px to fit better */
    max-width: 1200px;
    margin: 0 auto;
}

.fortune-left {
    flex: 1;
    padding-right: 50px;
}

.fortune-title {
    font-family: "PingFang SC";
    font-weight: 400;
    font-size: 40px; /* demo says 45px */
    line-height: 1.1;
    color: #000;
    letter-spacing: -0.33px;
    padding-top: 20px; 
}

.fortune-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 20px;
}

.fortune-line {
    width: 100px;
    height: 5px;
    background-color: var(--fortune-line-color);
    margin: 20px 0;
}

.fortune-desc {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
}

/* Nav List (Grid Style) */
.nav-section {
    padding: 80px 0;
    min-height: 400px;
    background: #f9f9f9; /* Subtle contrast */
}

.nav-title {
    font-size: 36px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    color: #000;
}

.nav-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 16px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.nav-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none; /* Reset link style */
    border: 1px solid transparent;
    animation: fadeInUp 0.5s ease backwards;
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #eee;
}

.nav-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.nav-icon {
    width: 48px;
    height: 48px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nav-info {
    flex: 1;
    overflow: hidden;
}

.nav-name {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-url-text {
    display: block;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #f5f5f5;
}

.latency-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    font-family: monospace;
}

.latency-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd; /* Default gray */
    box-shadow: 0 0 0 2px rgba(221, 221, 221, 0.3);
}

.latency-dot.good { background-color: #02c076; box-shadow: 0 0 0 2px rgba(2, 192, 118, 0.2); }
.latency-dot.medium { background-color: #f8cf47; box-shadow: 0 0 0 2px rgba(248, 207, 71, 0.2); }
.latency-dot.bad { background-color: #f6465d; box-shadow: 0 0 0 2px rgba(246, 70, 93, 0.2); }

.nav-btn {
    padding: 6px 16px;
    border-radius: 20px;
    background: #f5f5f5;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
}

.nav-card:hover .nav-btn {
    background: #000;
    color: #fff;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* About Section (center-2 restoration) */
.section-about {
    display: flex;
    background: var(--about-bg-color); /* Restored Yellow Background */
    min-height: 500px;
    overflow: hidden;
}

.about-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Changed from center to align text better */
    padding: 100px 50px;
    padding-left: 15%; /* Indent content */
}

.about-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
}

.about-desc {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    max-width: 430px;
}

.about-right {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-right img {
    max-width: 100%;
    height: auto;
}


/* Why Choose RWA (center-4 & center-5 restoration) */
.section-why-header {
    display: flex;
    padding-top: 100px;
    padding-bottom: 50px;
    max-width: 1440px;
    margin: 0 auto;
}
.why-header-left { flex: 1; padding: 0 40px; }
.why-header-right { flex: 1; }

.why-title {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
}
.why-desc {
    color: #666;
    line-height: 1.6;
    max-width: 600px;
}

/* Stats (center-5) */
.section-stats {
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 50px 10%; 
    gap: 30px;
}

.stat-item {
    flex: 1;
    background: #fff;
    padding: 35px 20px 45px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-val-wrapper {
    display: flex;
    align-items: center; /* Adjusted alignment */
    margin-bottom: 15px;
    gap: 5px;
}

.stat-arrow {
    width: 30px;
    height: 30px;
}

.stat-val {
    font-size: 60px;
    font-weight: bold;
    line-height: 1;
    color: #000;
}

.stat-desc {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}


/* Partners Section */
.partners-section {
    padding: 80px 40px;
    background: #fff;
}

.partners-title {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #000;
    text-align: center;
}

.partners-desc {
    margin-bottom: 50px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
}

.partners-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.partner-card {
    border: 1px solid #eee;
    padding: 30px;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    background: #fff;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.partner-num {
    font-size: 36px;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
}

.partner-bg {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 60px;
    font-weight: bold;
    color: #f5f5f5;
    z-index: 0;
    pointer-events: none;
}

.partner-content {
    position: relative;
    z-index: 1;
}

.partner-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #000;
}

.partner-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* Pay Section */
.pay-section {
    padding: 80px 0;
    text-align: center;
}
.pay-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
    margin-left: auto;
    margin-right: auto;
}
.pay-item img {
    width: 220px;
    object-fit: contain;
}

/* Exp Section */
.exp-section {
    text-align: center;
    padding: 100px 0;
    background: #fff;
}
.exp-btn {
    margin-top: 30px;
    padding: 15px 40px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* Footer */
footer {
    background: #000;
    color: #fff;
    padding: 80px 0 40px;
}

.footer-top {
    display: flex;
    margin-bottom: 60px;
}

.footer-left {
    width: 200px;
}
.footer-right {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: #999;
    font-size: 14px;
}

.footer-col a {
    display: block;
    color: #fff;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 14px;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-legal {
    border-top: 1px solid #333;
    padding-top: 40px;
    color: #666;
    font-size: 12px;
    line-height: 1.8;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 500px;
    position: relative;
}
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}
.modal-header {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}
.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.lang-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
}
.lang-option:hover {
    background: #f9f9f9;
}
.lang-option.active {
    border-color: #000;
}
.lang-check {
    width: 16px; 
    height: 16px;
    display: none;
}
.lang-option.active .lang-check {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .partners-list, .footer-right {
        grid-template-columns: repeat(1, 1fr);
    }
    
    /* Removed .section-hero from here as it uses .hero-container now */
    .section-about, .section-fortune, .section-why-header {
        flex-direction: column;
    }

    /* Hero Mobile Adaptation */
    .hero-container {
        flex-direction: column;
    }
    .hero-left, .hero-right {
        width: 100%;
        max-width: 100%;
        flex: none; /* Reset flex */
    }
    
    /* Ensure hero-right has height on mobile since children are absolute */
    .hero-right {
        width: 100%;
        /* 移除强制高度/padding hack，让Grid内部图片自然撑开 */
        height: auto; 
        padding-bottom: 0;
        background-color: #000;
    }

    .slide-text {
        top: 20%;
        transform: translateY(-50%);
        bottom: auto;
        width: 100%;
        padding: 0 15px;
    }
    
    .slide-text h1 {
        font-size: clamp(18px, 6vw, 36px); /* 动态调整标题大小 */
        margin-bottom: 4px;
    }
    
    .slide-text span {
        font-size: clamp(12px, 3.5vw, 20px); /* 动态调整描述文字大小 */
    }
    
    /* Update about/fortune padding */
    .about-left, .fortune-left, .why-header-left {
        padding: 40px;
    }

    .section-stats {
        flex-direction: column;
        align-items: center;
    }
    .stat-item {
        width: 100%;
        margin-bottom: 20px;
    }
}
