/* static/css/reader/purchase.css */

/* ========== 付費章節購買區塊 ========== */
.purchase-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.purchase-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.purchase-section .price-tag {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 60px;
    margin-bottom: 1rem;
}

.purchase-section .btn-light {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.purchase-section .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: #f8f9fa;
}

.purchase-section .btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.purchase-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.purchase-section .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
}

/* 餘額顯示 */
.wallet-balance {
    background: rgba(255,193,7,0.15);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    color: #856404;
}

.wallet-balance i {
    color: #ffc107;
    margin-right: 0.3rem;
}

/* 章節目錄中的鎖頭圖示 */
.list-group-item i.fa-lock {
    color: #ffc107;
    font-size: 0.85rem;
    margin-right: 0.3rem;
}

.list-group-item.active i.fa-lock {
    color: white;
}

/* 不足餘額提示 */
#insufficientBalanceMsg {
    background: rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

/* 購買成功動畫 */
.purchase-success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Toast 通知 */
.purchase-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 250px;
}

.purchase-confirm-modal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.purchase-confirm-modal .novel-name {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}
.purchase-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
.summary-label { font-size: 0.95rem; color: #555; }
.summary-value { font-weight: 600; font-size: 1rem; }
.summary-value.price { color: #667eea; font-size: 1.1rem; }
.summary-divider { border-top: 1px dashed #ddd; margin: 4px 0; }
.insufficient-warning {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fff3cd;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #856404;
}
.btn-confirm {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
    color: white;
}
.btn-cancel {
    padding: 10px 24px;
    border-radius: 25px;
}


/* 響應式設計 */
@media (max-width: 768px) {
    .purchase-section {
        padding: 1.5rem;
    }
    
    .purchase-section .price-tag {
        font-size: 2.5rem;
    }
    
    .purchase-section .btn-light,
    .purchase-section .btn-outline-light {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .wallet-balance {
        padding: 0.2rem 0.6rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .purchase-section .price-tag {
        font-size: 2rem;
    }
    
    .purchase-section .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .purchase-section .btn-light,
    .purchase-section .btn-outline-light {
        width: 100%;
    }
}