@font-face {
    font-family: "a";
    /*中文字体*/
    src: url();
    font-display: swap;
}

@font-face {
    font-family: "b";
    /*English font*/
    src: url();
    font-display: swap;
}

/* ========== 设计变量：与主站 xuxiny.top 保持一致 ========== */
:root {
    --main-bg-color: #f5f7fa;
    --main-text-color: #222831;
    --gradient-start: #4f8cff;
    --gradient-middle: #a084e8;
    --gradient-end: #f7b267;
    --purple-text-color: #6c63ff;
    --text-bg-color: #e3e8f0;
    --icon-bg-color: #f0f4fa;
    --pop-up-box-shadow: #e6e6e6;
    --project-item-bg-color: #ffffff;
    --project-item-hover-color: #f0f4fa;
    --project-item-left-title-color: #222831;
    --project-item-left-text-color: #6c757d;
    --footer-text-color: #8a99b3;
    --footer-text-hover-color: #819ed0;
    --icon-1-hover-color: #e3e8f0;
    --icon-2-hover-color: #e3e8f0;
    --icon-3-hover-color: #e3e8f0;
    --icon-4-hover-color: #e3e8f0;
    --icon-6-hover-color: #e3e8f0;
    --card-border-color: rgba(0, 0, 0, 0.06);
    --donor-divider-color: rgba(0, 0, 0, 0.06);
    --wechat-color: #07a354;
    --wechat-bg: rgba(7, 193, 96, 0.12);
    --alipay-color: #1069d6;
    --alipay-bg: rgba(22, 119, 255, 0.12);
    --afdian-color: #7a52d6;
    --afdian-bg: rgba(148, 108, 238, 0.13);
}

html[data-theme="dark"] {
    --main-bg-color: rgb(0, 0, 0);
    --main-text-color: #fff;
    --gradient-start: #4f8cff;
    --gradient-middle: #a084e8;
    --gradient-end: #f7b267;
    --purple-text-color: #747bff;
    --text-bg-color: rgb(26, 4, 48);
    --icon-bg-color: rgb(19, 20, 24);
    --pop-up-box-shadow: rgb(52, 52, 52);
    --project-item-bg-color: rgb(19, 20, 24);
    --project-item-hover-color: rgb(31, 33, 35);
    --project-item-left-title-color: rgb(255, 255, 255);
    --project-item-left-text-color: rgb(142, 142, 142);
    --footer-text-color: #646464;
    --footer-text-hover-color: rgba(255, 255, 255, 0.812);
    --icon-1-hover-color: rgb(34, 39, 46);
    --icon-2-hover-color: rgb(34, 39, 46);
    --icon-3-hover-color: rgb(34, 39, 46);
    --icon-4-hover-color: rgb(34, 39, 46);
    --icon-6-hover-color: rgb(34, 39, 46);
    --card-border-color: rgba(255, 255, 255, 0.1);
    --donor-divider-color: rgba(255, 255, 255, 0.08);
    --wechat-color: #2fd374;
    --wechat-bg: rgba(7, 193, 96, 0.16);
    --alipay-color: #4d94ff;
    --alipay-bg: rgba(22, 119, 255, 0.2);
    --afdian-color: #ab8cf5;
    --afdian-bg: rgba(148, 108, 238, 0.22);
}

* {
    font-family: "b", "a", sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    transition: all 0.1s ease;
}

a:hover,
a:link,
a:visited,
a:active,
a:focus {
    text-decoration: none;
    outline: none;
    color: inherit;
    border: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--main-text-color);
    border-radius: 8px;
    height: 20%;
}

::-webkit-scrollbar-track {
    background-color: var(--main-bg-color);
}

body {
    display: flex;
    height: 100%;
    min-height: 100vh;
    width: 100%;
    background: var(--main-bg-color);
    overflow-x: hidden;
    justify-content: center;
    color: var(--main-text-color);
}

.main {
    width: 100%;
    max-width: 1200px;
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: row;
}

/* 单栏居中布局（无侧边栏） */
.right {
    width: 100%;
    max-width: 860px;
    display: flex;
    padding: 25px;
    position: relative;
    flex-direction: column;
}

/* ========== 头部 ========== */
.sponsor-logo {
    flex-shrink: 0;
    width: 96px;
    aspect-ratio: 1/1;
    margin: 40px auto 0;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    transition: all 0.8s ease-in-out;
}

.sponsor-logo:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px var(--pop-up-box-shadow);
}

