@import url('https://fonts.googleapis.com/css2?family=Khmer&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

.khmer-font {
    font-family: "Khmer", sans-serif;
    font-weight: 400;
    font-style: normal;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    user-select: none;
}

html, body {
    font-family: "Khmer", sans-serif;
    scrollbar-width: none;
}

header {
    padding: 20px;
}

.list-blog {
    background-color: #e4e4e4;
    padding: 10px;
    width: 500px;
    margin: 0 auto;
    border-radius: 30px;
}

header a {
    text-decoration: none;
    color: black;
    transition: all 0.5s ease-out;
}

header a:hover {
    text-decoration: underline;
    color: red;
}

header ul {
    justify-content: center;
    list-style: none;
    display: flex;
    gap: 20px;
}

.active {
    text-decoration: underline;
    color: red;
}

input {
    font-family: "Khmer", sans-serif;
}

label {
    font-size: 16px;
    font-weight: bold;
    margin-right: 10px;
    color: #333;
}

input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;         
    transition: 0.3s;    
}

input[type="number"]:focus {
    border-color: red; 
    outline: none;
    box-shadow: 0 0 5px rgba(240, 44, 0, 0.5);
}

.input-blog > .card__ {
    margin-bottom: 15px;
}


.card__ {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

section {
    text-align: center;
    max-width: 350px;
    margin: 0 auto;
    padding: 20px;
}

#calculateButton {
    padding: 8px 12px;
    font-family: "Khmer", sans-serif;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 80px;         
    transition: 0.3s; 
    cursor: pointer;   
}

#calculateButton:focus {
    border-color: red; 
    outline: none;
    box-shadow: 0 0 5px rgba(240, 44, 0, 0.5);
}

#calculateButton:hover {
    border-color: red; 
    outline: none;
    box-shadow: 0 0 5px rgba(240, 44, 0, 0.5);
}

#resetButton {
    padding: 8px 12px;
    font-family: "Khmer", sans-serif;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    width: 180px;         
    transition: 0.3s; 
    cursor: pointer;
}

#resetButton:focus {
    border-color: red; 
    outline: none;
    box-shadow: 0 0 5px rgba(240, 44, 0, 0.5);
}

#resetButton:hover {
    border-color: red; 
    outline: none;
    box-shadow: 0 0 5px rgba(240, 44, 0, 0.5);
}

article {
    max-width: 600px;
    margin: 0 auto;
    padding-inline: 10px;
}

.table-container {
    width: 100%;
    max-width: 800px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid black;
    border-bottom: none;
    background-color: #f0f0f0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid black;
    padding: 8px;
    text-align: center;
    font-size: 14px;
}

thead th {
    background-color: #e0e0e0;
    font-weight: bold;
}

thead th:first-child, tbody td:first-child {
    text-align: left;
    padding-left: 10px;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.btn-blog {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.img-index {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.img-section {
    padding: 10px;
}

@media (max-width: 498px) {
    .list-blog {
        width: 300px;
    }

    .list-name {
        font-size: 10px;
    }

    label {
        font-size: 14px;
    }

    input[type="number"] {
        padding: 6px 10px;  
        width: 180px;
    }

    section {
        max-width: 330px;
        padding-inline: 20px;
    }

    #calcullateButton {
        padding: 6px 10px;
    }

    #resetButton {
        padding: 6px 10px;
    }
    header {
        position: sticky;
        top: 0;
    }
    .img-section {
        padding: 5px;
    }
}

@media (max-width: 328px) {
    input[type="number"] {
        padding: 6px 10px;  
        width: 170px;
    }
    header {
        position: sticky;
        top: 0;
    }
    .img-section {
        padding: 5px;
    }
}


