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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

h1 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 5px;
}

.date {
    font-size: 0.9rem;
    color: #999;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.card-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.card-content h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.amount {
    font-size: 2rem;
    font-weight: bold;
}

.highlight {
    font-size: 2.3rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.category-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.toggle-btn {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.category-section {
    margin-bottom: 40px;
    animation: slideIn 0.4s ease;
}

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

.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.category-total {
    font-size: 1.8rem;
    font-weight: bold;
}

.items-grid {
    display: grid;
    gap: 15px;
}

.item-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.item-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.item-total {
    font-size: 1.3rem;
    font-weight: bold;
    color: #667eea;
}

.item-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.item-costs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.cost-label {
    color: #666;
}

.cost-value {
    font-weight: 600;
    color: #333;
}

.breakdown-chart {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.breakdown-chart h2 {
    margin-bottom: 20px;
    color: #333;
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bar {
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    color: white;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.bar:hover {
    transform: scale(1.02);
}

.cost-breakdown {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    color: white;
}

.cost-breakdown h2 {
    margin-bottom: 30px;
    text-align: center;
}

.pie-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.pie-segment {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.pie-segment:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.3);
}

.pie-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.pie-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
    text-align: center;
    color: #666;
}

footer p {
    margin: 10px 0;
}

.small {
    font-size: 0.85rem;
    color: #999;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .amount {
        font-size: 1.5rem;
    }
    
    .highlight {
        font-size: 1.8rem;
    }
    
    .category-toggle {
        flex-direction: column;
    }
    
    .toggle-btn {
        width: 100%;
    }
}

.hidden {
    display: none;
}
