/* donate.css - 统一模板化打赏组件样式 (折叠且支持Lightbox灯箱关闭按钮版) */

.donate-card {
    background: #1c1d27;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.donate-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 15px 35px -8px rgba(99, 102, 241, 0.05), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.donate-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.donate-icon-container {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.donate-title-area {
    display: flex;
    flex-direction: column;
}

.donate-main-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.2px;
}

.donate-sub-title {
    font-size: 0.6rem;
    font-weight: 900;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.donate-description {
    font-size: 0.72rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

.donate-description strong {
    color: #f3f4f6;
    font-weight: 600;
}

/* 折叠控制按钮 */
.donate-toggle-btn {
    width: 100%;
    padding: 0.7rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 15px -3px rgba(234, 88, 12, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.donate-toggle-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    box-shadow: 0 6px 20px -3px rgba(234, 88, 12, 0.4);
    transform: translateY(-1px);
}

.donate-toggle-btn i {
    transition: transform 0.2s ease;
}

/* 折叠区域动画 */
.donate-qr-section {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.donate-qr-section.show {
    max-height: 320px;
    opacity: 1;
}

.donate-mobile-tip {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    padding: 0.45rem;
    text-align: center;
}

.donate-mobile-tip p {
    font-size: 0.62rem;
    font-weight: 700;
    color: #818cf8;
    margin: 0;
}

/* 强制左右并排布局，防任何框架/响应式样式覆盖 */
.donate-qr-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    gap: 0.8rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.donate-qr-box {
    flex: 1 1 0% !important;
    width: calc(50% - 0.4rem) !important;
    background: #0f1016 !important;
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    padding: 0.8rem !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    transition: border-color 0.2s ease !important;
    box-sizing: border-box !important;
}

.donate-qr-box:hover {
    border-color: rgba(255, 255, 255, 0.06);
}

/* 缩略图大小调整 */
.donate-qr-link {
    width: 120px;
    height: 120px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: zoom-in;
}

.donate-qr-link:hover {
    transform: scale(1.04);
}

.donate-qr-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.donate-qr-label {
    font-size: 0.65rem;
    font-weight: 700;
}

.donate-qr-label.wechat {
    color: #10b981;
}

.donate-qr-label.alipay {
    color: #0ea5e9;
}

.donate-footer-tip {
    font-size: 0.6rem;
    color: #52525b;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

/* Lightbox 全屏预览大图 */
.donate-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 8, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: donateFadeIn 0.2s ease-out;
}

.donate-lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.donate-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: scale(0.95);
    animation: donateScaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 右上角 X 关闭按钮 (固定悬浮于视口右上角，防窄屏隐藏) */
.donate-lightbox-close-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 100002;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.donate-lightbox-close-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    border-color: transparent;
    transform: rotate(90deg) scale(1.1);
}

@keyframes donateFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes donateScaleIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 极窄屏幕防折行自适应 */
@media (max-width: 380px) {
    .donate-qr-grid {
        gap: 0.4rem !important;
    }
    .donate-qr-box {
        padding: 0.4rem !important;
    }
    .donate-qr-link {
        width: 90px !important;
        height: 90px !important;
    }
}
