/* -------------------- GLOBAL STYLES -------------------- */
* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

/* -------------------- CONTAINER -------------------- */
.app {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

h1 {
  text-align: center;
  margin-bottom: 16px;
}

/* -------------------- COUNTER DISPLAY -------------------- */
.counter-display {
  text-align: center;
  font-size: 4rem;
  font-weight: bold;
  margin: 16px 0;
  transition:
    transform 0.2s ease,
    color 0.3s ease;
}

.counter-display.bump {
  transform: scale(1.15);
}

.positive {
  color: #4ade80;
}
.negative {
  color: #f87171;
}
.zero {
  color: #60a5fa;
}

/* -------------------- BUTTONS -------------------- */
.controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

button {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 1.2rem;
  cursor: pointer;
  color: #fff;
  transition:
    transform 0.15s ease,
    background 0.2s ease;
}

button:active {
  transform: scale(0.95);
}

.btn-inc {
  background: #22c55e;
}
.btn-dec {
  background: #ef4444;
}
.btn-reset {
  background: #3b82f6;
}

button:hover {
  filter: brightness(1.1);
}

/* -------------------- HISTORY -------------------- */
.history {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.history h2 {
  font-size: 1rem;
  margin: 0 0 8px;
  text-align: center;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  font-size: 0.85rem;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
}

li.positive {
  background: rgba(34, 197, 94, 0.25);
}
li.negative {
  background: rgba(239, 68, 68, 0.25);
}
li.zero {
  background: rgba(96, 165, 250, 0.25);
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 480px) {
  .counter-display {
    font-size: 3rem;
  }
}
