/* ==========================================================================
   VIRAL CARD MODULE - TẢI BÁO CÁO CẦM TAY
   ========================================================================== */

/* The Modal Overlay */
.viral-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 15, 0.85);
    /* Dark overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.viral-card-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Wrapper */
.viral-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-height: 95vh;
    overflow-y: auto;
    padding: 20px;
}

/* Close Button */
.viral-card-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.viral-card-close:hover {
    background: rgba(255, 0, 50, 0.5);
    transform: scale(1.1);
}

/* Action Buttons Container */
.viral-card-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-viral-action {
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-download {
    background: linear-gradient(135deg, #00C9FF 0%, #92FE9D 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 201, 255, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 201, 255, 0.5);
}

.btn-download.loading {
    opacity: 0.7;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

/* ==========================================================================
   THE ACTUAL REPORT CARD (To be captured as PNG)
   ========================================================================== */
.bazi-viral-card {
    width: 380px;
    /* Fixed width for consistent image export */
    min-height: 600px;
    background: linear-gradient(to bottom, #1A1A2E, #16213E, #0F3460);
    border-radius: 20px;
    padding: 30px 25px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Decorative elements inside the card */
.bazi-viral-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.4) 0%, transparent 70%);
    border-radius: 50%;
}

.bazi-viral-card::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 201, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

/* Header */
.vcard-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.vcard-brand {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.vcard-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(90deg, #E94560, #FFB703);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    text-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

/* User Profile */
.vcard-profile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.vcard-name {
    font-size: 18px;
    font-weight: 700;
    color: #FFF;
    margin: 0;
}

.vcard-gender {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.vcard-birthdate {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

/* Pillars Grid */
.vcard-pillars {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.vcard-pillar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 23%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.vcard-pillar-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.vcard-char {
    font-size: 20px;
    font-weight: 700;
    margin: 2px 0;
}

/* Core Insights Section */
.vcard-insights {
    position: relative;
    z-index: 2;
}

.vcard-section-title {
    font-size: 14px;
    color: #FFB703;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vcard-section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, #FFB703, transparent);
    opacity: 0.3;
}

/* Tags (Dụng Thần) */
.vcard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.vcard-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

.vcard-tag.dungthan {
    background: rgba(76, 175, 80, 0.2);
    color: #8BC34A;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.vcard-tag.kythan {
    background: rgba(244, 67, 54, 0.2);
    color: #E57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Advice Box */
.vcard-advice-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #E94560;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: 25px;
}

/* Footer watermark */
.vcard-watermark {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Element Colors */
.el-kim {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.el-thuy {
    color: #00BFFF;
    text-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
}

.el-moc {
    color: #32CD32;
    text-shadow: 0 0 5px rgba(50, 205, 50, 0.5);
}

.el-hoa {
    color: #FF4500;
    text-shadow: 0 0 5px rgba(255, 69, 0, 0.5);
}

.el-tho {
    color: #DEB887;
    text-shadow: 0 0 5px rgba(222, 184, 135, 0.5);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.98);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
    }
}