* {
    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;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.summary-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2563eb;
}

.amount.positive {
    color: #059669;
}

.amount.negative {
    color: #dc2626;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.category-card.ingresos::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.category-card.gastos::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.category-card.futuro::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.category-card.probabilidades::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.category-total {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 0.5rem 1rem;
    border-radius: 12px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.item:hover {
    background: #e2e8f0;
    border-left-color: #3b82f6;
    transform: translateX(5px);
}

.item-name {
    font-weight: 500;
    color: #374151;
    text-transform: capitalize;
}

.item-value {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .amount {
        font-size: 2rem;
    }
    
    .category-total {
        font-size: 1.4rem;
    }
}

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

.category-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(2) {
    animation-delay: 0.1s;
}

.category-card:nth-child(3) {
    animation-delay: 0.2s;
}

.category-card:nth-child(4) {
    animation-delay: 0.3s;
}

