
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --processing-color: #4895ef;
    --success-color: #4cc9f0;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --gray-text: #6c757d;
}



.step-number:has(> .bg-primary),
.next-step,
.prev-step,
.payment-method {
    cursor: pointer;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #eeeeee !important;
}
header {
    /*width: 100%;*/
    /*position: fixed;*/
    /*z-index: 999;*/
}
header.bg-primary {
    background-color: white !important;
    color: black !important;
}
header .btn:hover {
    color: #fff;
    background-color: #5c636a;
    border-color: #565e64;
}
main {
    padding: 2rem 1rem !important;
    border-radius: 1rem;
    margin-top: 2rem !important;
    margin-bottom: 1.8rem !important;
    background-color: white;
}

header .container,
footer .container {
    padding: 0 1rem !important;
}

footer {
    background-color: unset;
    padding: 2rem 0;
}

.dropdown-menu {
    z-index: 99999 !important;
}
.alert-dismissible {
    padding: 1rem;
}

#loadingModal {
    background-color: rgba(0, 0, 0, 0.1); /* 颜色调浅，透明度降低 */
    display: none;
    z-index: 99999999;
}
#loadingModal .modal-content {
    background-color: transparent;
    border: none;
    box-shadow: none;
}
#loadingModal .modal-dialog {
    max-width: 200px;
}

#userEmail {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}
#userEmail a {
    margin-left: 1rem;
    margin-right: 0;
}

#dynamicAlert {
    padding: 1rem;
}

#third {
    border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);
}
#third img {
    height: 50px;
    border-radius: 50%;
    border: 1px solid #333;
    padding: 5px;
}
#third #facebookBtu {
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    padding: .5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto;
}

#third #facebookBtu:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

#appSelectd .modal-dialog {
    max-width: 450px;
}

.text-multiline-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 最多显示两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
#privacyTermsModal .list-group {
    padding: 1rem;
}
#privacyTermsModal .list-group .list-group-item:hover {
    box-shadow: inset 0 0 2px #0d6efd;
}
#loginModal .semi-transparent {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.7));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* 添加阴影 */
    backdrop-filter: blur(2px); /* 可选：添加模糊效果 */
}
#loginModal .code {
    display: flex;
}
#loginModal .code input {
    flex: 0 0 50%;
    margin-right: auto;
}
#loginModal .code img {
    flex: 0 0 30%;
    cursor: pointer;
}

#phone-step {
    display: none;
    background-color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 2001;
}
#phone-step .process,
#phone-step .confirm {
    width: 90%;
    margin: 0 1rem;
}
#phone-step .confirm {
    display: none;
}
#orderConfirmation tr {
    display: flex;
}
#orderConfirmation tr th {
    flex: 1;
}
#orderConfirmation tr td {
    flex: 3;
    word-wrap: break-word; /* 允许在单词内部换行 */
    word-break: break-all; /* 强制在单词内部换行 */
}

@media (max-width: 768px) {
    .step-number p {
        font-size: 0.875rem; /* 缩小字体大小 */
    }
    #gameSelection .row {
        padding: unset;
        margin:unset;
    }
    #loadingModal .modal-dialog {
        max-width: unset;
    }
    #paymentResults .btn-action {
        width: 100%;
        margin-bottom: 1rem;
    }
    main {
        width: calc(100% - 1.4rem) !important;
        margin: 0.7rem !important;;
        /*width: 90% !important;*/
        /*margin: 1.5rem !important;*/
        padding: 1rem !important;
    }
    header .container,
    footer .container {
        width: 90%;
        padding: 0 1rem !important;
    }
    main #step {
        display: none;
    }
    main .prev-step,
    main .next-step {
        display: none;
    }
    #phone-step {
        display: block;
        bottom: 2%;
    }
    footer {
        margin-bottom: 4rem;
    }

}
.hidden-important {
    display: none !important;
}

.card .card-text {
    font-size: 12px;
    margin: 0;
}
.card .card-text.text-multiline-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.text-muted {
    margin: 0
}
.card-subtitle.item-price {
    border-radius: 1rem;
    color: #0d6efd !important;
}
.card {
    border: 1px solid #ece4e4 !important;
}
#originalAmount,
#originalCurrencyCode {
    color: #198754 !important;
}

#targetAmount,
#targetCurrencyCode {
    color: #0d6efd !important;
    font-size: 1.5rem;
    font-weight: bolder;
}
#orderPaymentMethod img {
    height: 40px;
    object-fit: contain;
}

/* region todo: 游戏列表 */
#gameSelection .game-card {
    transition: transform 0.3s;
    cursor: pointer;
}
#gameSelection .game-card:hover {
    /*transform: scale(1.05);*/
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#productSelection .game-card {
    transition: all 0.3s;
}
#gameSelection .game-card.selected {
    /*border: 3px solid #0d6efd !important;*/
    box-shadow: 0 0 0 2px #0d6efd;
}
/*endregion*/

