/* =============================================
   TỬ VI MASTER — Credit System Styles
   ============================================= */

/* Balance Card */
.tuvi-credit-balance-card {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #1a1a2e, #4a1942);
    border-radius: 20px; padding: 28px 32px; color: #fff;
    margin: 24px 0; box-shadow: 0 4px 24px rgba(74,25,66,.3);
}
.tuvi-cb-label { font-size: .8em; opacity: .7; margin-bottom: 4px; }
.tuvi-cb-amount { font-size: 2.5em; font-weight: 900; font-family: 'Playfair Display', serif; color: #ffd700; }
.tuvi-cb-amount small { font-size: .4em; opacity: .6; }
.tuvi-cb-email { font-size: .8em; opacity: .5; margin-top: 4px; }
.tuvi-cb-right { display: flex; gap: 8px; }

.tuvi-btn-outline {
    padding: 10px 20px; border: 1px solid rgba(255,255,255,.3);
    border-radius: 10px; background: rgba(255,255,255,.08);
    color: #fff; cursor: pointer; font-size: .8em; transition: all .3s;
    font-family: 'Be Vietnam Pro', sans-serif;
}
.tuvi-btn-outline:hover { background: rgba(255,255,255,.15); }

/* Section Title */
.tuvi-section-title { text-align: center; margin: 36px 0 20px; }
.tuvi-section-title h3 { font-family: 'Playfair Display', serif; font-size: 1.4em; font-weight: 700; }

/* Service Grid */
.tuvi-service-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 12px; margin-bottom: 32px;
}
.tuvi-service-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,.85); backdrop-filter: blur(16px);
    border-radius: 14px; padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.tuvi-svc-name { font-size: .85em; font-weight: 500; }
