/* --- CSS CHO TAB TRA CỨU --- */
.tab-button {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #4b5563; /* gray-600 */
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    cursor: pointer;
}
.dark .tab-button {
    color: #d1d5db; /* gray-300 */
}
.tab-button:hover {
    color: #16a34a; /* green-600 */
}
.dark .tab-button:hover {
    color: #f59e0b; /* amber-500 */
}
.tab-button.active {
    color: #16a34a; /* green-600 */
    border-bottom-color: #16a34a; /* green-600 */
}
.dark .tab-button.active {
    color: #f59e0b; /* amber-500 */
    border-bottom-color: #f59e0b; /* amber-500 */
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }


/* --- CSS CHO GIAO DIỆN VĂN KHẤN MỚI --- */
.van-khan-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 3rem 3.5rem;
    position: relative;
    overflow: hidden; /* Ẩn các phần thừa của họa tiết */
    font-family: 'Noto Serif', serif; /* Phông chữ mới thanh lịch hơn */
    border-radius: 8px;

    /* --- NỀN HUYỀN ẢO --- */
    background-color: #0d122b;
    background-image: 
        radial-gradient(ellipse at 70% 30%, rgba(68, 76, 136, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(111, 66, 193, 0.3) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23eab308' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    
    color: #e2d7c1; /* Màu chữ ngà */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 1px solid #c9a962;
}

/* --- HỌA TIẾT GÓC TRANG TRÍ --- */
.van-khan-container::before,
.van-khan-container::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M100 0 H50 C10 0 0 10 0 50 V100 H2 L0 100 L0 50 C0 11 11 2 50 2 H100 Z' fill='%23c9a962'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
}
.van-khan-container::before { top: 0; left: 0; transform: rotate(0deg); }
.van-khan-container::after { bottom: 0; right: 0; transform: rotate(180deg); }


/* --- BIỂU TƯỢNG HOA SEN --- */
.van-khan-emblem {
    text-align: center;
    margin-bottom: 1.5rem;
}
.van-khan-emblem .fa-leaf { /* Sử dụng lại icon lá sen */
    font-size: 2.5rem;
    color: #fde68a; /* Màu vàng kim nhạt */
    opacity: 0.8;
}

.van-khan-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fde68a; /* Màu vàng kim nhạt */
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(253, 230, 138, 0.4); /* Hiệu ứng tỏa sáng */
}