/* region todo: 服列表 */
#serverSelection .serverList {
    overflow-y: auto;
    max-height: 30rem;
    width: 100%;
    margin: 0 auto;
}
#serverSelection .serverList .col-lg-3 {
    transition: all 0.3s ease; /* 添加过渡效果 */
}
#serverSelection .server-item {
    /*padding: 1rem;*/
    transition: transform 0.3s;
    cursor: pointer;
}
#serverSelection .server-item:hover {
    /*transform: scale(1.05);*/
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#serverSelection .server-item {
    transition: all 0.3s;
}
#serverSelection .server-item.selected {
    /*border: 3px solid #0d6efd !important;*/
    box-shadow: 0 0 0 2px #0d6efd;
}
/*endregion*/

/* region todo: 商品列表 */
#productItemDisplay {
    position: relative; /* 为遮罩层提供定位上下文 */
}

#productItemDisplay .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2); /* 半透明白色背景 */
    z-index: 1; /* 确保遮罩层在内容上方 */
    pointer-events: none; /* 遮罩层不响应鼠标事件，允许用户与下方内容交互 */
}
#productSelection .product-card,
#productItemDisplay .product-card {
    transition: all 0.3s;
}
#productSelection .product-card:hover,
#productItemDisplay .product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#productSelection .nav-tabs .nav-link.active,
#productItemDisplay .nav-tabs .nav-link.active {
    font-weight: bold;
}
#productSelection .product-card.selected {
    /*border: 3px solid #0d6efd !important;*/
    box-shadow: 0 0 0 2px #0d6efd;
}

#productSelection #productTypeContent .card-body,
#productItemDisplay #productItemTypeContent .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

#productSelection #productTypeContent .card-body .content,
#productItemDisplay #productItemTypeContent .card-body .content {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

#productSelection #productTypeContent .card-body .card-title,
#productSelection #productTypeContent .card-body .text-danger,
#productSelection #productTypeContent .card-body .text-success,
#productSelection #productTypeContent .card-body .text-muted,
#productItemDisplay #productItemTypeContent .card-body .card-title,
#productItemDisplay #productItemTypeContent .card-body .text-danger,
#productItemDisplay #productItemTypeContent .card-body .text-success,
#productItemDisplay #productItemTypeContent .card-body .text-muted {
    overflow: hidden;        /* 超出部分隐藏 */
    text-overflow: ellipsis; /* 超出显示省略号（...）*/
    max-width: 100%;         /* 限制最大宽度（可选）*/
    display: block;          /* 确保元素是块级（针对行内元素）*/
    margin: 0;
}
#productSelection #productTypeContent .card-body img,
#productItemDisplay #productItemTypeContent .card-body img{
    flex: 0 0 75px;
    width: 75px;
    /*height: 75px;*/
}
#productSelection #productTypeContent .card-body .content,
#productItemDisplay #productItemTypeContent .card-body .content {
    flex: 0 0 calc(100% - 75px);
    overflow: hidden;
    /*white-space: nowrap;      !* 强制不换行 *!*/
    /*overflow: hidden;        !* 超出部分隐藏 *!*/
    display: block;          /* 确保元素是块级（针对行内元素）*/
}
/*endregion*/

/* region todo: 支付 */
#paymentSelection .payment-method img {
    height: 40px;
    object-fit: contain;
}
#paymentSelection .payment-method {
    transition: all 0.3s;
    position: relative;
}
#paymentSelection .payment-method:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#paymentSelection .payment-method.selected {
    /*border: 3px solid #0d6efd !important;*/
    box-shadow: 0 0 0 2px #0d6efd;
}
/* 返利标签样式 */
#paymentSelection .payment-method .promotion {
    position: absolute;
    top: 10px;
    right: -10px;
    background: linear-gradient(135deg, #e74c3c 60%, #c82333 100%);
    color: #fff;
    padding: 3px 6px;
    transform: rotate(45deg);
    font-weight: unset;
    font-size: 10px;
    line-height: 1.1;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.18);
    z-index: 20;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: box-shadow 0.2s, background 0.2s;
    user-select: none;
    pointer-events: none;
}
/*endregion*/

#rechargePrecaution .card {
    top: 300px;
    background-color: #f6f7fb;
    color: grey;
    font-size: 1rem;
}
#paymentResults .modal-body {
    padding: 0 !important;
}
#paymentResults .payment-header {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 0 25px 10px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
}

#paymentResults .payment-subtitle {
    font-size: 12px;
}

#paymentResults .header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background:
            radial-gradient(circle at 10% 20%, white 0%, transparent 10%),
            radial-gradient(circle at 90% 80%, white 0%, transparent 15%);
}

#paymentResults .payment-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.9);
}

#paymentResults .processing-icon {
    position: relative;
    display: inline-block;
}

#paymentResults .processing-icon .icon-bg {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 2s infinite;
}

#paymentResults .payment-loading::after {
    content: ".";
    animation: ellipsis 1.5s infinite;
}
@keyframes ellipsis {
    0% {
        content: ".";
    }
    33% {
        content: "..";
    }
    66% {
        content: "...";
    }
    100% {
        content: ".";
    }
}

