/* 充值页面样式 */


.payBox {
    max-width: 600px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 用户信息区 */
.user-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffd700;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.user-desc {
    font-size: 14px;
    color: #999;
}

/* 会员特权 */
.vip-privileges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}

.privilege-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 12px 8px;
    border-radius: 8px;
}

.privilege-item img {
    width: 40px;
    height: 40px;
}

.privilege-item span {
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* 充值套餐 */
.recharge-packages {
    padding: 25px 0;
    background: linear-gradient(135deg, #1a1410 0%, #0a0a0a 100%);
    margin: 0 -30px;
    padding: 25px 30px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.package-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.package-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.6);
}

.package-item.selected {
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    border-color: #ffd700;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

/* 套餐被優惠券聯動選中時：在金色高亮基礎上再加一個粉色脈衝外框 + 「券」徽標，
   提示用戶當前顯示的是優惠券折後價，不是該套餐的原價。 */
.package-item.coupon-applied,
.coin-package-item.coupon-applied {
    position: relative;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4), 0 0 0 2px #e91e90, 0 0 16px 2px rgba(233, 30, 144, 0.45);
}

.package-item.coupon-applied::after,
.coin-package-item.coupon-applied::after {
    content: '券';
    position: absolute;
    top: -10px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    padding: 0 6px;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f76b1c, #e91e90);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    border-radius: 11px;
    box-shadow: 0 2px 6px rgba(233, 30, 144, 0.4);
    z-index: 3;
}



.package-badge {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.package-item.selected .package-badge {
    color: #1a1410;
}

.package-item.selected .original-price {
    color: #1a1410;
}

.hot-tag {
    font-size: 12px;
    color: #ff4444;
    font-weight: bold;
    margin-left: 3px;
    animation: hotBounce 2s ease-in-out infinite;
}

@keyframes hotBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.05);
    }
}

.package-price {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.original-price {
    font-size: 12px;
    color: rgba(255, 215, 0, 0.6);
    text-decoration: line-through;
    text-align: center;
}

.current-price {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    text-align: center;
}

.package-item.selected .current-price {
    color: #1a1410;
}

.package-desc {
    font-size: 12px;
    color: rgba(255, 215, 0, 0.7);
    text-align: center;
}

.package-item.selected .package-desc {
    color: rgba(26, 20, 16, 0.8);
    font-weight: 500;
}

/* 新年折扣卡样式 */
.package-item.newYear {
    background: linear-gradient(135deg, #d32f2f 0%, #c41e3a 100%);
    border: 2px solid #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    position: relative;
}

    .package-item.newYear::before {
        content: "春日閱讀";
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
        color: #c41e3a;
        font-size: 12px;
        font-weight: bold;
        padding: 4px 12px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(255, 193, 7, 0.6);
        z-index: 3;
    }

.package-item.newYear .package-badge,
.package-item.newYear .package-price {
    position: relative;
}

.package-item.newYear:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c41e3a 100%);
    border-color: #ff6b6b;
    box-shadow: 0 0 25px rgba(255, 107, 107, 0.5);
}

.package-item.newYear.selected {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    border: 2px solid #ffeb3b;
    box-shadow: 0 0 30px rgba(255, 235, 59, 0.8), 0 4px 20px rgba(255, 68, 68, 0.6);
}