/* --- ĐƯỜNG KẺ NGĂN CÁCH --- */
.van-khan-title::after {
    content: '';
    display: block;
    width: 150px;
    height: 1px;
    background: linear-gradient(to right, transparent, #c9a962, transparent);
    margin: 1.5rem auto 0;
    opacity: 0.7;
}

.van-khan-content {
    white-space: pre-wrap;
    line-height: 2.2;
    font-size: 1.2rem;
    text-align: justify;
    column-count: 2; /* Chia thành 2 cột cho đẹp mắt */
    column-gap: 3rem;
    column-rule: 1px solid rgba(201, 169, 98, 0.2);
}
@media (max-width: 768px) {
    .van-khan-content { column-count: 1; } /* 1 cột trên điện thoại */
    .van-khan-container { padding: 2rem; }
}

.van-khan-footer {
    text-align: right;
    margin-top: 3rem;
    font-size: 1rem;
    font-style: italic;
    color: #a79277;
}

.van-khan-actions { text-align: center; margin-top: 2rem; }

.van-khan-actions button {
    background-color: #c9a962;
    color: #0d122b;
    font-weight: bold;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Be Vietnam Pro', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.van-khan-actions button:hover {
    background-color: #fde68a;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(253, 230, 138, 0.2);
}


/* --- CSS CHO CÁC PHẦN TRA CỨU KHÁC --- */
/* (Các đoạn CSS cũ cho báo cáo vận mệnh, la bàn... giữ nguyên ở dưới đây) */
.report-container { background-color: #ffffff; border-radius: 0.75rem; border: 1px solid #e5e7eb; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05); overflow: hidden; }
.dark .report-container { background-color: #1f2937; border-color: #374151; }
.report-header { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; border-bottom: 1px solid #e5e7eb; background: linear-gradient(135deg, white, #f3f4f6); }
.dark .report-header { border-color: #374151; background: linear-gradient(135deg, #1f2937, #263143); }
.report-zodiac-icon { font-size: 5rem; line-height: 1; opacity: 0.8; }
.report-main-info h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.2; color: #111827; }
.dark .report-main-info h1 { color: #f9fafb; }
.info-grid { margin-top: 0.75rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.5rem; }
.info-item, .info-item-full { font-size: 0.875rem; color: #4b5563; }
.info-item-full { grid-column: span 2 / span 2; }
.dark .info-item, .dark .info-item-full { color: #d1d5db; }
.info-item strong, .info-item-full strong { font-weight: 600; color: #1e293b; margin-left: 0.5rem; }
.dark .info-item strong, .dark .info-item-full strong { color: white; }
.report-body { padding: 1.5rem; display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1024px) { .report-body { grid-template-columns: repeat(3, 1fr); } }
.report-col-main { grid-column: span 1; display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .report-col-main { grid-column: span 2 / span 2; } }
.report-col-side { grid-column: span 1; }
.report-section { width: 100%; }
.section-title { font-size: 1.125rem; font-weight: 700; color: #0d9488; padding-bottom: 0.5rem; margin-bottom: 1rem; border-bottom: 2px solid #ccfbf1; display: flex; align-items: center; gap: 0.75rem; }
.dark .section-title { color: #5eead4; border-color: #134e4a; }
.sao-han-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; border-radius: 0.5rem; border-width: 1px; }
.sao-han-icon-container { flex-shrink: 0; }
.sao-han-poem { margin-top: 0.75rem; padding: 0.75rem; font-style: italic; font-size: 0.875rem; color: #4b5563; border-left: 3px solid; border-radius: 0 0.25rem 0.25rem 0; background-color: rgba(255, 255, 255, 0.5); }
.dark .sao-han-poem { background-color: rgba(0, 0, 0, 0.2); color: #d1d5db; }
.relations-overview-card { display: flex; align-items: stretch; gap: 1rem; padding: 0; }
.user-animal-display { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 100px; padding: 1rem; background-color: #eff6ff; border-radius: 0.5rem; }
.dark .user-animal-display { background-color: #1e3a8a; }
.user-animal-icon { font-size: 3rem; line-height: 1; color: #1d4ed8; }
.dark .user-animal-icon { color: #93c5fd; }
.user-animal-name { font-size: 1.125rem; font-weight: 700; margin-top: 0.5rem; color: #1e40af; }
.dark .user-animal-name { color: #bfdbfe; }
.user-animal-title { font-size: 0.75rem; font-weight: 500; color: #6b7280; }
.dark .user-animal-title { color: #9ca3af; }
.relations-separator { width: 1px; background-color: #e5e7eb; }
.dark .relations-separator { background-color: #374151; }
.relations-list { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.relation-row { display: flex; align-items: center; gap: 1rem; }
.relation-type-container { display: flex; flex-direction: column; align-items: center; width: 120px; flex-shrink: 0; }
.relation-type { font-weight: 600; font-size: 0.875rem; padding: 0.25rem 0.75rem; border-radius: 9999px; width: 100%; text-align: center; border: 1px solid; }
.relation-desc { font-size: 0.75rem; font-style: italic; color: #6b7280; margin-top: 0.25rem; text-align: center; }
.dark .relation-desc { color: #9ca3af; }
.relation-type.hop { background-color: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.dark .relation-type.hop { background-color: #064e3b; color: #a7f3d0; border-color: #34d399; }
.relation-type.nhi-hop { background-color: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.dark .relation-type.nhi-hop { background-color: #1e3a8a; color: #bfdbfe; border-color: #60a5fa; }
.relation-type.xung { background-color: #fef2f2; color: #991b1b; border-color: #fca5a5; }
.dark .relation-type.xung { background-color: #991b1b; color: #fecaca; border-color: #f87171; }
.relation-type.hai { background-color: #fffbeb; color: #b45309; border-color: #fcd34d; }
.dark .relation-type.hai { background-color: #78350f; color: #fde68a; border-color: #fbbf24; }
.related-animals { display: flex; gap: 1rem; }
.related-animal-item { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; font-weight: 500; }
.related-animal-icon { font-size: 2rem; line-height: 1; }
.color-section { margin-top: 1rem; }
.color-section-title { font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 0.25rem; margin-bottom: 0.75rem; border-bottom: 1px solid #e5e7eb; }
.dark .color-section-title { border-color: #374151; }
.color-section-title.hop { color: #15803d; }
.dark .color-section-title.hop { color: #4ade80; }
.color-section-title.khac { color: #b91c1c; }
.dark .color-section-title.khac { color: #f87171; }
.color-pills-container { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.color-pill { display: flex; align-items: center; gap: 0.5rem; background-color: white; border-radius: 9999px; padding: 0.25rem 0.75rem 0.25rem 0.25rem; border: 1px solid #e5e7eb; }
.dark .color-pill { background-color: #374151; border-color: #4b5563; }
.color-pill-dot { width: 1rem; height: 1rem; border-radius: 50%; }
.color-pill-text { display: flex; flex-direction: column; line-height: 1.2; }
.color-pill-name { font-weight: 600; font-size: 0.875rem; }
.color-pill-relation { font-size: 0.75rem; font-style: italic; }
.compass-pro-container { background-color: #f9fafb; padding: 1rem; border-radius: 0.5rem; border: 1px solid #e5e7eb; }
.dark .compass-pro-container { background-color: #1f2a37; border-color: #374151; }
.compass-layout { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 0.5rem; width: 100%; max-width: 450px; margin: auto; aspect-ratio: 1 / 1; }
.compass-direction, .compass-center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.5rem; border-radius: 0.5rem; text-align: center; transition: all 0.2s ease-in-out; }
.compass-center { background-color: #4f46e5; color: white; border: 2px solid #a5b4fc; box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.2); }
.dark .compass-center { background-color: #6366f1; border-color: #a5b4fc; }
.compass-direction { background-color: #f3f4f6; border: 1px solid #d1d5db; }
.dark .compass-direction { background-color: #1f2937; border-color: #4b5563; }
.compass-direction.good { background-color: #f0fdf4; border-color: #bbf7d0; }
.dark .compass-direction.good { background-color: #14532d; border-color: #22c55e; }
.compass-direction.bad { background-color: #fef2f2; border-color: #fecaca; }
.dark .compass-direction.bad { background-color: #991b1b; border-color: #ef4444; }
.direction-name { font-weight: 700; font-size: 1rem; }
.dark .direction-name { color: #f9fafb; }
.direction-meaning { font-size: 0.8rem; font-weight: 600; }
.compass-details-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.compass-detail-item { display: flex; gap: 1rem; align-items: flex-start; padding: 0.75rem; border-radius: 0.5rem; background-color: #ffffff; border: 1px solid #e5e7eb; }
.dark .compass-detail-item { background-color: #374151; border-color: #4b5563; }
.compass-detail-icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.125rem; background-color: #f3f4f6; }
.dark .compass-detail-icon { background-color: #4b5563; }
.compass-detail-title { font-weight: 700; color: #111827; }
.dark .compass-detail-title { color: #f9fafb; }
.compass-detail-desc { font-size: 0.875rem; color: #4b5563; margin-top: 0.25rem; }
.dark .compass-detail-desc { color: #d1d5db; }
.info-item.pham, .info-item-full.pham { color: #dc2626; }
.dark .info-item.pham, .dark .info-item-full.pham { color: #f87171; }
.info-item.pham strong, .info-item-full.pham strong { color: #dc2626; }
.dark .info-item.pham strong, .dark .info-item-full.pham strong { color: #f87171; }
.pham i { margin-right: 0.5rem; }