#paymentResults .payment-body {
    padding: 0 !important;
    border-radius: 0 0 5px 5px;
}

#paymentResults .payment-info {
    border-radius: 0 0 5px 5px;
    background: var(--light-bg);
    padding: 10px;
    border: 1px solid #e9ecef;
}

#paymentResults .info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid #e9ecef;
}

#paymentResults .info-item:last-child {
    border-bottom: none;
}

#paymentResults .info-label {
    font-weight: 600;
    color: var(--gray-text);
    flex: 1;
}

#paymentResults .info-value {
    font-weight: 500;
    color: var(--dark-text);
    flex: 1;
    text-align: right;
}
#paymentResults .info-value .currencyCode,
#paymentResults .info-value .amount {
    color: #0d6efd !important;
    font-weight: bolder;
}
#paymentResults .info-value.loading {
    color: #212529 !important;
}
#paymentResults .info-value.error {
    color: red !important;
}
#paymentResults .info-value.success {
    color: green !important;
}
#paymentResults .info-value.timer {
    flex: unset;
    margin: 0 .5rem;
    color: red !important;
    font-weight: bolder;
}
.success-icon {
    color: green; /* 成功图标为绿色 */
}

.failure-icon {
    color: red; /* 失败图标为红色 */
}


#paymentResults .info-value img {
    height: 50px;
}

#paymentResults .btn-action {
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    margin: 0 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#paymentResults .btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#pointCard .pointCardList .card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#pointCard .pointCardList .card .original,
#pointCard .pointCardList .card .target {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    font-weight: bolder;
    align-items: center;
}
#pointCard .pointCardList .card .original .currency_code,
#pointCard .pointCardList .card .target .currency_code {
    font-weight: unset;
    font-size: 0.7rem;
}
#pointCard .pointCardList .card .original {
    flex: 0 0 45%;
}
#pointCard .pointCardList .card .target {
    flex: 0 0 35%;
}
#pointCard .pointCardList .card .placeholder {
    flex: 0 0 5%;
    max-width: 2px;
}

#pointCard .pointCardList .card .target {
    color: #0d6efd;
}
#pointCard .pointCardList .card .original .price {
    font-size: 1.3rem;
}

#pointCard .pointCardList .card .placeholder {
    border-left: 2px solid #b7b7b7;
    border-right: 2px solid #b7b7b7;
    margin: 1rem 0;
}

#pointCard .pointCardList .point-card {
    transition: transform 0.3s;
    cursor: pointer;
}
#pointCard .pointCardList .point-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
#pointCard .pointCardList .point-card.selected {
    box-shadow: 0 0 0 2px #0d6efd;
}
#pointCard h6 {
    background-color: #f6f7fb;
    font-size: 1rem;
    flex: 1 1 auto;
    padding: 1rem;
    color: rgb(128, 128, 128);
}
#pointCard .modal-footer .row {
    width: 100%;
    margin: unset;
}
#pointCard .modal-footer .row .col-12 {
    padding: unset;
}
@media (max-width: 768px) {
    #pointCard .modal-dialog,
    #pointCard .modal-dialog .modal-content {
        height: 70%;
    }
    #pointCard .modal-dialog  .modal-body {
        overflow-y: auto;
    }
    #pointCard h6 {
        font-size: 0.8rem;
    }
}

#tradeErrorInfo {
    display: none;
    flex-direction: column;
    padding: 10px 20px;
    border-bottom: 1px solid #e9ecef;
}
#tradeErrorInfo .info-label {
    flex: 0 0 50%;
}

#tradeErrorInfo .info-value {
    width: 100%;
    flex: 0 0 50%;
    flex-basis: 100%; /* 每个子元素占满一行 */
    font-size: 0.8rem;
    word-wrap: break-word; /* 允许长单词强制换行 */
    overflow-wrap: break-word; /* 允许长单词强制换行 */
    white-space: normal; /* 允许文本正常换行 */
    text-align: left;
}

/* 遮罩层样式 */
#shade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white; /* 纯白色背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999999; /* 确保遮罩层在最上层 */
}

/* 加载容器 */
#shade .loading-container {
    text-align: center;
}

/* 加载图标 */
#shade .loading-icon img {
    width: 3rem; /* 图标大小 */
    height: auto;
    margin: 0 auto;
    margin-bottom: 20px;
}

/* 加载条容器 */
#shade .loading {
    width: 200px;
    height: 20px;
    background-color: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto; /* 水平居中 */
}

/* 加载条 */
#shade .loading-bar {
    height: 100%;
    background-color: #4caf50;
    width: 0; /* 初始宽度为 0 */
    animation: loading 1s linear forwards; /* 自动从 0% 到 80% */
}

/* 加载动画 */
@keyframes loading {
    0% { width: 0; }
    100% { width: 80%; }
}

#userRegister .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#userRegister .modal-body .store-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.75rem;
    cursor: pointer;
}
#userRegister .modal-body .store-btn img {
    height: 100px;
}
@media (max-width: 768px) {
    #userRegister .modal-body .store-btn img {
        height: 61px;
    }
}