.tab-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab {
    padding: 12px 25px;
    border: 1px solid #e73939;
    background-color: #fff;
    color: #e73939;
    cursor: pointer;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
	font-size: 16px;
}

.tab:hover {
    background-color: #e73939;
    color: #fff;
}

.tab.active {
    background-color: #e73939;
    color: #fff;
}

.form-container {
    display: none;
    max-width: 100%;
    margin: 0 auto;
}

.form-container.active {
    display: block;
}

.result-container {
    max-width: 100%;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tab-container {
    text-align: center;
    color: #e73939;
    font-size: 28px;
    margin-bottom: 20px;
}

.phongthuy_form {
    font-family: Arial, Helvetica, sans-serif;
    position: relative;
    width: 100%;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 0;
    font-size: 14px;
}

.phongthuy_form * {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.phongthuy_form:before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
}

.phongthuy_form.loading:before {
    opacity: .7;
    visibility: visible;
}

.phongthuy_form .form-title {
    border-bottom: 1px solid #e73939;
    padding: 0 0 0px;
    font-size: 20px;
    font-weight: 700;
    color: #121212;
    text-align: left;
    margin-bottom: 20px;
}

.phongthuy_form .form-title span {
    display: inline-block;
    position: relative;
    text-transform: uppercase;
    font-weight: 600;
}

.phongthuy_form .form-title span:after {
    content: '';
    width: 100%;
    height: 4px;
    background-color: #e73939;
    position: absolute;
    left: 0;
    bottom: -2px;
}

.phongthuy_form .form-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
}

.phongthuy_form .form-line .label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
    text-align: left;
}

.phongthuy_form .form-line select {
    display: block;
    width: 100%;
    height: 45px;
    line-height: 45px;
    padding: 0 40px 0 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    -webkit-appearance: none;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAFCAYAAAB8ZH1oAAAABGdBTUEAALGPC/xhBQAAAHBJREFUCB1djjsOgDAMQ5NerXdBYmRADCAmBhgZGBDcpO3N+sFBRAIiNXbsN5SdcwMzj0SUSikJGsU/L6ITfzAWhRD6nPMk/j8AT2ttdYNSAu4Az28Q0A6ohhajBYLFGNPqjXJTSLOP4s+N9379hDgux4UotvsoUK0AAAAASUVORK5CYII=);
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) 50%;
    outline: none;
    box-shadow: none;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s ease;
}

.phongthuy_form .form-line select:focus {
    border-color: #408dd1;
}

.phongthuy_form .form-line input[type="button"] {
    display: inline-block;
    height: 45px;
    line-height: 45px;
    padding: 0 30px;
    background-color: #0072d5;
    color: #ffffff;
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s ease;
    margin-top: 25px;
}

.phongthuy_form .form-line input[type="button"]:hover {
    background-color: #c62828;
}

.phongthuy_form .form-line table {
    margin: 0;
    border: none;
    width: 100%;
    display: flex;
    gap: 15px;
}

.phongthuy_form .form-line table tr {
    border: none;
    display: flex;
    gap: 15px;
    width: 100%;
}

.phongthuy_form .form-line table tr td {
    padding: 0;
    border: none;
    flex: 1;
}

.phongthuy_popup {
    font-size: 16px;
    color: #333;
    text-align: justify;
}

.phongthuy_popup p {
    padding: 10px 0px;
}

.phongthuy_popup * {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* Định dạng tiêu đề */
.color_green {
    color: #e73939;
    font-size: 24px;
    font-weight: 700;
}

/* Định dạng nhãn thông tin */
.boldLabel {
    font-weight: bold;
    color: #333;
}

/* Định dạng tiêu đề phụ */
.boldCenter {
    font-weight: bold;
    text-align: center;
    color: #333;
    margin: 10px 0;
}

.phongthuy_popup h1 {
    font-size: 24px;
    font-weight: 700;
    color: #e73939;
    margin-bottom: 20px;
}

.phongthuy_popup ul {
    margin-left: 20px;
    padding-left: 15px;
}

.phongthuy_popup ul li {
    margin-bottom: 10px;
}

/* Định dạng bảng Bát Quái */
.phongthuy_popup table {
    margin: 20px auto;
    border-collapse: separate;
    border-spacing: 2px;
}

/* Định dạng hình ảnh Bát Quái */
.phongthuy_popup img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Định dạng đoạn văn bản nguồn tham khảo */
.phongthuy_popup p {
    padding: 10px 0;
}

/* Định dạng thời gian cập nhật */
.phongthuy_popup hr + p {
    font-style: italic;
    color: #666;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .phongthuy_form .form-line {
        flex-wrap: wrap;
        gap: 10px;
    }

    .phongthuy_form .form-line table tr {
        flex-wrap: wrap;
    }

    .phongthuy_form .form-line table tr td {
        flex: 100%;
    }

    .phongthuy_form .form-line input[type="button"] {
        width: 100%;
        text-align: center;
    }
}

/* Thước Lỗ Ban styles (tích hợp từ loban.css) */
#thuocloban-result {
    margin-top: 20px;
}

#thuocloban-result p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.cung, .khoang {
    display: inline-block;
    text-align: center;
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cung.tot, .khoang.tot {
    color: #ff0000;
    font-weight: bold;
}

.cung.xau, .khoang.xau {
    color: #000000;
}

/* Container chứa thước */
#lobanOuter {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Style cho các phần tử thước */
#loban-wrapper {
    width: 100%;
    overflow-x: auto;
    position: relative;
}

#loban-scroller {
    width: 100%;
    white-space: nowrap;
}

#loban-thelist {
    list-style: none;
    display: inline-block;
}

#loban-thelist li {
    display: inline-block;
    vertical-align: top;
}

#loban-thelist img {
    max-width: none;
}

/* Thanh nhập số đo */
#container-sodo {
    margin: 10px 0;
    text-align: center;
}

#container-sodo input {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

/* Ghi chú và tiêu đề */
.loban-note {
    text-align: center;
    margin: 10px 0;
    font-style: italic;
    color: #666;
}

.loban-t {
    margin: 5px 0;
    font-size: 14px;
}

.loban-522, .loban-429, .loban-388 {
    font-weight: bold;
}

/* Box hướng dẫn */
.box_huongdan {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.tdbox_hd {
    font-weight: bold;
    margin-bottom: 10px;
    color: #055699;
}

.noidung_boxhd {
    font-size: 14px;
    line-height: 1.6;
}

/* Style bổ sung cho thước động */
#thuocloban-result .cung, #thuocloban-result .khoang {
    padding: 5px;
    box-sizing: border-box;
}

#thuocloban-result .cung {
    height: 40px;
    line-height: 30px;
}

#thuocloban-result .khoang {
    height: 40px;
    line-height: 20px;
}

/* Đơn vị tính */
#thuocloban-result div[style*="text-align: right"] {
    font-style: italic;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .tab-list {
        flex-direction: column;
    }

    .tab {
        padding: 10px;
        text-align: center;
    }

    .tab:last-child {
       
    }

    .form-group select,
    .form-group input {
        font-size: 14px;
    }

    button {
        width: 100%;
        padding: 12px;
    }

    #container-sodo input {
        width: 100%;
    }

    .cung, .khoang {
        font-size: 10px;
    }
}