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

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #16213e 50%, #0f0f1e 100%);
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 40px;
    align-items: start;
}

/* Form Container Styles */
.formContainer {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 20px;
    transition: all 0.4s ease;
}

.formContainer:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

.header {
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo i {
    font-size: 40px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 107, 107, 0.3));
}

.logo-text h2 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #e0e6ed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.2;
}

.logo-text span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Styles */
.budget-form {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.form-group label i {
    color: #ff6b6b;
    width: 18px;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.3));
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 18px 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group option {
    background: #1a1a2e;
    color: #ffffff;
}

.submitBtn {
    width: 100%;
    padding: 20px 28px;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.submitBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252 0%, #ffab00 100%);
}

.submitBtn:active {
    transform: translateY(-1px);
}

/* Summary Cards */
.summary-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.summary-card {
    display: flex;
    align-items: center;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.income-card::before {
    background: linear-gradient(90deg, #00f5a0, #00d9f5);
}

.expense-card::before {
    background: linear-gradient(90deg, #ff6b6b, #feca57);
}

.balance-card::before {
    background: linear-gradient(90deg, #4facfe, #00f2fe);
}

.card-icon {
    font-size: 28px;
    margin-right: 20px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.income-card .card-icon {
    color: #00f5a0;
    background: rgba(0, 245, 160, 0.1);
}

.expense-card .card-icon {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.balance-card .card-icon {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.card-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content span {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

/* Transactions Section */
.transactions-section {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 600px;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.transactions-header h3 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 16px;
}

.transactions-header h3 i {
    color: #ff6b6b;
    filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.3));
}

.transactions-count {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 24px;
    display: block;
    color: rgba(255, 255, 255, 0.2);
}

.empty-state h4 {
    font-size: 24px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.empty-state p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.4);
}

/* Transaction Item Styles */
.transactionStyle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    animation: slideIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.transactionStyle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: all 0.5s ease;
}

.transactionStyle.income::before {
    background: linear-gradient(180deg, #00f5a0, #00d9f5);
}

.transactionStyle.expense::before {
    background: linear-gradient(180deg, #ff6b6b, #feca57);
}

.transactionStyle:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.transaction-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(10px);
}

.transaction-icon.income {
    background: rgba(0, 245, 160, 0.15);
    color: #00f5a0;
    box-shadow: 0 0 20px rgba(0, 245, 160, 0.3);
}

.transaction-icon.expense {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.transaction-details h4 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.transaction-details p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 500;
}

.transaction-amount {
    text-align: right;
    margin-right: 20px;
}

.transaction-amount .amount {
    font-size: 20px;
    font-weight: 800;
    display: block;
}

.transaction-amount .amount.income {
    color: #00f5a0;
    text-shadow: 0 0 10px rgba(0, 245, 160, 0.3);
}

.transaction-amount .amount.expense {
    color: #ff6b6b;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Filter Section Styles */
.filter-section {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-filter label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.date-filter label i {
    color: #ff6b6b;
    width: 18px;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.3));
}

.date-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-family: inherit;
}

.date-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 12px 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.filter-btn i {
    font-size: 12px;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .formContainer {
        position: relative;
        top: 0;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    .form-group input,
    .form-group select,
    .date-input {
        -webkit-appearance: none;
        appearance: none;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid rgba(255, 255, 255, 0.2) !important;
        color: #ffffff !important;
        font-size: 16px !important;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .date-input:focus {
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: #ff6b6b !important;
        box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1) !important;
    }
    
    .form-group input::placeholder {
        color: rgba(255, 255, 255, 0.5) !important;
    }
    
    .formContainer,
    .transactions-section,
    .filter-section {
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .summary-card {
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .transactionStyle {
        background: rgba(255, 255, 255, 0.06) !important;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Enhanced mobile styles for better iOS compatibility */
@media (max-width: 768px) {
    body {
        padding: 10px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }
    
    .formContainer,
    .transactions-section {
        padding: 20px;
        border-radius: 16px;
        margin-bottom: 15px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .header {
        margin-bottom: 30px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .logo i {
        font-size: 32px;
    }
    
    .logo-text h2 {
        font-size: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 16px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-group input:focus,
    .form-group select:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: #ff6b6b;
        box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    }
    
    .form-group input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
    
    .submitBtn {
        padding: 18px 24px;
        font-size: 16px;
        border-radius: 12px;
        background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
        border: none;
        color: white;
        font-weight: 700;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .summary-cards {
        flex-direction: column;
        gap: 15px;
    }
    
    .summary-card {
        padding: 20px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-right: 16px;
    }
    
    .card-content h4 {
        font-size: 12px;
    }
    
    .card-content span {
        font-size: 20px;
    }
    
    .transactions-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .transactions-header h3 {
        font-size: 22px;
    }
    
    .filter-section {
        padding: 16px;
        margin-bottom: 20px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .filter-controls {
        gap: 16px;
    }
    
    .date-input {
        padding: 14px 16px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.8);
        -webkit-appearance: none;
        appearance: none;
    }
    
    .filter-btn i {
        font-size: 11px;
    }
    
    .transactionStyle {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 20px;
        background: rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .transaction-info {
        width: 100%;
        gap: 15px;
    }
    
    .transaction-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .transaction-details h4 {
        font-size: 16px;
    }
    
    .transaction-details p {
        font-size: 13px;
    }
    
    .transaction-amount {
        align-self: flex-end;
        margin-right: 0;
    }
    
    .transaction-amount .amount {
        font-size: 18px;
    }
    
    .delete-btn {
        align-self: flex-end;
        padding: 8px 14px;
        font-size: 11px;
        background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
        border: none;
        color: white;
        -webkit-appearance: none;
        appearance: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    .formContainer,
    .transactions-section {
        padding: 16px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .logo-text h2 {
        font-size: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid rgba(255, 255, 255, 0.2);
        color: #ffffff;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-group input:focus,
    .form-group select:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: #ff6b6b;
        box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    }
    
    .form-group input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
    
    .submitBtn {
        padding: 16px 20px;
        font-size: 15px;
        background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
        border: none;
        color: white;
        font-weight: 700;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .summary-card {
        padding: 16px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
        margin-right: 12px;
    }
    
    .card-content span {
        font-size: 18px;
    }
    
    .transactions-header h3 {
        font-size: 20px;
    }
    
    .filter-section {
        padding: 12px;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .filter-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 14px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.8);
        -webkit-appearance: none;
        appearance: none;
    }
    
    .transactionStyle {
        padding: 16px;
        background: rgba(255, 255, 255, 0.06);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .transaction-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .transaction-details h4 {
        font-size: 15px;
    }
    
    .transaction-amount .amount {
        font-size: 16px;
    }
}