/* รีเซ็ตพื้นฐานของ HTML */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Itim', sans-serif;
    background-color: #f4f7fa;
    color: #333;
    margin: 0;
    padding: 0;
}

h1, input, button, table, th, td {
    font-family: 'Itim', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.container:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    font-size: 40px;
    color: #3498db;
    margin-bottom: 30px;
}

form {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

input[type="date"],
input[type="text"],
input[type="number"],
button {
    padding: 15px;
    font-size: 18px;
    border-radius: 10px;
    border: 1px solid #ddd;
    width: 100%;
    transition: all 0.3s ease;
}

input:focus,
button:focus {
    outline: none;
    border-color: #3498db;
}

button {
    background-color: #2ecc71;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

th {
    background-color: #3498db;
    color: white;
    text-transform: uppercase;
}

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

tr:hover {
    background-color: #e8f4fc;
    cursor: pointer;
}

.delete-button {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #c0392b;
}

/* สไตล์สำหรับคอมพิวเตอร์ */
@media (min-width: 769px) {
    .container {
        padding: 40px;
    }

    h1 {
        font-size: 48px;
    }

    form {
        gap: 30px;
    }

    input, button {
        padding: 20px;
        font-size: 20px;
    }

    table th, table td {
        font-size: 18px;
    }
}

/* สไตล์สำหรับโทรศัพท์มือถือ */
@media (max-width: 768px) {
    body {
        background-color: #f4f4f4;
    }

    .container {
        margin: 10px;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        background-color: #ffffff;
        border-radius: 10px;
    }

    h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    form {
        flex-direction: column;
        gap: 10px;
    }

    input, button {
        padding: 15px;
        font-size: 16px;
    }

    table th, table td {
        padding: 10px;
        font-size: 14px;
    }

    button {
        font-size: 16px;
    }
}

/* สำหรับหน้าจอโทรศัพท์ขนาดเล็ก */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    form {
        gap: 5px;
    }

    input, button {
        padding: 12px;
        font-size: 14px;
    }

    table th, table td {
        padding: 8px;
        font-size: 12px;
    }
}
