* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f4f8;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

h1 {
    margin: 20px 0;
    color: #333;
}

.btn {
    padding: 10px 16px;
    margin: 4px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #a71d2a;
    transform: scale(1.05);
}

.btn-outline {
    background-color: white;
    color: #333;
    border: 1px solid #ccc;
}

.btn-outline:hover {
    background-color: #f1f1f1;
    transform: scale(1.05);
}

.counter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 20px;
    width: 100%;
    max-width: 1200px;
}

.counter {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 250px;
    transition: transform 0.3s, opacity 0.3s;
    opacity: 1;
}

.counter.added {
    animation: fadeIn 0.5s ease-in-out;
}

.counter.removed {
    animation: fadeOut 0.5s ease-in-out forwards;
}

.counter:hover {
    transform: translateY(-5px);
}

.counter h2 {
    margin-bottom: 20px;
    color: #444;
}

.counter-value {
    font-size: 48px;
    margin-bottom: 20px;
    color: #333;
    transition: color 0.3s, transform 0.2s;
}


.positive {
    color: #28a745;
}

.negative {
    color: #dc3545;
}

.zero {
    color: #333;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}