/* =============================================================================
   THẬP THẦN UI STYLING
   Khúc Vỹ Methodology - Ten Gods Display
   ============================================================================= */

/* =============================================================================
   SECTION CONTAINER
   ============================================================================= */

.thapthan-section {
    background: rgba(139, 69, 19, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    border-left: 4px solid #8B4513;
}

.thapthan-section h5 {
    color: #CD853F;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.thapthan-section .section-desc {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* =============================================================================
   SUMMARY TABLE (10 Thập Thần)
   ============================================================================= */

.thapthan-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.thapthan-summary-table thead {
    background: rgba(139, 69, 19, 0.3);
}

.thapthan-summary-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    border-bottom: 1px solid rgba(139, 69, 19, 0.4);
}

.thapthan-summary-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.thapthan-summary-table tbody tr:hover {
    background: rgba(139, 69, 19, 0.1);
}

.thapthan-summary-table tbody tr:last-child td {
    border-bottom: none;
}

/* Thập Thần Name Column */
.thapthan-name {
    font-weight: 600;
    display: inline-block;
}

.thapthan-name small {
    font-weight: 400;
    opacity: 0.7;
    margin-left: 6px;
}

/* Score Columns */
.thapthan-score {
    text-align: right;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
}

.thapthan-percent {
    text-align: right;
    color: var(--accent-gold, #D4AF37);
}

/* Strength Badge */
.thapthan-strength {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.thapthan-strength.thai-vuong,
.thapthan-strength.qua-vuong {
    background: rgba(255, 87, 51, 0.2);
    color: #FF6B6B;
}

/* 7 CẤP VƯỢNG SUY THEO KHÚC VỸ */
.thapthan-strength.vuong-cuc {
    background: rgba(255, 215, 0, 0.25);
    color: #FFD700;
    font-weight: 600;
}

.thapthan-strength.thien-vuong,
.thapthan-strength.vuong {
    background: rgba(78, 205, 196, 0.2);
    color: #4ECDC4;
}

.thapthan-strength.trung-hoa {
    background: rgba(149, 225, 211, 0.2);
    color: #95E1D3;
}

.thapthan-strength.thien-nhuoc,
.thapthan-strength.nhuoc {
    background: rgba(221, 160, 221, 0.2);
    color: #DDA0DD;
}

.thapthan-strength.qua-nhuoc {
    background: rgba(201, 177, 255, 0.2);
    color: #C9B1FF;
}

.thapthan-strength.nhuoc-cuc,
.thapthan-strength.thai-nhuoc {
    background: rgba(149, 165, 166, 0.2);
    color: #95A5A6;
}

/* Không có trong lá số */
.thapthan-strength.khong-co {
    background: rgba(100, 100, 100, 0.15);
    color: #666;
    font-style: italic;
}

/* Row style for empty Thập Thần */
.thapthan-row-empty {
    opacity: 0.5;
}

.thapthan-row-empty td {
    color: #666;
}

/* =============================================================================
   PILLAR THẬP THẦN LABELS (Under Can/Chi)
   ============================================================================= */

.pillar-thapthan-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(139, 69, 19, 0.3);
}

.pillar-thapthan-container .thapthan-can-label {
    font-size: 0.75rem;
    color: #CD853F;
    font-weight: 500;
    text-align: center;
}

.pillar-thapthan-container .thapthan-chi-labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.thapthan-chi-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    padding: 2px 4px;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 4px;
}

.thapthan-chi-item .khi-type {
    color: var(--text-secondary, #a0a0a0);
    opacity: 0.8;
}

.thapthan-chi-item .thapthan-label {
    color: #DEB887;
    font-weight: 500;
}

/* Badge for Day Master (Nhật Chủ) */
.thapthan-daymaster-badge {
    font-size: 0.75rem;
    color: var(--accent-gold, #D4AF37);
    font-weight: 600;
    text-align: center;
    padding: 4px 8px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* =============================================================================
   DETAIL BREAKDOWN (Per Pillar)
   ============================================================================= */

.thapthan-pillar-detail {
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border-left: 3px solid var(--accent-gold, #D4AF37);
}

.thapthan-pillar-detail .pillar-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary, #e0e0e0);
}

.thapthan-pillar-detail .pillar-header .pillar-name {
    color: var(--accent-gold, #D4AF37);
}

.thapthan-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
}

.thapthan-detail-row:last-child {
    border-bottom: none;
}

.thapthan-detail-row .label {
    color: var(--text-secondary, #a0a0a0);
}

.thapthan-detail-row .value {
    font-weight: 500;
}

/* =============================================================================
   COMPACT PILLAR THẬP THẦN LABELS (For Pillar Cards)
   ============================================================================= */

.pillar-thapthan-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(139, 69, 19, 0.3);
    font-size: 0.7rem;
}

.pillar-thapthan-compact .thapthan-dm-badge {
    color: var(--accent-gold, #D4AF37);
    font-weight: 600;
    text-align: center;
    padding: 2px 4px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

.pillar-thapthan-compact .thapthan-can-compact {
    color: #CD853F;
    font-weight: 500;
    text-align: center;
}

.pillar-thapthan-compact .thapthan-chi-compact {
    color: #DEB887;
    font-weight: 400;
    text-align: center;
    opacity: 0.85;
}

/* =============================================================================
   PILLAR CARDS - SEPARATED CAN/CHI THẬP THẦN LAYOUT
   Can Thập Thần ở TRÊN tên Can, Chi Thập Thần ở DƯỚI tên Chi
   ============================================================================= */

.pillar-can-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pillar-chi-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* Can Name - Large, bold */
.pillar-can,
.pillar-can-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #e0e0e0);
}

/* Chi Name - Medium */
.pillar-chi,
.pillar-chi-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary, #b0b0b0);
}

/* Thập Thần CAN Label - Above Can */
.thapthan-can-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #CD853F;
    padding: 2px 6px;
    background: rgba(205, 133, 63, 0.15);
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Nhật Chủ badge - Gold */
.thapthan-can-label.thapthan-dm-badge {
    color: var(--accent-gold, #D4AF37);
    background: rgba(212, 175, 55, 0.2);
    font-weight: 700;
}

/* Thập Thần CHI Label - Below Chi */
.thapthan-chi-label {
    font-size: 0.65rem;
    font-weight: 500;
    color: #DEB887;
    padding: 2px 5px;
    background: rgba(222, 184, 135, 0.1);
    border-radius: 3px;
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 480px) {

    .thapthan-can-label,
    .thapthan-chi-label {
        font-size: 0.6rem;
        padding: 2px 4px;
    }

    .pillar-can {
        font-size: 1rem;
    }

    .pillar-chi {
        font-size: 0.9rem;
    }
}

/* =============================================================================
   ĐẠI VẬN THẬP THẦN SECTION
   ============================================================================= */

.dv-thapthan-section {
    background: rgba(139, 69, 19, 0.08);
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
    border-left: 3px solid #8B4513;
}

.dv-thapthan-section h6 {
    color: #CD853F;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.dv-thapthan-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dv-thapthan-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dv-thapthan-item .label {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.85rem;
}

.dv-thapthan-item .value.thapthan-name {
    color: var(--accent-gold, #D4AF37);
    font-weight: 600;
    font-size: 0.9rem;
}

.dv-thapthan-meaning {
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
    padding-left: 12px;
    font-style: italic;
    margin-top: -4px;
}

/* =============================================================================
   NIÊN VẬN THẬP THẦN SECTION (Thái Tuế)
   ============================================================================= */

.nv-thapthan-section {
    background: rgba(139, 69, 19, 0.08);
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
    border-left: 3px solid #8B4513;
}

.nv-thapthan-section h6 {
    color: #CD853F;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.nv-thapthan-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nv-thapthan-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nv-thapthan-item .label {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.85rem;
}

.nv-thapthan-item .value.thapthan-name {
    color: var(--accent-gold, #D4AF37);
    font-weight: 600;
    font-size: 0.9rem;
}

.nv-thapthan-meaning {
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
    padding-left: 12px;
    font-style: italic;
    margin-top: -4px;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .thapthan-summary-table {
        font-size: 0.8rem;
    }

    .thapthan-summary-table th,
    .thapthan-summary-table td {
        padding: 6px 4px;
    }

    .thapthan-strength {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .thapthan-section {
        padding: 12px;
    }

    /* Horizontal scroll for table on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 15px;
        width: 100%;
        border-radius: 4px;
    }

    .table-responsive::-webkit-scrollbar {
        height: 6px;
    }

    .table-responsive::-webkit-scrollbar-thumb {
        background: var(--accent-gold);
        border-radius: 3px;
    }

    /* Ensure comparison tables don't squash text */
    .comparison-table {
        min-width: 600px;
        /* Force scroll if viewport < 600px */
    }

    .thapthan-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Compact labels mobile */
    .pillar-thapthan-compact {
        font-size: 0.65rem;
    }

    .dv-thapthan-section,
    .nv-thapthan-section {
        padding: 10px;
    }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .thapthan-section {
        background: none;
        border: 1px solid #8B4513;
    }

    .thapthan-summary-table {
        background: none;
    }

    .thapthan-strength {
        background: none !important;
        border: 1px solid currentColor;
    }

    .dv-thapthan-section,
    .nv-thapthan-section {
        background: none;
        border: 1px solid #8B4513;
    }
}

/* =============================================================================
   THẬP THẦN ADVICE SECTION
   ============================================================================= */

.thapthan-advice-section {
    background: linear-gradient(135deg, rgba(75, 0, 130, 0.12), rgba(138, 43, 226, 0.08));
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border-left: 4px solid #9932CC;
}

.thapthan-advice-section h6 {
    color: #DA70D6;
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.advice-primary {
    color: var(--text-primary, #e0e0e0);
    font-size: 1rem;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.advice-primary strong {
    color: var(--accent-gold, #D4AF37);
}

.advice-item {
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.advice-career {
    background: rgba(46, 139, 87, 0.15);
    border-left: 3px solid #2E8B57;
}

.advice-action {
    background: rgba(218, 165, 32, 0.15);
    border-left: 3px solid #DAA520;
}

.advice-warning {
    background: rgba(205, 92, 92, 0.15);
    border-left: 3px solid #CD5C5C;
}

.advice-secondary {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary, #a0a0a0);
}

/* =============================================================================
   THẬP THẦN COMPATIBILITY SECTION
   ============================================================================= */

.thapthan-compatibility-section {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.12), rgba(100, 149, 237, 0.08));
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    border-left: 4px solid #4682B4;
}

.thapthan-compatibility-section h6 {
    color: #87CEEB;
    margin-bottom: 14px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compatibility-group {
    margin-bottom: 12px;
}

.compatibility-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.compatibility-item:hover {
    transform: translateX(4px);
}

.compatibility-item .item-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.compatibility-item .item-content {
    flex: 1;
}

.compatibility-item .item-content strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 4px;
}

.compatibility-item .item-effect {
    font-size: 0.85rem;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 2px;
}

.compatibility-item .item-desc {
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
    font-style: italic;
}

/* Special (Cát đặc biệt) */
.compatibility-item.special {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border-left: 3px solid #FFD700;
}

.compatibility-item.special strong {
    color: #FFD700;
}

/* Harmony (Hòa) */
.compatibility-item.harmony {
    background: linear-gradient(90deg, rgba(46, 139, 87, 0.15), rgba(46, 139, 87, 0.05));
    border-left: 3px solid #2E8B57;
}

.compatibility-item.harmony strong {
    color: #98FB98;
}

/* Conflict (Hung) */
.compatibility-item.conflict {
    background: linear-gradient(90deg, rgba(205, 92, 92, 0.15), rgba(205, 92, 92, 0.05));
    border-left: 3px solid #CD5C5C;
}

.compatibility-item.conflict strong {
    color: #F08080;
}

/* =============================================================================
   RESPONSIVE - Advice & Compatibility
   ============================================================================= */

@media (max-width: 480px) {

    .thapthan-advice-section,
    .thapthan-compatibility-section {
        padding: 12px;
    }

    .advice-item,
    .compatibility-item {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .compatibility-item .item-icon {
        font-size: 1rem;
    }
}

/* =============================================================================
   THẬP THẦN RELATION KHÚC VỸ (New Engine)
   ============================================================================= */

.thapthan-relation-khucvy {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.12), rgba(160, 82, 45, 0.08));
    border-left: 4px solid #CD853F;
}

.thapthan-relation-khucvy h6 {
    color: #DEB887;
}

/* Relation Summary */
.relation-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.relation-summary .total-rating {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.relation-summary .total-rating.positive {
    background: rgba(46, 139, 87, 0.25);
    color: #98FB98;
}

.relation-summary .total-rating.negative {
    background: rgba(205, 92, 92, 0.25);
    color: #F08080;
}

.relation-summary .summary-text {
    font-size: 0.9rem;
    color: var(--text-primary, #e0e0e0);
}

/* Rating Badge in items */
.compatibility-item .rating-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    display: inline-block;
}

.compatibility-item .rating-badge.positive {
    background: rgba(46, 139, 87, 0.3);
    color: #90EE90;
}

.compatibility-item .rating-badge.negative {
    background: rgba(205, 92, 92, 0.3);
    color: #FFB6C1;
}

/* Caution type */
.compatibility-item.caution {
    background: linear-gradient(90deg, rgba(255, 165, 0, 0.15), rgba(255, 165, 0, 0.05));
    border-left: 3px solid #FFA500;
}

.compatibility-item.caution strong {
    color: #FFD700;
}

/* Neutral type */
.compatibility-item.neutral {
    background: linear-gradient(90deg, rgba(100, 100, 100, 0.15), rgba(100, 100, 100, 0.05));
    border-left: 3px solid #808080;
}

.compatibility-item.neutral strong {
    color: #C0C0C0;
}

/* Relation Group */
.relation-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =============================================================================
   COLLAPSIBLE THẬP THẦN RELATION DETAILS
   ============================================================================= */

.thapthan-relation-details {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.thapthan-relation-details[open] .toggle-icon {
    transform: rotate(90deg);
}

.relation-details-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
    transition: background 0.2s ease;
    user-select: none;
}

.relation-details-toggle:hover {
    background: rgba(0, 0, 0, 0.35);
}

.relation-details-toggle::-webkit-details-marker {
    display: none;
}

.relation-details-toggle .toggle-icon {
    font-size: 0.8rem;
    color: var(--accent-gold, #D4AF37);
    transition: transform 0.2s ease;
}

.relation-details-toggle .toggle-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
}

.relation-details-toggle .toggle-hint {
    font-size: 0.75rem;
    color: var(--text-secondary, #a0a0a0);
    font-style: italic;
    margin-left: auto;
}

.relation-details-content {
    padding: 12px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
}

/* Responsive */
@media (max-width: 480px) {
    .relation-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .relation-summary .total-rating {
        font-size: 1rem;
    }

    .compatibility-item .rating-badge {
        font-size: 0.7rem;
    }

    .relation-details-toggle {
        padding: 8px 12px;
    }

    .relation-details-toggle .toggle-text {
        font-size: 0.85rem;
    }

    .relation-details-toggle .toggle-hint {
        font-size: 0.7rem;
    }
}

/* =============================================================================
   CASUAL SUMMARY SECTION (Plain Language for General Users)
   ============================================================================= */

.thapthan-casual-summary {
    background: linear-gradient(135deg, rgba(75, 0, 130, 0.08), rgba(138, 43, 226, 0.04));
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
    border-left: 4px solid #9370DB;
}

.thapthan-casual-summary h6 {
    color: #BA55D3;
    font-size: 1.05rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Headline Section */
.summary-headline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-bottom: 16px;
}

.headline-emoji {
    font-size: 2rem;
    flex-shrink: 0;
}

.headline-main {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 4px;
}

.headline-intro {
    font-size: 0.9rem;
    color: var(--text-secondary, #a0a0a0);
}

/* Dominant Profile Badge */
.dominant-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(147, 112, 219, 0.15);
    border-radius: 8px;
    margin-bottom: 16px;
}

.profile-badge {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    background: rgba(147, 112, 219, 0.3);
    border-radius: 16px;
    color: #DDA0DD;
    white-space: nowrap;
}

.profile-desc {
    font-size: 0.9rem;
    color: var(--text-primary, #e0e0e0);
    line-height: 1.5;
}

/* Strengths/Challenges Columns */
.summary-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.summary-list {
    padding: 12px;
    border-radius: 8px;
}

.strengths-list {
    background: rgba(46, 139, 87, 0.12);
    border-left: 3px solid #2E8B57;
}

.challenges-list {
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid #FFA500;
}

.list-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 8px;
}

.summary-list ul {
    margin: 0;
    padding-left: 18px;
}

.summary-list li {
    font-size: 0.85rem;
    color: var(--text-secondary, #b0b0b0);
    margin-bottom: 4px;
    line-height: 1.4;
}

/* Insights Sections */
.insights-section {
    margin-bottom: 14px;
}

.insights-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
    margin-bottom: 10px;
}

.insight-item {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.insight-item.positive {
    background: rgba(46, 139, 87, 0.1);
    border-left: 3px solid #2E8B57;
}

.insight-item.negative {
    background: rgba(205, 92, 92, 0.1);
    border-left: 3px solid #CD5C5C;
}

.insight-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text-primary, #e0e0e0);
}

.insight-item p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary, #a0a0a0);
    line-height: 1.4;
}

/* Advice Section */
.summary-advice {
    padding: 14px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-gold, #D4AF37);
}

.advice-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold, #D4AF37);
    margin-bottom: 8px;
}

.summary-advice p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary, #e0e0e0);
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .thapthan-casual-summary {
        padding: 14px;
    }

    .summary-headline {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .headline-emoji {
        font-size: 1.8rem;
    }

    .headline-main {
        font-size: 1.05rem;
    }

    .dominant-profile {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .summary-columns {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .insight-item strong {
        font-size: 0.85rem;
    }

    .insight-item p {
        font-size: 0.78rem;
    }
}

/* =============================================================================
   ENHANCED CASUAL SUMMARY v2.0 - Additional Components
   ============================================================================= */

/* Day Master Insight Box */
.daymaster-insight {
    padding: 12px 14px;
    background: rgba(100, 149, 237, 0.12);
    border-radius: 8px;
    border-left: 3px solid #6495ED;
    margin-bottom: 16px;
}

.daymaster-insight .dm-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #87CEFA;
    display: inline-block;
    padding: 3px 10px;
    background: rgba(100, 149, 237, 0.25);
    border-radius: 12px;
    margin-bottom: 8px;
}

.daymaster-insight p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-primary, #e0e0e0);
    line-height: 1.5;
}

/* Career Suggestion */
.career-suggestion {
    padding: 12px 14px;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 8px;
    border-left: 3px solid #FFD700;
    margin-bottom: 14px;
}

.career-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFD700;
    margin-bottom: 6px;
}

.career-suggestion p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #b0b0b0);
    line-height: 1.4;
}

/* Practical Advice Box */
.practical-box {
    padding: 14px;
    background: rgba(75, 0, 130, 0.1);
    border-radius: 10px;
    border-left: 3px solid #9370DB;
    margin-bottom: 14px;
}

.practical-header {
    font-size: 0.95rem;
    font-weight: 600;
    color: #BA55D3;
    margin-bottom: 12px;
}

.practical-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.practical-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
}

.practical-item.good {
    background: rgba(46, 139, 87, 0.12);
}

.practical-item.avoid {
    background: rgba(205, 92, 92, 0.12);
}

.practical-item .label {
    font-weight: 600;
    color: var(--text-primary, #e0e0e0);
}

.practical-item .value {
    color: var(--text-secondary, #b0b0b0);
}

/* Enhanced List Headers */
.summary-list .list-header {
    font-size: 0.92rem;
    font-weight: 700;
}

.strengths-list .list-header {
    color: #98FB98;
}

.challenges-list .list-header {
    color: #FFD700;
}

/* Mobile Responsive for v2.0 components */
@media (max-width: 480px) {
    .daymaster-insight {
        padding: 10px 12px;
    }

    .daymaster-insight .dm-label {
        font-size: 0.78rem;
    }

    .daymaster-insight p {
        font-size: 0.82rem;
    }

    .career-suggestion {
        padding: 10px 12px;
    }

    .career-header {
        font-size: 0.85rem;
    }

    .career-suggestion p {
        font-size: 0.8rem;
    }

    .practical-box {
        padding: 12px;
    }

    .practical-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .practical-item {
        flex-direction: row;
        gap: 6px;
        padding: 6px 10px;
    }

    .practical-item .label {
        white-space: nowrap;
    }
}

/* =============================================================================
   CROSS-RELATION INSIGHTS (Thập Thần Phái Sinh)
   ============================================================================= */

.cross-relation-section {
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.12), rgba(186, 85, 211, 0.08));
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    border-left: 4px solid #9370DB;
}

.cross-relation-section h6 {
    color: #DDA0DD;
    margin-bottom: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cross-relation-section .section-desc {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.cross-relation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Cross Relation Item */
.cross-relation-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 14px;
    border-left: 4px solid #9370DB;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cross-relation-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.2);
}

/* Severity Classes */
.cross-relation-item.cross-danger {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.15), rgba(220, 53, 69, 0.05));
    border-left-color: #dc3545;
}

.cross-relation-item.cross-warning {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.15), rgba(255, 193, 7, 0.05));
    border-left-color: #ffc107;
}

.cross-relation-item.cross-positive {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.15), rgba(40, 167, 69, 0.05));
    border-left-color: #28a745;
}

.cross-relation-item.cross-opportunity {
    background: linear-gradient(90deg, rgba(23, 162, 184, 0.15), rgba(23, 162, 184, 0.05));
    border-left-color: #17a2b8;
}

.cross-relation-item.cross-neutral {
    background: rgba(108, 117, 125, 0.1);
    border-left-color: #6c757d;
}

/* Header Row */
.cross-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.cross-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.cross-combo-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary, #e0e0e0);
}

/* Involvement Badges */
.involvement-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.involvement-badge.dung-badge {
    background: rgba(40, 167, 69, 0.3);
    color: #90EE90;
}

.involvement-badge.ky-badge {
    background: rgba(220, 53, 69, 0.3);
    color: #FFB6C1;
}

/* Pillar Context */
.cross-pillars {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.pillar-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(147, 112, 219, 0.2);
    border-radius: 16px;
    color: #DDA0DD;
    font-weight: 500;
}

.pillar-arrow {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.9rem;
}

/* Interpretation */
.cross-interpretation {
    font-size: 0.9rem;
    color: var(--text-primary, #e0e0e0);
    line-height: 1.5;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

/* Dual Effect Box - Cát Hung Lưỡng Chiều */
.dual-effect-box {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.dual-effect-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-gold, #D4AF37);
    margin-bottom: 8px;
}

.dual-effect-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    margin: 6px 0;
    padding: 6px 8px;
    border-radius: 4px;
}

.dual-effect-item.dual-good {
    background: rgba(40, 167, 69, 0.1);
    color: #90EE90;
}

.dual-effect-item.dual-bad {
    background: rgba(220, 53, 69, 0.1);
    color: #FFB6C1;
}

.dual-icon {
    font-weight: 700;
    flex-shrink: 0;
}

.dual-text {
    flex: 1;
}

/* Exception Note */
.cross-exception {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(23, 162, 184, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #87CEEB;
    border-left: 3px solid #17a2b8;
}

.cross-exception strong {
    color: #00CED1;
}

/* Affected Persons & Body Parts */
.cross-affected {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary, #a0a0a0);
}

.affected-persons,
.affected-body {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =============================================================================
   RESPONSIVE - Cross Relation Section
   ============================================================================= */

@media (max-width: 768px) {
    .cross-relation-section {
        padding: 14px;
    }

    .cross-relation-item {
        padding: 12px;
    }

    .cross-combo-name {
        font-size: 0.9rem;
    }

    .cross-interpretation {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cross-relation-section {
        padding: 12px;
        margin-top: 16px;
    }

    .cross-relation-section h6 {
        font-size: 0.95rem;
    }

    .cross-relation-item {
        padding: 10px;
    }

    .cross-header {
        gap: 6px;
    }

    .cross-icon {
        font-size: 1.1rem;
    }

    .cross-combo-name {
        font-size: 0.85rem;
    }

    .pillar-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .cross-interpretation {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .dual-effect-box {
        padding: 8px;
    }

    .dual-effect-item {
        font-size: 0.75rem;
        padding: 5px 6px;
    }

    .cross-affected {
        flex-direction: column;
        gap: 6px;
    }

    .involvement-badge {
        font-size: 0.6rem;
        padding: 2px 5px;
    }
}