/* Bát Trạch Container */
.bat-trach-container {
    background-color: transparent;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 100%;
    color: #2c3e50;
    margin: 0;
    box-sizing: border-box;
}

.bat-trach-container h3 {
    text-align: center;
    color: #d4a017;
    font-size: 30px;
    margin: 0 0 4px;
    font-family: 'Times New Roman', serif;
}

/* Result Section */
.result {
    padding: 4px;
    border: 1px solid #d4a017;
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff, #ffffff);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2),
                -2px -2px 4px rgba(255, 255, 255, 0.3);
}

.result p {
    text-align: justify;
    font-size: 14px;
    margin: 5px 0;
}

.name-gua-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.color-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-container {
    flex: 1;
    margin-right: 10px;
    text-align: left;
    min-width: 120px;
}

.color-container:last-child {
    margin-right: 0;
}

.color-container p {
    margin-bottom: 5px;
    font-weight: bold;
    color: #d4a017;
}

.color-item {
    position: relative;
    margin-bottom: 5px;
    padding-left: 25px;
    min-height: 15px;
    font-size: 13px;
}

.color-circle {
    position: absolute;
    left: 0;
    top: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.note-text {
    font-style: italic;
    color: #555;
    font-size: 12px;
}

.direction-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
}

.direction-container {
    flex: 1;
    margin-right: 10px;
    min-width: 150px;
}

.direction-container:last-child {
    margin-right: 0;
}

.direction-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.direction-table th, .direction-table td {
    border: 1px solid #d4a017;
    padding: 8px;
    text-align: left;
    font-size: 13px;
}

.direction-table th {
    background-color: #5a2c02;
    color: #ffdd99;
}

.good-direction {
    color: #28a745;
    font-weight: bold;
}

.bad-direction {
    color: #dc3545;
    font-weight: bold;
}

.current-good {
    color: #28a745;
    font-weight: bold;
}

.current-bad {
    color: #dc3545;
    font-weight: bold;
}

.remedy-text {
    white-space: pre-line;
    font-size: 13px;
}

/* Button Styles */
.button-container {
    display: flex;
    flex-wrap: nowrap; /* Ngăn xuống dòng, giữ 3 nút trên cùng 1 hàng */
    gap: 10px;
    width: 96%;
    margin: 10px 10px ;
    box-sizing: border-box;
    justify-content: space-between; /* Đảm bảo các nút phân bố đều */
}

.bat-trach-btn, .export-btn, .view-compass-btn {
    flex: 1 1 0; /* Các nút chia đều không gian */
    min-width: 0; /* Cho phép nút co lại nếu cần */
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 8px 8px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3),
                -2px -2px 4px rgba(255, 255, 255, 0.5),
                inset 1px 1px 2px rgba(255, 255, 255, 0.7),
                inset -1px -1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.bat-trach-btn:hover, .export-btn:hover, .view-compass-btn:hover {
    background-color: #d35400;
}

.bat-trach-btn:active, .export-btn:active, .view-compass-btn:active {
    transform: scale(0.95);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-text {
    background: #ffdd99;
    padding: 20px;
    border-nil    border-radius: 8px;
    color: #2c3e50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Các class mới bổ sung */
.section-title {
    font-weight: bold;
    color: #d4a017;
    font-size: 18px;
    margin: 15px 0 8px;
    padding-bottom: 3px;
    border-bottom: 1px solid #d4a017;
}

.info-row {
    margin-bottom: 10px;
}

.huyen-khong-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.practical-application {
    margin-top: 10px;
}

.flying-star-good {
    color: #28a745;
    font-weight: bold;
}

.flying-star-bad {
    color: #dc3545;
    font-weight: bold;
}

.flying-star-neutral {
    color: #6c757d;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 600px) {
    .bat-trach-container {
        padding: 4px;
        margin: 2px 2px;
        width: calc(100% - 2px);
    }

    .bat-trach-container h3 {
        font-size: 32px;
    }

    .result p {
        font-size: 12px;
    }

    .color-container {
        min-width: 100px;
    }

    .direction-container {
        min-width: 120px;
    }

    .direction-table th, .direction-table td {
        font-size: 12px;
        padding: 6px;
    }

    .button-container {
        flex-wrap: nowrap; /* Vẫn giữ 3 nút trên 1 hàng */
        gap: 8px; /* Giảm khoảng cách giữa các nút trên mobile */
    }

    .bat-trach-btn, .export-btn, .view-compass-btn {
        font-size: 12px;
        padding: 6px 10px; /* Giảm padding cho mobile */
    }
}

@media (max-width: 360px) {
    .bat-trach-container {
        padding: 2px;
        margin: 2px 2px;
    }

    .bat-trach-container h3 {
        font-size: 20px;
    }

    .result p {
        font-size: 11px;
    }

    .color-container {
        min-width: 80px;
    }

    .direction-container {
        min-width: 100px;
    }

    .direction-table th, .direction-table td {
        font-size: 11px;
        padding: 5px;
    }

    .button-container {
        flex-wrap: nowrap; /* Vẫn giữ 3 nút trên 1 hàng */
        gap: 6px; /* Giảm thêm khoảng cách */
    }

    .bat-trach-btn, .export-btn, .view-compass-btn {
        font-size: 11px;
        padding: 5px 8px; /* Giảm padding thêm cho màn hình rất nhỏ */
    }
}
