:root {
    --bg-gradient-1: #f5f7fa;
    --bg-gradient-2: #c3cfe2;
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-income: #98d8c8; /* Pastel Mint */
    --accent-expense: #ffb6b9; /* Pastel Pink */
    --accent-primary: #ff9a9e; /* Pastel Pink */
    --accent-primary-hover: #ff8a8f;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes for Glassmorphism effect */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #ffb6b9; /* Pastel pink */
    top: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #ffd1ff; /* Pastel light pink/purple */
    bottom: -50px;
    right: -50px;
    animation: float 12s ease-in-out infinite reverse;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #fdfd96; /* Pastel yellow */
    top: 40%;
    left: 60%;
    animation: float 8s ease-in-out infinite 2s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
    100% { transform: translateY(0) scale(1); }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 30px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard */
.dashboard {
    margin-bottom: 30px;
}

.balance-card {
    text-align: center;
    margin-bottom: 20px;
}

.balance-card h2 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 5px;
}

.balance-card h3 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
}

.summary-cards {
    display: flex;
    gap: 15px;
}

.summary-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.income-card .icon-wrapper {
    background: rgba(152, 216, 200, 0.3);
    color: #4cae96; /* Slightly darker pastel for icon contrast */
}

.expense-card .icon-wrapper {
    background: rgba(255, 182, 185, 0.3);
    color: #e6757b; /* Slightly darker pastel for icon contrast */
}

.summary-info h4 {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-info p {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
}

/* Chart Container (Inside Modal) */
.chart-container {
    background: transparent;
    padding: 0;
    width: 100%;
}

.chart-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.chart-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: rgba(255, 255, 255, 0.85);
    padding: 20px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-primary);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent-expense);
}

/* Add Transaction Form */
.add-transaction {
    margin-bottom: 30px;
}

.add-transaction h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.history-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-primary);
    white-space: nowrap;
}

.form-row {
    margin-bottom: 12px;
}

input, select {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

option {
    background: #ffffff;
    color: var(--text-primary);
}

input:focus, select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 154, 158, 0.3);
    background: rgba(255, 255, 255, 0.8);
}

input::placeholder {
    color: #999;
}

/* Customizing date input icon color - removing invert for light theme */
::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    cursor: pointer;
}

/* Type Selector (Radio Buttons) */
.type-selector {
    display: flex;
    gap: 10px;
}

.type-selector input[type="radio"] {
    display: none;
}

.radio-label {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

#type-income:checked + .radio-label {
    background: rgba(152, 216, 200, 0.3);
    border-color: var(--accent-income);
    color: #3b9b83;
}

#type-expense:checked + .radio-label {
    background: rgba(255, 182, 185, 0.3);
    border-color: var(--accent-expense);
    color: #d15c63;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(255, 154, 158, 0.4);
}

.submit-btn:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 154, 158, 0.5);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Transaction History */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-select {
    padding: 6px 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 11px;
    max-width: 100px;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: var(--accent-primary);
}

.transaction-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar */
.transaction-list::-webkit-scrollbar {
    width: 6px;
}

.transaction-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.transaction-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.transaction-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.t-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.t-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.t-icon.income-icon {
    background: rgba(152, 216, 200, 0.2);
    color: #4cae96;
}

.t-icon.expense-icon {
    background: rgba(255, 182, 185, 0.2);
    color: #e6757b;
}

.t-details h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.t-details p {
    font-size: 11px;
    color: var(--text-secondary);
}

.t-bank-badge {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.t-right {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 15px;
}

.t-amount {
    font-weight: 700;
    font-size: 14px;
}

.t-amount.income-amount {
    color: #4cae96;
}

.t-amount.expense-amount {
    color: #e6757b;
}

.delete-btn {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
    padding: 5px;
}

.delete-btn:hover {
    color: var(--accent-expense);
}

.empty-state {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 20px;
        border-radius: 20px;
    }
    
    .summary-cards {
        flex-direction: column;
    }
}
