* {
    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: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.tab {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: #f8f9fa;
    border: none;
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.tab:hover {
    background: #e9ecef;
}

.tab.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

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

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1em;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card.savings {
    border-left-color: #10b981;
}

.card.needs {
    border-left-color: #3b82f6;
}

.card.wants {
    border-left-color: #f59e0b;
}

.card h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #333;
}

.card .percentage {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 10px;
}

.card.savings .percentage {
    color: #10b981;
}

.card.needs .percentage {
    color: #3b82f6;
}

.card.wants .percentage {
    color: #f59e0b;
}

.card .amount {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.card .description {
    color: #666;
    line-height: 1.6;
}

.expense-tracker {
    margin-top: 20px;
}

.expense-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.expense-item input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.expense-item button {
    padding: 12px 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.expense-item button:hover {
    background: #dc2626;
}

.add-expense {
    width: 100%;
    padding: 15px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s ease;
}

.add-expense:hover {
    background: #059669;
}

.total-bar {
    margin-top: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.total-bar h4 {
    margin-bottom: 10px;
    color: #333;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.progress-fill.under {
    background: #10b981;
}

.progress-fill.over {
    background: #ef4444;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.summary-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.summary-item .label {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.summary-item .value {
    color: #333;
    font-size: 1.3em;
    font-weight: bold;
}