/* ========================================================
   LÁ SỐ TỬ VI LA BÀN - PHONG CÁCH CỔ ĐIỂN, SIMPLE & TRANG NHÃ
   ======================================================== */

#tuvi-pro-app {
    display: block;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #24302b;
}

#tuvi-pro-app * {
    box-sizing: border-box;
}

.tv-container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
}

/* THẺ CHÍNH */
.tv-main-card {
    background-color: transparent;
    border: none;
    padding: 10px 0;
    position: relative;
}

/* TIÊU ĐỀ */
.tv-header-box {
    text-align: center;
    margin-bottom: 28px;
    border-bottom: 1px solid #e4e9e3;
    padding-bottom: 18px;
}

.tv-kicker {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #8c6418;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 6px;
}

.tv-main-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #123b32;
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.tv-sub-title {
    color: #55635c;
    font-size: 15px;
    margin: 0 auto;
    max-width: 600px;
    line-height: 1.6;
}

/* KHỐI FORM NHẬP LIỆU GỌN GÀNG */
.tv-input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.tv-input-group {
    background: #ffffff;
    border: 1px solid #e4e9e3;
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tv-group-owner {
    border: 1px solid #e4e9e3;
}

.tv-group-partner {
    border: 1px solid #e4e9e3;
}

.tv-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    border-bottom: 1px solid #edf1ed;
    padding-bottom: 8px;
}

.tv-group-header .tv-icon {
    font-size: 17px;
}

.tv-group-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #123b32;
    margin: 0;
}

.tv-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tv-label {
    font-size: 14px;
    font-weight: 700;
    color: #43514a;
    letter-spacing: 0.5px;
}

.tv-input-field {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #e4e9e3;
    background-color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    color: #1d2925;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.tv-input-field:focus {
    border-color: #123b32;
}

.tv-flex-row {
    display: flex;
    gap: 10px;
}

.tv-select {
    cursor: pointer;
}

.tv-select-highlight {
    background-color: #f7faf7;
    border-color: #123b32;
    color: #123b32;
}

/* GIỚI TÍNH BADGES */
.tv-gender-selection {
    display: flex;
    gap: 8px;
}

.tv-gender-badge {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dcd7ce;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #55625b;
}

.tv-gender-badge:has(input:checked) {
    border-color: #123b32;
    background: #f0f7f3;
    color: #123b32;
    font-weight: 700;
}

/* NÚT BẤM XUẤT LÁ SỐ CỔ ĐIỂN */
.tv-action-center {
    text-align: center;
    margin: 16px 0 20px;
}

.tv-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 32px;
    border-radius: 8px;
    background: #123b32;
    color: #f0d28d;
    font-weight: 700;
    font-size: 15px;
    border: 1px solid #123b32;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tv-btn-primary:hover {
    background: #1d5b49;
    color: #ffffff;
}

.tv-btn-icon {
    font-size: 18px;
}

/* KẾT QUẢ HIỂN THỊ */
.tv-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fbfaf6;
    border-radius: 10px;
    margin: 24px 0 18px;
    border: 1px solid #e5e0d8;
}

.tv-result-title h4 {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #123b32;
    font-size: 15px;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.tv-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #ffffff;
    color: #123b32;
    border-radius: 8px;
    border: 1px solid #123b32;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tv-btn-download:hover {
    background: #123b32;
    color: #ffffff;
}

.tv-capture-container {
    padding: 16px 0;
}

/* VÒNG TRÒN LA BÀN CỔ ĐIỂN */
.tv-compass-wheel {
    position: relative !important;
    width: 400px !important;
    height: 400px !important;
    margin: 30px auto !important;
    background: #ffffff !important;
    border: 2px solid #123b32 !important;
    border-radius: 50% !important;
    overflow: visible !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
    display: block !important;
}

/* TÂM LA BÀN - DẤU ẤN CỔ */
.tuvi-center-info {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 140px !important;
    height: 140px !important;
    margin-top: -70px !important;
    margin-left: -70px !important;
    background: #fbfaf6 !important;
    border: 2px solid #123b32 !important;
    border-radius: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    z-index: 5 !important;
    padding: 8px !important;
}

.tuvi-center-info small {
    display: block !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    color: #68766f !important;
    letter-spacing: 1px !important;
    font-weight: 700 !important;
}

.tuvi-center-info .tv-canchi-big {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #123b32 !important;
    margin: 2px 0 !important;
    line-height: 1.1 !important;
}

.tuvi-center-info .tv-year-badge {
    background: #123b32 !important;
    color: #f0d28d !important;
    padding: 3px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* 12 NÚT SỐ CUNG */
.tv-number-node {
    position: absolute !important;
    width: 38px !important;
    height: 38px !important;
    margin-top: -19px !important;
    margin-left: -19px !important;
    color: #ffffff !important;
    background: #123b32 !important;
    border: 1px solid #123b32 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    z-index: 10 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.tv-number-node:hover {
    background: #1d5b49 !important;
    color: #ffffff !important;
}

/* TOOLTIP NỔI */
.tv-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    width: 210px;
    background: #123b32;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #123b32;
    z-index: 200 !important;
    text-align: center;
    font-size: 13.5px;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tv-number-node:hover .tv-tooltip {
    visibility: visible;
    opacity: 1;
}

/* KHỐI LUẬN GIẢI CHI TIẾT (LƯỚI CỔ ĐIỂN) */
.tv-analysis-grid {
    margin-top: 30px;
}

#tuvi-pro-app .tv-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -8px !important;
}

#tuvi-pro-app .tv-col-12 {
    width: 100% !important;
    padding: 8px !important;
}

#tuvi-pro-app .tv-col-6 {
    width: 50% !important;
    padding: 8px !important;
}

#tuvi-pro-app .tv-col-4 {
    width: 33.333% !important;
    padding: 6px !important;
}

/* CÁC THẺ BÀI LUẬN GIẢI */
#tuvi-pro-app .tv-card {
    background: #ffffff !important;
    border: 1px solid #e4e9e3 !important;
    border-radius: 16px !important;
    padding: 20px 22px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

/* RESPONSIVE */
@media (max-width: 860px) {
    .tv-input-section {
        grid-template-columns: 1fr;
    }
    #tuvi-pro-app .tv-col-6 {
        width: 100% !important;
    }
    #tuvi-pro-app .tv-col-4 {
        width: 50% !important;
    }
}

@media (max-width: 600px) {
    .tv-main-card {
        padding: 20px 14px;
    }
    .tv-compass-wheel {
        transform: scale(0.75);
        margin: 0 auto !important;
    }
    .tv-flex-row {
        flex-direction: column;
        gap: 8px;
    }
    #tuvi-pro-app .tv-col-4 {
        width: 100% !important;
    }
}