/* Import fun font */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

body {
  font-family: 'Fredoka One', sans-serif;
  background: linear-gradient(120deg, #f8a5c2, #f78fb3, #f8a5c2);
  color: #2d3436;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

.calculator {
  background: #fff;
  border: 5px solid #ff6b81;
  border-radius: 20px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  text-align: center;
}

.mascot {
  font-size: 40px;
  cursor: pointer;
  margin-bottom: 5px;
}

.greeting {
  font-size: 20px;
  margin-bottom: 10px;
}

.screen {
  background: #f1f2f6;
  border: 2px solid #ff6b81;
  border-radius: 10px;
  padding: 15px;
  font-size: 28px;
  margin-bottom: 15px;
  word-wrap: break-word;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.buttons button {
  font-size: 20px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #ffcccc;
  color: #2d3436;
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
}

.buttons button:active {
  transform: scale(0.95);
}

.operator {
  background: #ffb8b8;
}

.equal {
  background: #55efc4;
}

.clear {
  background: #fab1a0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
}

.controls button {
  font-size: 14px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: #ffeaa7;
  cursor: pointer;
  transition: background 0.2s;
}

.controls button:active {
  background: #fdcb6e;
}

.volume-control {
  margin: 10px 0;
}

.history {
  text-align: left;
  margin-top: 10px;
}

.history h4 {
  margin: 5px 0;
}

#history-list {
  list-style: none;
  padding-left: 0;
  max-height: 120px;
  overflow-y: auto;
  margin: 0;
}

#history-list li {
  background: #ffeaa7;
  margin: 3px 0;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

#history-list li:hover {
  background: #fdcb6e;
}

.clear-history {
  margin-top: 5px;
  background: #fab1a0;
  border: none;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
}




.dark {
  background: linear-gradient(120deg, #636e72, #2d3436, #636e72);
  color: white;
}

.dark .calculator {
  background: #2d3436;
  color: #fff;
  border-color: #00cec9;
}

.dark .screen {
  background: #636e72;
  color: #fff;
  border-color: #00cec9;
}

.dark .buttons button {
  background: #b2bec3;
  color: #2d3436;
}

.dark .operator {
  background: #74b9ff;
}

.dark .equal {
  background: #55efc4;
}

.dark .clear {
  background: #fab1a0;
}

.dark .controls button {
  background: #636e72;
  color: #fff;
}

.dark .controls button:active {
  background: #b2bec3;
}

.dark #history-list li {
  background: #636e72;
  color: #fff;
}

.dark #history-list li:hover {
  background: #b2bec3;
}