.tuvi-svc-cost { font-size: 1.3em; font-weight: 900; color: #764ba2; white-space: nowrap; }
.tuvi-svc-cost small { font-size: .5em; font-weight: 400; opacity: .6; }

/* Package Grid */
.tuvi-packages-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 32px;
}
.tuvi-pkg-card {
    background: rgba(255,255,255,.9); backdrop-filter: blur(16px);
    border-radius: 20px; padding: 28px 20px;
    text-align: center; border: 2px solid rgba(0,0,0,.05);
    transition: all .3s; position: relative; cursor: pointer;
}
.tuvi-pkg-card:hover { transform: translateY(-4px); box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.tuvi-pkg-popular { border-color: #ffd700; box-shadow: 0 4px 20px rgba(255,215,0,.2); }
.tuvi-pkg-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: #ffd700; color: #1a1a2e; padding: 4px 16px;
    border-radius: 20px; font-size: .7em; font-weight: 700; white-space: nowrap;
}
.tuvi-pkg-credits { font-size: 2.5em; font-weight: 900; font-family: 'Playfair Display', serif; color: #764ba2; }
.tuvi-pkg-label { font-size: .75em; color: #888; margin-bottom: 8px; }
.tuvi-pkg-price { font-size: 1.2em; font-weight: 700; color: #e74c3c; }
.tuvi-pkg-save { font-size: .7em; color: #27ae60; font-weight: 600; margin-top: 4px; }
.tuvi-pkg-per { font-size: .7em; color: #888; margin: 8px 0 16px; }
.tuvi-pkg-buy-btn {
    width: 100%; padding: 12px; border: none;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: #fff; border-radius: 12px; font-weight: 700;
    font-size: .85em; cursor: pointer; transition: all .3s;
    font-family: 'Be Vietnam Pro', sans-serif;
}
.tuvi-pkg-buy-btn:hover { transform: scale(1.03); box-shadow: 0 4px 16px rgba(118,75,162,.3); }

/* Transfer Info */
.tuvi-transfer-info-card {
    background: rgba(255,255,255,.95); border-radius: 24px;
    padding: 36px 32px; margin: 24px 0;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    border: 2px solid #ffd700;
}
.tuvi-transfer-info-card h3 { font-family: 'Playfair Display', serif; text-align: center; margin-bottom: 24px; }
.tuvi-bank-details { background: #f8f9fa; border-radius: 16px; padding: 24px; }
.tuvi-bank-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.05); font-size: .9em; }
.tuvi-bank-row span { min-width: 120px; color: #888; }
.tuvi-amount-highlight { color: #e74c3c; font-size: 1.3em; }
.tuvi-code-highlight { color: #764ba2; font-size: 1.1em; letter-spacing: 1px; }
.tuvi-copy-btn { border: none; background: none; cursor: pointer; font-size: 1em; opacity: .6; }
.tuvi-copy-btn:hover { opacity: 1; }
.tuvi-transfer-note { margin-top: 20px; font-size: .85em; line-height: 1.8; color: #666; }
.tuvi-transfer-note strong { color: #1a1a2e; }

/* History Table */
.tuvi-history-table { width: 100%; border-collapse: collapse; font-size: .8em; }
.tuvi-history-table th { background: #f8f9fa; padding: 10px; text-align: left; font-weight: 600; border-bottom: 2px solid #eee; }
.tuvi-history-table td { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.tuvi-log-plus td:nth-child(3) { color: #27ae60; font-weight: 700; }
.tuvi-log-minus td:nth-child(3) { color: #e74c3c; font-weight: 700; }

/* Inline Balance (for premium pages) */
.tuvi-inline-credit-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #1a1a2e, #4a1942);
    border-radius: 14px; padding: 14px 24px; color: #fff;
    margin-bottom: 20px; font-size: .85em;
}
.tuvi-inline-credit-bar .balance { font-weight: 700; color: #ffd700; font-size: 1.2em; }
.tuvi-inline-credit-bar a { color: #ffd700; text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .tuvi-credit-balance-card { flex-direction: column; text-align: center; gap: 16px; }
    .tuvi-service-grid { grid-template-columns: repeat(2, 1fr); }
    .tuvi-packages-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .tuvi-service-grid { grid-template-columns: 1fr; }
    .tuvi-packages-grid { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   QR PAYMENT MODAL POPUP
   ============================================= */
.tuvi-qr-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tuvi-qr-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}
.tuvi-qr-modal-content {
    position: relative;
    background: #1a1a2e;
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 90%;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: tuvi-qr-slide-in 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}
@keyframes tuvi-qr-slide-in {
    from { transform: translateY(-30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.tuvi-qr-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    color: #888; font-size: 28px;
    cursor: pointer; line-height: 1;
    transition: color 0.2s;
}
.tuvi-qr-modal-close:hover { color: #fff; }
.tuvi-qr-modal-title {
    text-align: center;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffd700;
}

/* QR Image */
.tuvi-qr-image-wrap {
    text-align: center;
    margin-bottom: 20px;
}
.tuvi-qr-image-wrap img {
    width: 260px;
    height: auto;
    border-radius: 16px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.15);
}

/* Bank Info Rows */
.tuvi-qr-bank-info {
    background: rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.tuvi-qr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.92em;
}
.tuvi-qr-row:last-child { border-bottom: none; }
.tuvi-qr-row span {
    color: #aaa;
    min-width: 90px;
    flex-shrink: 0;
}
.tuvi-qr-row strong {
    color: #fff;
    font-weight: 600;
}
.tuvi-qr-amount {
    color: #ffd700 !important;
    font-size: 1.15em;
}
.tuvi-qr-code {
    color: #4ecdc4 !important;
    font-family: monospace;
    background: rgba(78, 205, 196, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
}
.tuvi-qr-copy-btn {
    background: none; border: none;
    color: #888; font-size: 0.78em;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.tuvi-qr-copy-btn:hover { color: #4ecdc4; }

/* Waiting Button */
.tuvi-qr-waiting-btn {
    width: 100%;
    padding: 14px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    background: rgba(255, 215, 0, 0.05);
    color: #ffd700;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    animation: tuvi-qr-pulse 2s infinite;
}
.tuvi-qr-waiting-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}
@keyframes tuvi-qr-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .tuvi-qr-modal-content { padding: 20px 16px; }
    .tuvi-qr-image-wrap img { width: 220px; }
    .tuvi-qr-row { font-size: 0.85em; }
    .tuvi-qr-row span { min-width: 80px; }
}
