/* -------- Reset / Base -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #f4f4f4;
  color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* -------- Layout -------- */

#container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
  background-color: #ccc;
  border-radius: 6px;
}

/* Header */
header img {
  max-width: 120px;
  
}

#heading {
  margin-top: 0.5rem;
}

/* -------- Calculator -------- */

.calculator-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

/* Display */
input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.4rem;
  text-align: right;
  border: none;
  background: #e9e9e9;
}

/* Cells */
td {
  padding: 0.25rem;
}

/* Buttons */
button {
  width: 100%;
  height: 3rem;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  background: #dcdcdc;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background: #c8c8c8;
}

button:active {
  transform: scale(0.96);
}

/* Special buttons (optional styling) */
button[value="="] {
  background: #4caf50;
  color: white;
}

/* Calendar display */
#calendar {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

/* -------- Responsive Design -------- */

/* Tablet */
@media (max-width: 768px) {
  button {
    height: 3.5rem;
    font-size: 1.3rem;
  }

  input[type="text"] {
    font-size: 1.6rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  #container {
    padding: 0.5rem;
  }

  button {
    height: 4rem;
    font-size: 1.4rem;
  }

  input[type="text"] {
    font-size: 1.8rem;
    padding: 1rem;
  }

  header img {
    max-width: 90px;
  }
}
