/*
 * donate.css · 默认主题赞助页（单二维码切换 + 桌面左右布局）
 */

.donate-page {
    max-width: 1040px;
    padding-bottom: 3rem;
}

.donate-page .page-header {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
}

.donate-page .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.donate-page .section-title__mark {
    color: var(--accent-primary, #111);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
}

.donate-lead {
    margin: 0 0 1.75rem;
    color: var(--text-muted, #6b7280);
    font-size: 0.92rem;
    line-height: 1.7;
    max-width: 36rem;
}

.donate-section__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--text-main, #111);
}

.donate-empty {
    margin: 0;
    padding: 1.25rem 1.1rem;
    border: 1px dashed var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    color: var(--text-muted, #6b7280);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 主区：手机上下 / 电脑左右 */
.donate-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
    align-items: start;
}

.donate-panel {
    min-width: 0;
}

.donate-panel--qr {
    padding: 1.15rem 1.1rem 1.25rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.donate-panel--thanks {
    min-height: 0;
}

/* 单容器二维码切换 */
.donate-qr-switch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.donate-qr-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
}

.donate-qr-tab {
    appearance: none;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.donate-qr-tab:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.donate-qr-tab.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.donate-qr-tab:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}

.donate-qr-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.donate-qr-stage__frame {
    width: min(100%, 220px);
    aspect-ratio: 1;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(160deg, #f8fafc, #fff);
    border: 1px solid #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.donate-qr-stage__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.donate-qr-stage__img.is-fading {
    opacity: 0;
    transform: scale(0.96);
}

.donate-qr-stage__label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text-main, #0f172a);
}

.donate-qr-stage__hint {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    text-align: center;
}

.donate-sponsor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    max-height: none;
}

.donate-sponsor-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    opacity: 0;
    transform: translateY(8px);
    animation: donate-rise 0.4s ease forwards;
    animation-delay: calc(var(--donate-i, 0) * 55ms);
    min-width: 0;
}

a.donate-sponsor-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.donate-sponsor-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

.donate-sponsor-card__avatar--text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #334155;
    background: linear-gradient(145deg, #e2e8f0, #f8fafc);
}

.donate-sponsor-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.donate-sponsor-card__name {
    font-weight: 650;
    font-size: 0.95rem;
    color: var(--text-main, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donate-sponsor-card__meta {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes donate-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 电脑端：左二维码 / 右感谢支持（多列网格，禁止单列拉满整行） */
@media (min-width: 901px) {
    .donate-layout {
        grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
        gap: 1.75rem;
    }

    .donate-panel--thanks .donate-sponsor-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        max-height: 440px;
        overflow-y: auto;
        padding-right: 4px;
        scrollbar-width: thin;
        align-content: start;
    }

    .donate-qr-stage__frame {
        width: 220px;
    }

    .donate-qr-tab:hover {
        transform: translateY(-1px);
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .donate-sponsor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .donate-sponsor-card,
    .donate-qr-stage__img {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }

    .donate-qr-stage__img.is-fading {
        opacity: 1;
        transform: none;
    }
}
