/* 子比主题·网站赞助插件 */

/* ===== 页面主体 ===== */
.zib-sponsor-page { padding: 20px; position: relative; overflow: hidden; }
.zib-sponsor-page::before { content: ''; position: fixed; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255, 71, 87, 0.12) 0%, transparent 70%); border-radius: 50%; pointer-events: none; z-index: 0; }
.zib-sponsor-page::after { content: ''; position: fixed; bottom: -150px; left: -150px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%); border-radius: 50%; pointer-events: none; z-index: 0; }
.sponsor-decoration { position: fixed; pointer-events: none; z-index: 0; }
.decoration-1 { top: 12%; left: 8%; width: 60px; height: 60px; border: 2px dashed rgba(255,71,87,0.18); border-radius: 50%; animation: float-1 8s ease-in-out infinite; }
.decoration-2 { top: 28%; right: 6%; width: 50px; height: 50px; background: rgba(255,193,7,0.07); border-radius: 12px; transform: rotate(45deg); animation: float-2 6s ease-in-out infinite; }
.decoration-3 { bottom: 18%; left: 6%; width: 35px; height: 35px; border: 2px solid rgba(255,71,87,0.12); border-radius: 8px; animation: float-3 10s ease-in-out infinite; }
.decoration-4 { bottom: 32%; right: 8%; width: 80px; height: 2px; background: linear-gradient(90deg, transparent, rgba(255,71,87,0.15), transparent); animation: float-4 7s ease-in-out infinite; }
.decoration-5 { top: 45%; left: 3%; width: 4px; height: 4px; background: rgba(255,71,87,0.2); border-radius: 50%; animation: pulse-1 4s ease-in-out infinite; }
.decoration-6 { top: 55%; right: 4%; width: 6px; height: 6px; background: rgba(255,193,7,0.18); border-radius: 50%; animation: pulse-2 5s ease-in-out infinite; }
.decoration-7 { bottom: 10%; left: 12%; width: 3px; height: 3px; background: rgba(255,71,87,0.15); border-radius: 50%; animation: pulse-1 3.5s ease-in-out infinite; }
.decoration-8 { top: 65%; left: 18%; width: 5px; height: 5px; background: rgba(255,193,7,0.12); border-radius: 50%; animation: pulse-2 4.5s ease-in-out infinite; }
.decoration-9 { top: 20%; right: 18%; width: 4px; height: 4px; background: rgba(255,71,87,0.16); border-radius: 50%; animation: pulse-1 4.2s ease-in-out infinite; }
.decoration-10 { bottom: 25%; right: 16%; width: 6px; height: 6px; background: rgba(255,193,7,0.14); border-radius: 50%; animation: pulse-2 5.2s ease-in-out infinite; }
@keyframes float-1 { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-20px) rotate(10deg); } }
@keyframes float-2 { 0%,100% { transform: rotate(45deg) translateY(0); } 50% { transform: rotate(55deg) translateY(-15px); } }
@keyframes float-3 { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(20px) rotate(-10deg); } }
@keyframes float-4 { 0%,100% { opacity: 0.3; transform: scaleX(1); } 50% { opacity: 0.8; transform: scaleX(1.5); } }
@keyframes pulse-1 { 0%,100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.5); opacity: 0.6; } }
@keyframes pulse-2 { 0%,100% { transform: scale(1); opacity: 0.25; } 50% { transform: scale(1.4); opacity: 0.55; } }

.zib-sponsor-page .sponsor-header { position: relative; z-index: 1; }
.sponsor-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.sponsor-desc { font-size: 14px; max-width: 560px; margin: 0 auto; }