.welcome {
    text-align: center;
    font-size: clamp(34px, 6vw, 52px);
    font-weight: 800;
    margin: 22px 0 12px;
}

.description {
    text-align: center;
    font-size: 18px;
    margin-top: 7px;
    color: var(--main-text-color);
}

.gradientText {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200%;
    background-position: 0%;
    animation: backgroundSizeAnimation 5s ease-in-out infinite;
    background-image: linear-gradient(120deg, var(--gradient-start, #bd34fe), var(--gradient-middle, #e0321b) 30%, var(--gradient-end, #41d1ff) 60%);
}

@keyframes backgroundSizeAnimation {
    0% {
        background-position: 100%;
    }

    25% {
        background-position: 50%;
    }

    50% {
        background-position: 0%;
    }

    75% {
        background-position: 50%;
    }

    100% {
        background-position: 100%;
    }
}

.purpleText {
    color: var(--purple-text-color);
    font-weight: 800;
}

.textBackground {
    font-weight: 800;
    background: var(--text-bg-color);
    border-radius: 5px;
    font-size: 15px;
    padding: 3px 5px;
}

.iconContainer {
    width: 100%;
    gap: 8px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: scroll;
    margin-top: 20px;
}

.iconContainer::-webkit-scrollbar {
    display: none;
}

.iconItem {
    width: 44px;
    height: 40px;
    box-sizing: border-box;
    background: var(--icon-bg-color);
    border-radius: 7px;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
    color: var(--main-text-color);
}

.iconItem:hover {
    background: var(--icon-2-hover-color);
}

.langItem {
    width: 58px;
    color: var(--main-text-color);
}

.langItem:hover {
    background: var(--icon-4-hover-color);
}

.langLabel {
    font-size: 14px;
    font-weight: 600;
}

.switch {
    width: 55px;
    display: flex;
}

.switch:hover {
    background: var(--icon-6-hover-color);
}

/* ========== 区块标题（同主站 .title） ========== */
.title {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 26px;
    font-weight: 800;
    margin: 20px 0;
    transition: all 0.4s ease;
    color: var(--main-text-color);
}

/* ========== 支持方式卡片 ========== */
.supportGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 5px;
    margin-bottom: 10px;
}

.supportCard {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: var(--project-item-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 13px;
    padding: 18px;
    flex: 1 1 calc(33.33% - 30px);
    min-width: 200px;
    cursor: pointer;
}

.supportCard:hover {
    background-color: var(--project-item-hover-color);
    box-shadow: 0 8px 16px -4px #2c2d300c, 0 0 16px var(--pop-up-box-shadow);
}

.qrWrap {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.supportCardTop {
    display: flex;
    align-items: center;
    justify-content: center;
}

.supportCardInfo {
    margin-top: 14px;
}

.supportCardName {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
    color: var(--project-item-left-title-color);
}

.supportCardTip {
    margin-top: 4px;
    font-size: 13px;
    color: var(--project-item-left-text-color);
}

.methodDot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.methodDot.wechat {
    background: var(--wechat-color);
    box-shadow: 0 0 0 3px var(--wechat-bg);
}

.methodDot.alipay {
    background: var(--alipay-color);
    box-shadow: 0 0 0 3px var(--alipay-bg);
}

.methodDot.afdian {
    background: var(--afdian-color);
    box-shadow: 0 0 0 3px var(--afdian-bg);
}

.afdianCard {
    cursor: pointer;
}

.afdianLogo {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 10px;
    background: var(--afdian-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.afdianGo {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 600;
    color: var(--afdian-color);
    background: var(--afdian-bg);
    padding: 5px 10px;
    border-radius: 999px;
}

/* ========== 赞赏总额 ========== */
.totalCard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--project-item-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 13px;
    padding: 24px;
    margin: 10px 0 15px;
}

.totalCard:hover {
    box-shadow: 0 0 16px var(--pop-up-box-shadow);
}

.totalLabel {
    font-size: 14px;
    color: var(--project-item-left-text-color);
}

.totalAmount {
    font-size: 42px;
    font-weight: 800;
    margin-top: 6px;
}

.totalSub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--project-item-left-text-color);
}

.totalHeart {
    flex-shrink: 0;
    margin-left: 20px;
}

/* ========== 赞赏名单 ========== */
.donorList {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.donorItem {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: var(--project-item-bg-color);
    border: 1px solid var(--card-border-color);
    border-radius: 13px;
    padding: 16px 18px;
}

.donorItem:hover {
    background-color: var(--project-item-hover-color);
    box-shadow: 0 8px 16px -4px #2c2d300c;
}

.donorAvatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
}

.donorInfo {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.donorName {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--project-item-left-title-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donorMsg {
    margin-top: 3px;
    font-size: 13px;
    color: var(--project-item-left-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donorRight {
    flex-shrink: 0;
    text-align: right;
}

.donorAmount {
    font-size: 17px;
    font-weight: 800;
    color: var(--purple-text-color);
}

.donorDate {
    margin-top: 3px;
    font-size: 12px;
    color: var(--footer-text-color);
}

.donorBadge {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.donorBadge.wechat {
    color: var(--wechat-color);
    background: var(--wechat-bg);
}

.donorBadge.alipay {
    color: var(--alipay-color);
    background: var(--alipay-bg);
}

.donorBadge.afdian {
    color: var(--afdian-color);
    background: var(--afdian-bg);
}

.donorEmpty {
    text-align: center;
    background-color: var(--project-item-bg-color);
    border: 1px dashed var(--donor-divider-color);
    border-radius: 13px;
    padding: 40px 20px;
}

.donorEmptyEmoji {
    font-size: 40px;
}

.donorEmptyTitle {
    margin-top: 12px;
    font-size: 17px;
    font-weight: 600;
    color: var(--project-item-left-title-color);
}

.donorEmptySub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--project-item-left-text-color);
}

.donorNote {
    margin-top: 14px;
    font-size: 12px;
    text-align: center;
    color: var(--footer-text-color);
}

footer {
    padding: 5px;
    text-align: center;
    color: var(--footer-text-color);
    font-size: 13px;
    margin-top: 20px;
}

.footer-links {
    color: var(--footer-text-color);
}

.footer-links:hover {
    color: var(--footer-text-hover-color);
    transition: 0.3;
}

/* ========== 弹窗（同主站） ========== */
.pop-up {
    position: fixed;
    display: flex;
    visibility: hidden;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.pop-up-main {
    z-index: 100000;
    width: 80%;
    max-width: 300px;
    min-height: 200px;
    background-color: #ffffff;
    border-radius: 12px;
    opacity: 0;
    display: flex;
    transition: all 0.15s linear;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 16px var(--pop-up-box-shadow);
}

.pop-up-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pop-up.active {
    visibility: visible;
}

.pop-up-main.active {
    opacity: 1;
}

.pop-up-close {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    box-shadow: 0 4px 16px var(--pop-up-box-shadow);
    background-color: var(--project-item-bg-color);
    margin-top: 30px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s linear;
    color: var(--main-text-color);
}

.pop-up-close.active {
    opacity: 1;
}

/* ========== 主题开关（同主站） ========== */
.onoffswitch {
    position: relative;
    width: 38px;
    height: 20px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.onoffswitch-checkbox {
    display: none;
}

.onoffswitch-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    border-radius: 50px;
}

.onoffswitch-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200%;
    height: 100%;
    margin-left: -100%;
    transition: margin 0.2s ease-in 0s;
}

.onoffswitch-inner:before,
.onoffswitch-inner:after {
    display: flex;
    justify-content: center;
    align-items: center;
    float: left;
    width: 50%;
    height: 100%;
    padding: 0;
    font-size: 12px;
    color: white;
    font-family: Trebuchet, Arial, sans-serif;
    font-weight: bold;
    box-sizing: border-box;
}

.onoffswitch-inner:before {
    content: "";
    background-color: #e4e4e4;
    color: #FFFFFF;
    text-align: left;
}

.onoffswitch-inner:after {
    content: "";
    background-color: #272727;
    color: #FAFAFA;
    text-align: right;
}

.onoffswitch-switch {
    display: block;
    height: 70%;
    aspect-ratio: 1/1;
    background: #FFFFFF;
    position: absolute;
    top: 12.5%;
    bottom: 12.5%;
    right: 5px;
    border-radius: 20px;
    transition: all 0.2s ease-in 0s;
}

.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner {
    margin-left: 0;
}

.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch {
    right: 50%;
}

/* ========== 响应式 ========== */
@media (max-width: 800px) {
    .right {
        padding: 18px;
    }

    .description {
        font-size: 15px;
        padding: 0 10px;
    }

    .supportCard {
        flex: 1 1 calc(50% - 15px);
    }

    .afdianCard {
        flex: 1 1 100%;
    }

    .afdianLogo {
        aspect-ratio: auto;
        height: 110px;
    }

    .afdianCard .supportCardInfo {
        margin-top: 12px;
    }

    .totalAmount {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .supportCard {
        flex: 1 1 100%;
    }
}