.package-item.newYear .package-badge {
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.package-item.newYear.selected .package-badge {
    color: #ffffff;
}

.package-item.newYear .current-price {
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.package-item.newYear.selected .current-price {
    color: #ffffff;
}

.package-item.newYear .original-price {
    color: rgba(255, 255, 255, 0.7);
}

.package-item.newYear.selected .original-price {
    color: rgba(255, 255, 255, 0.8);
}

.package-item.newYear .package-desc {
    color: rgba(255, 255, 255, 0.8);
}

.package-item.newYear.selected .package-desc {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.package-item.newYear .hot-tag {
    color: #ffeb3b;
}

/* 温馨提示 */
.warm-tips {
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
    margin: 25px 0;
}

.tips-title {
    font-size: 14px;
    font-weight: bold;
    color: #b8860b;
    margin-bottom: 10px;
}

.tips-content p {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
    margin: 0;
}

/* 开通按钮 */
.recharge-action {
    margin-bottom: 15px;
    margin-top: 30px;
}

.recharge-btn {
    width: 100%;
    padding: 16px;
    background: #ffd700;
    color: #1a1410;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: 2px;
}

.recharge-btn:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 协议复选框 */
.agreement-check {
    text-align: center;
}

.agreement-check label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.agreement-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ffd700;
}

.agreement-check span {
    font-size: 13px;
    color: #999;
}

.agreement-check a {
    color: #b8860b;
    text-decoration: none;
}

.agreement-check a:hover {
    text-decoration: underline;
    color: #ffd700;
}

/* 移动端响应式 */
@media screen and (max-width: 768px) {
    .payBox {
        padding: 20px 15px;
        margin: 12px;
        border-radius: 12px;
    }

    .user-header {
        padding-bottom: 20px;
    }

    .user-avatar {
        width: 50px;
        height: 50px;
    }

    .user-name {
        font-size: 16px;
    }

    .user-desc {
        font-size: 13px;
    }

    .vip-privileges {
        gap: 10px;
        padding: 20px 0;
    }

    .privilege-item img {
        width: 35px;
        height: 35px;
    }

    .privilege-item span {
        font-size: 12px;
    }

    .recharge-packages {
        padding: 20px 15px;
        margin: 0 -15px;
    }

    .packages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .package-item {
        padding: 12px 0;
    }

    .recharge-action {
        margin-top: 25px;
    }

    .recharge-btn {
        padding: 14px;
        font-size: 16px;
    }

    .package-badge {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .current-price {
        font-size: 15px;
    }

    .warm-tips {
        padding: 12px;
        margin: 20px 0;
    }

    .tips-title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .tips-content p {
        font-size: 12px;
    }

    .recharge-btn {
        padding: 12px;
        font-size: 15px;
    }

    .agreement-check span {
        font-size: 12px;
    }

    .package-item.newYear::before {
        font-size: 10px;
        padding: 3px 10px;
        top: -12px;
    }
}

/* 书币充值页面 */
.coin-recharge .user-info {
    display: flex;
    align-items: center;
}

/* 书币余额 */
.coin-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border-radius: 12px;
    margin: 25px 0;
    border: 2px solid #ffd700;
}

.coin-icon {
    width: 40px;
    height: 40px;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-label {
    font-size: 16px;
    color: #999;
}

.balance-value {
    font-size: 28px;
    font-weight: bold;
    color: #b8860b;
}

/* 书币充值套餐 */
.coin-packages {
    padding: 25px 0;
    background: linear-gradient(135deg, #1a1410 0%, #0a0a0a 100%);
    margin: 0 -30px;
    padding: 25px 30px;
    margin-bottom: 30px;
}

.coin-packages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.coin-package-item {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.coin-package-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.6);
}

.coin-package-item.selected {
    background: linear-gradient(135deg, #daa520 0%, #ffd700 100%);
    border-color: #ffd700;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.coin-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
}

.coin-num {
    font-size: 18px;
    font-weight: bold;
    color: #ffd700;
}

.coin-package-item.selected .coin-num {
    color: #1a1410;
}

.coin-small-icon {
    width: 18px;
    height: 18px;
}

.gift-tag {
    font-size: 14px;
    color: #ff3333;
    font-weight: bold;
    margin-bottom: 5px;
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.25) 0%, rgba(255, 102, 102, 0.25) 100%);
    padding: 5px 12px;
    border-radius: 16px;
    display: inline-block;
    border: 1px solid rgba(255, 51, 51, 0.4);
    box-shadow: 0 2px 6px rgba(255, 51, 51, 0.2);
}

.coin-package-item.selected .gift-tag {
    color: #ffffff;
    background: linear-gradient(135deg, #ff3333 0%, #ff6666 100%);
    border-color: #ff3333;
    box-shadow: 0 2px 8px rgba(255, 51, 51, 0.4);
}

.coin-price {
    font-size: 24px;
    font-weight: bold;
    color: #ffd700;
}

.coin-package-item.selected .coin-price {
    color: #1a1410;
}

/* 移动端响应式 */
@media screen and (max-width: 768px) {
    .coin-balance {
        padding: 15px;
        margin: 20px 0;
        gap: 10px;
    }

    .coin-icon {
        width: 35px;
        height: 35px;
    }

    .balance-label {
        font-size: 14px;
    }

    .balance-value {
        font-size: 24px;
    }

    .coin-packages {
        padding: 20px 15px;
        margin: 0 -15px;
        margin-bottom: 25px;
    }

    .coin-packages-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .coin-package-item {
        padding: 15px 0;
    }

    .coin-num {
        font-size: 13px;
    }

    .coin-small-icon {
        width: 16px;
        height: 16px;
    }

    .gift-tag {
        font-size: 12px;
        padding: 2px 6px;
    }

    .coin-price {
        font-size: 15px;
    }
}

/* 解锁畅读弹层 */
.unlock-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.unlock-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: unlockSlideIn 0.3s ease;
}

@keyframes unlockSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes unlockSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.unlock-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.unlock-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.unlock-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    line-height: 1;
}

.unlock-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.unlock-modal-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.unlock-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.unlock-option:hover {
    background: #f5f5f5;
}

.unlock-option-text {
    flex: 1;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.unlock-balance {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 5px;
}

.unlock-option-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.unlock-btn-vip {
    background: #ffd700;
    color: #1a1410;
}

.unlock-btn-vip:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.unlock-btn-coin {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    color: #ffffff;
}

.unlock-btn-coin:hover {
    background: linear-gradient(135deg, #ff8787 0%, #ffa5a5 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.unlock-btn-video {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
}

.unlock-btn-video:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

/* 解锁弹层主题色适配 */
body.theme-white .unlock-modal-content {
    background-color: #ffffff;
}

body.theme-beige1 .unlock-modal-content {
    background-color: #FAF6ED;
}

body.theme-beige2 .unlock-modal-content {
    background-color: #F6EDD4;
}

body.theme-green .unlock-modal-content {
    background-color: #EAF4E9;
}

body.theme-blue .unlock-modal-content {
    background-color: #E8F3F5;
}

body.theme-pink .unlock-modal-content {
    background-color: #F4E6E5;
}

body.theme-gray .unlock-modal-content {
    background-color: #E5E5E4;
}

body.theme-night .unlock-modal-content {
    background-color: #464847;
}

body.theme-night .unlock-modal-title {
    color: #d0d0d0;
}

body.theme-night .unlock-modal-close {
    color: #d0d0d0;
}

body.theme-night .unlock-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body.theme-night .unlock-option {
    background: #3a3b3a;
}

body.theme-night .unlock-option:hover {
    background: #4a4b4a;
}

body.theme-night .unlock-option-text {
    color: #d0d0d0;
}

body.theme-night .unlock-balance {
    color: #999;
}

/* 移动端响应式 */
@media screen and (max-width: 768px) {
    .unlock-modal {
        align-items: flex-end;
    }

    .unlock-modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        animation: unlockSlideUp 0.3s ease;
    }

    .unlock-modal-header {
        padding: 15px 20px;
    }

    .unlock-modal-title {
        font-size: 18px;
    }

    .unlock-modal-close {
        width: 28px;
        height: 28px;
        font-size: 28px;
    }

    .unlock-modal-body {
        padding: 20px;
        gap: 12px;
    }

    .unlock-option {
        padding: 15px;
        gap: 10px;
    }

    .unlock-option-text {
        font-size: 14px;
    }

    .unlock-balance {
        font-size: 12px;
    }

    .unlock-option-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}