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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #ededed 0%, #dfdfdf 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.outputDiv {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 24px;
  font-weight: 300;
  color: #2c3e50;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.outputDiv:hover {
  border-color: #667eea;
  transform: translateY(-1px);
}

.operand1, .operator, .operand2 {
  margin: 0 5px;
}

.number-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

button {
  border: none;
  border-radius: 12px;
  padding: 18px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.number {
  background: linear-gradient(145deg, #ffffff, #f1f3f4);
  color: #2c3e50;
  border: 1px solid #e9ecef;
}

.number:hover {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border-color: #667eea;
}

button.operator {
  background: linear-gradient(145deg, #667eea, #5a6fd8);
  color: white;
  font-weight: 600;
}

.plus-min {
  background: linear-gradient(145deg, #6c757d, #5a6268);
  color: white;
}

.clear {
  background: linear-gradient(145deg, #dc3545, #c82333);
  color: white;
  font-weight: 600;
}

.ce {
  background: linear-gradient(145deg, #fd7e14, #e8681e);
  color: white;
  font-weight: 600;
}

.count {
  background: linear-gradient(145deg, #28a745, #218838);
  color: white;
  font-weight: 600;
  font-size: 20px;
}

/* Special grid positioning for better layout */
.clear {
  grid-column: span 2;
}

.ce {
  grid-column: span 1;
}

.count {
  grid-column: span 1;
}

/* Responsive design */
@media (max-width: 480px) {
  .container {
    padding: 20px;
    margin: 10px;
  }
  
  button {
    padding: 15px;
    font-size: 16px;
  }
  
  .outputDiv {
    font-size: 20px;
    min-height: 70px;
    padding: 15px;
  }
  
  .number-buttons {
    gap: 10px;
  }
}

/* Subtle animations at start*/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeIn 0.6s ease-out;
}