/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 5px;
}

.header h1 i {
    margin-right: 10px;
    color: #ffd700;
}

.date {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Cards */
.budget-card, .expense-form-card, .quick-amounts {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Budget Display */
.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.budget-header h2 {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.refresh-btn {
    background: none;
    border: none;
    color: #667eea;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #f0f0f0;
    transform: rotate(180deg);
}

.budget-amount {
    text-align: center;
    margin-bottom: 15px;
}

.currency {
    font-size: 1.5rem;
    color: #666;
    vertical-align: top;
}

.amount {
    font-size: 3rem;
    font-weight: 300;
    color: #2c3e50;
}

.budget-status {
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

.status-positive {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-negative {
    background: #f8d7da;
    color: #721c24;
}

/* Form Styles */
.expense-form-card h3 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #333;
    font-weight: 500;
}

.expense-form-card h3 i {
    margin-right: 10px;
    color: #667eea;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 15px;
    color: #666;
    font-weight: 500;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 35px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

.submit-btn i {
    margin-right: 8px;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Quick Amounts */
.quick-amounts h4 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.quick-btn {
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #666;
    font-weight: 500;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.toast-message {
    font-weight: 500;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.success .toast-icon {
    color: #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.error .toast-icon {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }
    
    .budget-card, .expense-form-card, .quick-amounts {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .amount {
        font-size: 2.5rem;
    }
    
    .quick-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 320px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .amount {
        font-size: 2rem;
    }
    
    .quick-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}
