body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: linear-gradient(to right, red, yellow);
}

/* Expense Tracker Container */
.expense-tracker {
    background-image: linear-gradient(pink, blue, pink, purple, rgb(20, 223, 57));
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

/* Heading */
h1 {
    text-align: center;
    color: #0c0707;
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #0d0101;
}

input[type="text"], 
input[type="number"], 
input[type="date"] {
    width: calc(100% - 10px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Buttons */
button.add-expense-btn {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button.add-expense-btn:hover {
    background-color: #33b300;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    border: 1px solid #9d0d0d;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #5100ff;
    color: white;
}

/* Delete Button */
.delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #a71d2a;
}

/* Total Amount */
.total {
    text-align: center;
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #0a0202;
}

/* RESPONSIVE DESIGN */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .expense-tracker {
        width: 80%;
        max-width: 350px;
        padding: 15px;
    }

    table {
        font-size: 14px;
    }

    button.add-expense-btn {
        font-size: 14px;
        padding: 8px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    body {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    .expense-tracker {
        width: 95%;
        max-width: 320px;
        padding: 15px;
    }

    th, td {
        padding: 6px;
        font-size: 12px;
    }

    button.add-expense-btn {
        font-size: 14px;
        padding: 8px;
    }

    input[type="text"], 
    input[type="number"], 
    input[type="date"] {
        width: 100%;
    }
}

/* Larger screens (Laptops and Desktops) */
@media (min-width: 1024px) {
    .expense-tracker {
        max-width: 450px;
    }
}
