/* General Styling */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --border-color: #e0e0e0;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    width: 100%;
    max-width: 600px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
}

.total-expense h2 {
    font-weight: 600;
    font-size: 1.5rem;
}

#total-amount {
    color: var(--primary-color);
}

/* Form Styling */
.form-container h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: #555;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #357abd;
}

/* Expense List Styling */
.expense-list-container {
    margin-top: 2.5rem;
}

.expense-list-container h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: #555;
}

.expense-list {
    list-style-type: none;
    padding: 0;
}

.expense-list li {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
}

.expense-list li .expense-info {
    display: flex;
    flex-direction: column;
}

.expense-list li .expense-text {
    font-weight: 600;
    font-size: 1.1rem;
}

.expense-list li .expense-category {
    font-size: 0.8rem;
    color: #777;
    background-color: #eee;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    align-self: flex-start;
    margin-top: 0.3rem;
}

.expense-list li .expense-amount {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--danger-color);
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 1rem;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    right: -35px;
}

.expense-list li:hover .delete-btn {
    opacity: 1;
}
