* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Times New Roman", Times, serif;
    background-color: #ffffff;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Banner trên cùng */
.top-banner {
    width: 100%;
    background-color: #0b193c;
    color: #ffffff;
    position: relative; /* Tạo mốc để đặt nút absolute bên góc trái */
    text-align: center;
    padding: 18px 15px;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.4;
}

/* Nút phóng to toàn màn hình góc trái */
#fullscreen-btn {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#fullscreen-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.banner-text {
    padding: 0 40px; /* Tránh text bị tràn vào nút phóng to */
}

/* Khung chứa bảng tính */
.container {
    width: 100%;
    max-width: 650px;
    padding: 30px 12px;
}

.calc-table {
    width: 100%;
    border-collapse: collapse;
    border: 1.5px solid #0b193c;
    font-size: 18px;
}

.calc-table th,
.calc-table td {
    border: 1px solid #444444;
    padding: 8px 10px;
    vertical-align: middle;
}

/* Tiêu đề từng phần */
.section-header th {
    background-color: #0b193c;
    color: #ffffff;
    text-align: left;
    font-size: 20px;
    font-weight: bold;
    padding: 8px 12px;
    letter-spacing: 0.5px;
}

/* Cột nhập liệu đặc tính */
.label-col {
    width: 55%;
}

.input-col {
    width: 28%;
    padding: 0 !important;
}

.unit-col {
    width: 17%;
    text-align: center;
}

.num-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    padding: 8px 6px;
    background-color: transparent;
    color: #000;
}

.num-input::placeholder {
    font-style: italic;
    color: #333333;
}

.num-input:focus {
    background-color: #f0f5ff;
}

/* Các ô lựa chọn mặt kính */
.face-name {
    width: 28%;
}

.opt-btn {
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.opt-btn:hover:not(.disabled) {
    background-color: #eef2fa;
}

/* Trạng thái đang được chọn */
.opt-btn.active {
    background-color: #d6e4ff;
    color: #0b193c;
    font-weight: bold;
}

/* Trạng thái bị vô hiệu hóa */
.opt-btn.disabled {
    background-color: #e0e0e0 !important;
    color: #9e9e9e !important;
    cursor: not-allowed;
    font-weight: normal;
}

/* Ô hiển thị kết quả */
.result-box {
    text-align: center;
    font-size: 21px;
    font-weight: bold;
    padding: 36px 12px !important;
}

#total-result {
    color: #0b193c;
    text-decoration: underline;
}

/* Tối ưu hiển thị trên màn hình điện thoại nhỏ */
@media (max-width: 480px) {
    .top-banner {
        font-size: 15px;
        padding: 12px 10px;
    }
    #fullscreen-btn {
        width: 30px;
        height: 30px;
        font-size: 15px;
        left: 10px;
    }
    .banner-text {
        padding: 0 32px;
    }
    .calc-table {
        font-size: 15px;
    }
    .section-header th {
        font-size: 17px;
    }
    .num-input {
        font-size: 15px;
    }
    .calc-table th,
    .calc-table td {
        padding: 7px 5px;
    }
    .result-box {
        font-size: 18px;
        padding: 28px 8px !important;
    }
}