/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Header */
header {
    background-image: url('https://cdn.create.vista.com/api/media/small/12028364/stock-vector-green-leaves-texture');
    background-size: cover;
    background-position: center;
    position: relative;
}

.header-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 2rem 1rem;
    text-align: center;
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Form Section */
.input-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 0.875rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input::placeholder {
    color: #94a3b8;
}

/* Button */
.submit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Expense Section */
.expense-section h2 {
    font-size: 1.75rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: #f1f5f9;
}

th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

tbody tr:hover {
    background-color: #f8fafc;
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.category-food { background: #fef3c7; color: #92400e; }
.category-travel { background: #dbeafe; color: #1e40af; }
.category-bills { background: #fce7f3; color: #9d174d; }
.category-entertainment { background: #f0f9ff; color: #0369a1; }
.category-shopping { background: #f0fdf4; color: #166534; }
.category-other { background: #f5f5f4; color: #57534e; }

/* Total Card */
.total-card {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.total-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.total-amount {
    font-size: 2rem;
    font-weight: 700;
}

/* Delete Button */
.delete-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #fecaca;
}

/* Responsive Design */
@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .submit-btn {
        width: auto;
        margin-left: auto;
    }
}

@media (min-width: 768px) {
    .header-overlay {
        padding: 3rem 1rem;
    }
    
    header h1 {
        font-size: 3rem;
    }
    
    .container {
        padding: 3rem 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 4rem 2rem;
    }
    
    .input-section,
    .expense-section {
        padding: 2.5rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state img {
    width: 200px;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

tbody tr {
    animation: fadeIn 0.3s ease-out;
}

/* Print Styles */
@media print {
    .submit-btn,
    .delete-btn {
        display: none;
    }
    
    .table-container {
        box-shadow: none;
    }
}
