@media only screen and (min-width: 1920px) {
    html {
        font-size: 16px;
    }
}

@media only screen and (min-width: 1440px) and (max-width: 1919px) {
    html {
        font-size: 12px !important;
    }
}

@media only screen and (min-width: 1024px) and (max-width: 1439px) {
    html {
        font-size: 8.533px !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1023px) {
    html {
        font-size: 6.4px !important;
    }
}

/* 核心容器 */
.nationalCurrencyTypeBox {
/*    width: 60rem;*/
    height: 11.875rem;
    margin: 11.25rem auto 0 auto;
    padding-top: 0.625rem;
    overflow: hidden;
    position: relative;
}

/* 滚动轨道 - 无缝循环修复 */
.currency-scroll-wrapper {
    display: flex;
    align-items: center;
    gap: 1.875rem;
    position: absolute;
    left: 0;
    top: 0;
    width: max-content;
    animation: scrollCurrency 120s linear infinite;
    will-change: transform;
    transform: translateZ(0); /* 触发GPU加速 */
}

/* 悬停暂停 */
.nationalCurrencyTypeBox:hover .currency-scroll-wrapper {
    animation-play-state: paused;
}

/* 无缝循环动画 - 关键修复 */
@keyframes scrollCurrency {
    0% {
        transform: translateX(0);
    }
    
    100% {
        transform: translateX(calc(-50% - 0.9375rem)); /* 移动到复制元素的起始位置，包含gap */
    }
}

/* 交易卡片样式 */
.nationalCurrencyTypeItem {
    width: 23rem;
    height: 6.875rem;
    border-radius: 1rem;
    background-color: rgba(69, 0, 226, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.3s ease-out, background-color 0.3s ease-out, box-shadow 0.3s ease-out;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

    .nationalCurrencyTypeItem:hover {
        transform: translateY(-0.3125rem) scale(1.05);
        z-index: 10;
        box-shadow: 0 0.625rem 1.25rem rgba(0, 0, 0, 0.2);
        background-color: rgba(69, 0, 226, 0.3);
    }

/* 移动端适配 */
@media only screen and (max-width: 59.9375rem) {
    .nationalCurrencyTypeBox {
        height: 6.875rem;
        margin: 5rem auto 0 auto;
    }

    .currency-scroll-wrapper {
        gap: 0.9375rem;
    }

    .nationalCurrencyTypeItem {
        width: 17.5rem;
        height: 5.625rem;
    }

    @keyframes scrollCurrency {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-50% - 0.4375rem)); /* 移动端gap为0.9375rem，所以是0.4375rem */
        }
    }
}
