/* css/khackim.css */

/* Keyframes cho hiệu ứng */
@keyframes panel-fade-in-scale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes gold-glow {
    0% { box-shadow: 0 0 8px #ffd700, 0 0 12px #ffd700; }
    50% { box-shadow: 0 0 16px #ffec8b, 0 0 24px #ffec8b; }
    100% { box-shadow: 0 0 8px #ffd700, 0 0 12px #ffd700; }
}

@keyframes card-hover-glow {
    from {
        box-shadow: 0 0 10px var(--glow-color-start), 0 0 20px var(--glow-color-end);
    }
    to {
        box-shadow: 0 0 20px var(--glow-color-start), 0 0 30px var(--glow-color-end);
    }
}

/* Panel chính */
.khac-kim-panel-content {
    background: linear-gradient(160deg, #2c1a0e, #1a1a1d 40%);
    border: 2px solid #a87b3a;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    height: 85vh;
    max-height: 650px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(255, 215, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: panel-fade-in-scale 0.4s ease-out forwards;
}

/* Header của panel */
.khac-kim-header {
    text-align: center;
    padding: 15px;
    border-bottom: 1px solid #a87b3a;
    position: relative;
    background: rgba(0,0,0,0.2);
}

.khac-kim-header h2 {
    margin: 0;
    color: #ffd700;
    font-family: 'Times New Roman', serif;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 0 0 5px #ffd700, 0 0 10px #e48f45;
}

.khac-kim-header .fa-gem {
    color: #ffec8b;
    vertical-align: middle;
}

/* Thanh điều hướng tab */
.khac-kim-tabs-nav {
    display: flex;
    background-color: rgba(10, 10, 10, 0.3);
    padding: 5px;
    gap: 5px;
}

.khac-kim-tab-link {
    flex: 1;
    background: linear-gradient(to top, #4d3c23, #3a2e1e);
    border: 1px solid #6b5536;
    color: #d4c0a1;
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.khac-kim-tab-link:hover {
    background: linear-gradient(to top, #6b5536, #4d3c23);
    color: #fff;
    border-color: #a87b3a;
}

.khac-kim-tab-link.active {
    background: linear-gradient(to top, #c8a253, #a87b3a);
    color: #1a1a1d;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Khu vực chứa nội dung các tab */
.khac-kim-content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}
.khac-kim-tab-content { display: none; }
.khac-kim-tab-content.active { display: block; }

/* -- Tab Nạp Thẻ -- */
.nap-the-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.nap-the-package {
    background: rgba(0,0,0,0.3);
    border: 1px solid #5a4a3a;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.nap-the-package:hover {
    transform: translateY(-5px);
    border-color: #a87b3a;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.2);
}
.nap-the-package img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 8px #ffec8b);
}
.package-name {
    font-weight: bold;
    color: #e0e0e0;
    margin-bottom: 5px;
}
.package-value {
    color: #ffd700;
    font-size: 1.1em;
    margin-bottom: 15px;
}
.package-buy-btn {
    background: linear-gradient(145deg, #a87b3a, #8c6d56);
    border: 1px solid #c8a253;
    color: #fff;
    border-radius: 5px;
    padding: 8px 15px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}
.package-buy-btn:hover {
    background: linear-gradient(145deg, #c8a253, #a87b3a);
    box-shadow: 0 0 10px #ffd700;
}

/* === THÊM MỚI: CSS CHO TAB THẺ THÁNG === */
.the-thang-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    align-items: start;
}

.the-thang-card {
    background-color: #2a2a2e;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    position: relative;
}

.the-thang-card .card-header {
    padding: 10px 15px;
    text-align: center;
}

.card-title {
    margin: 0;
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.card-price {
    font-size: 1em;
    font-weight: normal;
    background-color: rgba(0,0,0,0.4);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}

.the-thang-card .card-body {
    padding: 15px;
    text-align: center;
    flex-grow: 1;
}

.card-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.card-description {
    font-size: 0.9em;
    color: #b0b0b0;
    line-height: 1.5;
    margin: 0;
}

.card-description strong {
    color: #fff;
}

.the-thang-card .card-footer {
    padding: 15px;
    background-color: rgba(0,0,0,0.2);
}

.card-buy-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

/* Style riêng cho từng loại thẻ */
.the-thang-card.bronze {
    border: 2px solid #cd7f32;
    --glow-color-start: #cd7f32;
    --glow-color-end: #8b4513;
}
.bronze .card-title { color: #cd7f32; }
.bronze .card-price { color: #ffebcd; }
.bronze .card-buy-btn { background: linear-gradient(145deg, #cd7f32, #8b4513); color: #fff; }

.the-thang-card.silver {
    border: 2px solid #c0c0c0;
    --glow-color-start: #c0c0c0;
    --glow-color-end: #a9a9a9;
}
.silver .card-title { color: #e0e0e0; }
.silver .card-price { color: #f5f5f5; }
.silver .card-buy-btn { background: linear-gradient(145deg, #e0e0e0, #a9a9a9); color: #333; }

.the-thang-card.gold {
    border: 2px solid #ffd700;
    transform: scale(1.05); /* Thẻ vàng nổi bật hơn */
    z-index: 10;
    --glow-color-start: #ffd700;
    --glow-color-end: #ffec8b;
}
.gold .card-title { color: #ffd700; }
.gold .card-price { color: #fffacd; }
.gold .card-buy-btn { background: linear-gradient(145deg, #ffd700, #e48f45); color: #4a2c0f; }

/* Hiệu ứng khi hover */
.the-thang-card:hover {
    transform: translateY(-10px) scale(1.08);
    animation: card-hover-glow 1.5s infinite alternate;
}
.the-thang-card:hover .card-image {
    transform: rotate(-5deg) scale(1.1);
}
.the-thang-card:hover .card-buy-btn {
    transform: scale(1.05);
}


/* -- Tab VIP -- */
.vip-progress-section, .vip-benefits-section {
    background: rgba(10,10,10,0.2);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
.vip-progress-section h4, .vip-benefits-section h4 {
    color: #E48F45;
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
}
.vip-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d4c0a1;
    font-weight: bold;
}
.vip-progress-bar-container {
    flex-grow: 1;
    height: 20px;
    background-color: #222;
    border-radius: 10px;
    border: 1px solid #555;
    position: relative;
    overflow: hidden;
}
.vip-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a87b3a, #ffd700);
    border-radius: 10px;
    box-shadow: 0 0 10px #ffd700;
    animation: gold-glow 2s infinite ease-in-out;
}
.vip-progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px #000;
}
.vip-note {
    text-align: center;
    color: #888;
    font-size: 0.9em;
    margin-top: 10px;
}

.vip-level-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vip-level-item {
    background: rgba(0,0,0,0.2);
    border-left: 4px solid #a87b3a;
    padding: 10px 15px;
    border-radius: 0 4px 4px 0;
}
.vip-level-title {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}
.vip-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #ccc;
    font-size: 0.95em;
}
.vip-benefits-list li {
    margin-bottom: 5px;
}
.vip-benefits-list .fa-check-circle {
    color: #63ff8c;
    margin-right: 8px;
}

/* khackim.css */

/* ========================================================== */
/* ==           CSS CHO PANEL THANH TOÁN QR (MỚI)          == */
/* ========================================================== */

.payment-qr-modal-content {
    background: #1f1f23;
    border: 1px solid #a87b3a;
    border-radius: 10px;
    width: 90%;
    max-width: 380px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.6);
    text-align: center;
    color: #e0e0e0;
    position: relative; /* Quan trọng cho nút đóng */
}

.payment-qr-modal-content h3 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 20px;
}

.qr-code-wrapper {
    margin-bottom: 20px;
}

#payment-qr-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    border: 3px solid #fff;
    background: #fff; /* Nền trắng cho mã QR */
}

.qr-note {
    font-size: 0.9em;
    color: #999;
    margin-top: 10px;
}

.payment-details {
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 6px;
    font-size: 1.1em;
}

.payment-details p {
    margin: 8px 0;
    line-height: 1.5;
}

.payment-details strong {
    color: #a87b3a;
}

/* Style riêng cho phần nội dung chuyển khoản */
.payment-details .memo {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #555;
}

#payment-memo {
    background-color: #111;
    color: #85e0ff; /* Màu xanh băng giá nổi bật */
    padding: 8px;
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    display: block; /* Hiển thị trên một dòng riêng */
    cursor: pointer; /* Gợi ý rằng có thể nhấn vào */
    user-select: all; /* Cho phép người dùng dễ dàng bôi đen để sao chép */
}

#payment-memo:hover {
    background-color: #000;
}

/* khackim.css */

/* --- CSS MỚI CHO TÍNH NĂNG NHẬN THƯỞNG THẺ THÁNG --- */

.card-claim-status {
    margin-top: 10px;
}

.card-claim-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border: none;
}

/* Trạng thái có thể nhận thưởng */
.card-claim-btn.claimable {
    background: linear-gradient(145deg, #2ecc71, #27ae60);
    color: #fff;
    cursor: pointer;
    animation: pulse-green 2s infinite;
}
.card-claim-btn.claimable:hover {
    background: linear-gradient(145deg, #58d68d, #2ecc71);
}

/* Trạng thái đã nhận hoặc không hợp lệ */
.card-claim-btn:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    animation: none;
}

/* Animation cho nút có thể nhận */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* khackim.css */

/* --- CSS MỚI CHO ĐỒNG HỒ ĐẾM NGƯỢC --- */

.card-countdown {
    display: block;
    margin-top: 12px;
    font-size: 0.95em;
    color: #f1c40f; /* Màu vàng kim */
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}