/* Tab */
.sponsor-tabs { position: relative; display: flex; background: var(--muted-bg-color); border-radius: 12px; padding: 4px; margin-bottom: 20px; overflow: hidden; z-index: 1; }
.sponsor-tabs .tab-item { flex: 1; text-align: center; padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted-color); border-radius: 9px; transition: all 0.3s ease; position: relative; z-index: 2; }
.sponsor-tabs .tab-item i { margin-right: 6px; }
.sponsor-tabs .tab-item.active { color: #fff; background: var(--theme-color); box-shadow: 0 4px 12px var(--focus-shadow-color); }
.sponsor-tabs .tab-line { display: none; }

.sponsor-tab-content { position: relative; z-index: 1; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 表单布局 */
.sponsor-main { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
@media (max-width: 992px) { .sponsor-main { grid-template-columns: 1fr; } }

.sponsor-section { background: linear-gradient(145deg, rgba(255,255,255,0.02), var(--muted-bg-color)); border-radius: 12px; padding: 16px; margin-bottom: 16px; position: relative; border: 1px solid rgba(255,255,255,0.03); }
.sponsor-section.mt10 { margin-top: 10px; }
.sponsor-section.mt20 { margin-top: 20px; }
.section-title { margin-bottom: 14px; }
.section-title .step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--theme-color); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; }

/* 金额卡片 */
.sponsor-amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 576px) { .sponsor-amount-grid { grid-template-columns: repeat(3, 1fr); } }
.amount-card { position: relative; background: var(--main-bg-color); border: 2px solid var(--main-border-color); border-radius: 10px; padding: 14px 8px; text-align: center; cursor: pointer; transition: all 0.3s ease; }
.amount-card:hover { border-color: var(--theme-color); transform: translateY(-2px); }
.amount-card.active { border-color: var(--theme-color); box-shadow: 0 4px 12px var(--focus-shadow-color); background: linear-gradient(145deg, rgba(255,255,255,0.05), var(--muted-bg-color)); }
.amount-card .amount-icon { font-size: 28px; color: var(--theme-color); margin-bottom: 6px; line-height: 1; }
.amount-card .amount-icon svg { width: 32px; height: 32px; }
.amount-card .amount-name { font-size: 12px; color: var(--muted-color); margin-bottom: 2px; }
.amount-card .amount-value { font-size: 16px; font-weight: 700; }
.amount-card .amount-text { font-size: 15px; font-weight: 700; }
.amount-card .amount-sub { font-size: 11px; color: var(--muted-color); }
.amount-card .amount-check { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--theme-color); color: #fff; font-size: 10px; display: none; align-items: center; justify-content: center; }
.amount-card.active .amount-check { display: flex; }
.gift-corner-badge { position: absolute; top: -8px; right: 8px; background: linear-gradient(135deg, #ff6b81, #ff4757); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; box-shadow: 0 2px 8px rgba(255,71,87,0.3); z-index: 3; }
.gift-corner-badge i { margin-right: 3px; }

.custom-input-box { margin-top: 12px; }
.custom-amount-input { width: 100%; padding: 10px 12px; border: 2px solid var(--main-border-color); border-radius: 8px; background: var(--main-bg-color); color: var(--main-color); font-size: 14px; box-sizing: border-box; }
.custom-amount-input:focus { border-color: var(--theme-color); outline: none; }

/* 支付方式 */
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-method-card { display: flex; align-items: center; padding: 14px 16px; border: 2px solid var(--main-border-color); border-radius: 10px; cursor: pointer; transition: all 0.3s ease; background: var(--main-bg-color); }
.pay-method-card:hover { border-color: var(--theme-color); transform: translateY(-2px); }
.pay-method-card.active { border-color: var(--theme-color); box-shadow: 0 4px 12px var(--focus-shadow-color); }
.pay-method-card .method-icon { width: 40px; height: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-right: 12px; flex-shrink: 0; background: rgba(255,255,255,0.12); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2); }
.pay-method-card .method-icon svg { width: 24px; height: 24px; display: block; }
.pay-method-card[data-method="wechat"] .method-icon { color: #07c160; }
.pay-method-card[data-method="alipay"] .method-icon { color: #1677ff; }
.pay-method-card.active[data-method="wechat"] .method-icon,
.pay-method-card:hover[data-method="wechat"] .method-icon { background: #07c160; color: #fff; border-color: #07c160; }
.pay-method-card.active[data-method="alipay"] .method-icon,
.pay-method-card:hover[data-method="alipay"] .method-icon { background: #1677ff; color: #fff; border-color: #1677ff; }
.pay-method-card .method-content { flex: 1; }
.pay-method-card .method-name { font-size: 14px; font-weight: 600; }
.pay-method-card .method-desc { font-size: 12px; color: var(--muted-color); margin-top: 2px; }
.pay-method-card .method-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--main-border-color); display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; transition: all 0.3s ease; flex-shrink: 0; }
.pay-method-card.active .method-check { background: var(--theme-color); border-color: var(--theme-color); color: #fff; opacity: 1; transform: scale(1); }

/* 赞助清单 */
.sponsor-summary { background: var(--muted-bg-color); border-radius: 12px; overflow: hidden; position: sticky; top: 80px; }
@media (max-width: 992px) { .sponsor-summary { position: static; } }
.summary-header { padding: 20px 20px 12px; }
.summary-header h3 { font-size: 18px; font-weight: 700; }
.summary-header p { font-size: 13px; }
.summary-content { padding: 0 20px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px dashed var(--main-border-color); font-size: 14px; }
.summary-row .label { color: var(--muted-color); }
.summary-row .value { font-weight: 600; }
.summary-row.total { font-size: 18px; font-weight: 700; }
.summary-row.total .value { color: var(--theme-color); font-size: 22px; }
.gift-info-row .value { color: #ff6b81; }
.gift-custom-preview { padding: 0 20px; }
.gift-custom-box { display: flex; align-items: center; gap: 8px; background: linear-gradient(135deg, rgba(255,107,129,0.1), rgba(255,71,87,0.05)); border: 1px dashed rgba(255,71,87,0.3); border-radius: 8px; padding: 10px 12px; color: #ff4757; font-size: 13px; }

.sponsor-submit-btn { width: 100%; padding: 14px; border: none; border-radius: 8px; background: var(--theme-color); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s ease; margin-top: 20px; }
.sponsor-submit-btn:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px var(--focus-shadow-color); }
.sponsor-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ===== 榜单 ===== */
.stats-card { background: linear-gradient(145deg, rgba(255,255,255,0.02), var(--muted-bg-color)); border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.03); }
.stats-header { display: flex; align-items: center; margin-bottom: 16px; }
.stats-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #ff6b81, #ff4757); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; margin-right: 10px; }
.stats-title { font-size: 15px; font-weight: 600; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-box { text-align: center; background: var(--main-bg-color); border-radius: 10px; padding: 16px 10px; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--theme-color); }
.stat-primary .stat-num { color: #ff4757; }
.stat-label { font-size: 12px; color: var(--muted-color); margin-top: 4px; }

.sponsor-ranking-main { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; }
@media (max-width: 992px) { .sponsor-ranking-main { grid-template-columns: 1fr; } }

.goal-card { background: var(--main-bg-color); border: 1px solid var(--main-border-color); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.goal-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.goal-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.goal-image { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.goal-text h4 { font-size: 14px; font-weight: 600; margin: 0; }
.goal-right { text-align: right; flex-shrink: 0; }
.goal-amount .current { font-weight: 700; color: var(--theme-color); }
.goal-amount .target { color: var(--muted-color); font-size: 13px; }
.goal-percentage { font-size: 12px; color: var(--muted-color); }
.goal-progress { height: 6px; background: var(--main-border-color); border-radius: 3px; overflow: hidden; }
.goal-progress-bar { height: 100%; background: linear-gradient(90deg, var(--theme-color), #ff6b81); border-radius: 3px; transition: width 0.8s ease; }

.ranking-header { margin-bottom: 14px; }
.ranking-header h3 { font-size: 16px; font-weight: 600; }
.ranking-header p { font-size: 13px; }
.ranking-list { background: var(--main-bg-color); border-radius: 10px; border: 1px solid var(--main-border-color); padding: 6px 0; }
.ranking-item { display: flex; align-items: center; padding: 12px 14px; gap: 12px; border-bottom: 1px dashed var(--main-border-color); }
.ranking-item:last-child { border-bottom: none; }
.ranking-num { width: 24px; height: 24px; border-radius: 50%; background: var(--muted-bg-color); color: var(--muted-color); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ranking-item:nth-child(1) .ranking-num, .ranking-item:first-child .ranking-num { background: linear-gradient(135deg, #ffd700, #ffb700); color: #fff; }
.ranking-item:nth-child(2) .ranking-num { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #fff; }
.ranking-item:nth-child(3) .ranking-num { background: linear-gradient(135deg, #cd7f32, #b06a1f); color: #fff; }
.ranking-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--muted-bg-color); display: flex; align-items: center; justify-content: center; }
.ranking-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ranking-avatar-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--theme-color), #ff6b81); color: #fff; font-size: 14px; font-weight: 700; border-radius: 50%; }
.ranking-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ranking-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.rank-badge { font-size: 12px; }
.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }
.ranking-message { font-size: 12px; color: var(--muted-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.ranking-amount { font-size: 14px; font-weight: 700; color: var(--theme-color); flex-shrink: 0; }
.ranking-time { font-size: 11px; color: var(--muted-color); flex-shrink: 0; }

/* 留言墙 */
.sponsor-messages { margin-top: 24px; background: linear-gradient(135deg, rgba(255,255,255,0.03), var(--main-bg-color)); border: 1px solid rgba(255,255,255,0.04); border-radius: 12px; padding: 24px; }
.messages-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--main-border-color); }
.messages-header h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.messages-header p { font-size: 13px; color: var(--muted-color); }
.messages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 992px) { .messages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .messages-grid { grid-template-columns: 1fr; } }
.message-card { background: linear-gradient(145deg, rgba(255,255,255,0.02), var(--muted-bg-color)); border-radius: 12px; padding: 16px; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.03); }
.message-card:hover { box-shadow: 0 6px 16px var(--main-shadow); transform: translateY(-2px); }
.message-header { display: flex; align-items: center; margin-bottom: 12px; }
.message-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; margin-right: 10px; flex-shrink: 0; }
.message-avatar img, .message-avatar .avatar-img { width: 100%; height: 100%; object-fit: cover; }
.message-avatar .avatar-placeholder { width: 100%; height: 100%; background: var(--theme-color); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; }
.message-info { flex: 1; min-width: 0; }
.message-name { font-size: 13px; font-weight: 600; display: block; margin-bottom: 2px; }
.message-amount { font-size: 11px; color: var(--theme-color); font-weight: 600; }
.message-date { font-size: 11px; color: var(--muted-color); flex-shrink: 0; margin-left: 8px; }
.message-content { font-size: 13px; line-height: 1.6; padding-top: 12px; border-top: 1px dashed var(--main-border-color); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 30px 0; }
.empty-state .empty-icon { font-size: 36px; color: var(--muted-color); opacity: 0.4; margin-bottom: 10px; }
.empty-state p { font-size: 14px; margin: 4px 0; }

/* ===== 侧边栏小工具 ===== */
.zib-sponsor-widget-inner { position: relative; z-index: 1; }
.sponsor-widget-content { padding: 0 12px 12px; }
.sponsor-widget-tabs { margin-bottom: 12px; }
.zib-sponsor-widget-inner .sponsor-section { padding: 12px; margin-bottom: 10px; }
.zib-sponsor-widget-inner .sponsor-amount-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.zib-sponsor-widget-inner .amount-card { padding: 10px 6px; }
.zib-sponsor-widget-inner .amount-icon { font-size: 20px; }
.zib-sponsor-widget-inner .amount-icon svg { width: 24px; height: 24px; }
.zib-sponsor-widget-inner .amount-name { font-size: 11px; }
.zib-sponsor-widget-inner .amount-value { font-size: 14px; }
.zib-sponsor-widget-inner .sponsor-submit-btn { margin-top: 10px; padding: 10px; font-size: 13px; }
.sponsor-widget-panel { display: none; }
.sponsor-widget-panel.active { display: block; }
.sponsor-widget-ranking .widget-ranking-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--main-border-color); font-size: 13px; }
.sponsor-widget-ranking .widget-ranking-item:last-child { border-bottom: none; }
.sponsor-widget-ranking .widget-ranking-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sponsor-widget-ranking .widget-ranking-amount { font-weight: 700; color: var(--theme-color); }
.sponsor-widget-goal { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--main-border-color); }
.sponsor-widget-goal .goal-amount { font-size: 13px; margin-bottom: 6px; }
.sponsor-widget-goal .goal-progress { height: 6px; background: var(--main-border-color); border-radius: 3px; overflow: hidden; }
.sponsor-widget-goal .goal-progress-bar { height: 100%; background: linear-gradient(90deg, var(--theme-color), #ff6b81); transition: width 0.8s ease; }
.sponsor-widget-goal .goal-percentage { font-size: 12px; color: var(--muted-color); margin-top: 4px; }
.sponsor-widget-more { display: block; text-align: center; margin-top: 12px; padding: 8px; background: var(--muted-bg-color); border-radius: 8px; font-size: 13px; color: var(--theme-color); transition: all 0.3s ease; }
.sponsor-widget-more:hover { background: var(--theme-color); color: #fff; }

/* 支付弹窗（兜底扫码） */
.zibs-pay-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 99999; display: flex; align-items: center; justify-content: center; }
.zibs-pay-modal-box { background: #fff; border-radius: 12px; padding: 24px; text-align: center; max-width: 320px; width: 90%; }
.zibs-pay-modal-box h4 { margin: 0 0 16px; }
.zibs-pay-modal-box img { width: 220px; height: 220px; border-radius: 8px; }
.zibs-pay-modal-box p { font-size: 12px; margin: 12px 0; }
.zibs-pay-close { padding: 8px 24px; border: none; border-radius: 8px; background: var(--theme-color, #1677ff); color: #fff; cursor: pointer; }
