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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(140deg, #f5f7fa, #ffffff);
  color: #1c1c1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically */
  padding: 80px 20px;
  min-height: 100vh;
}

h1 {
  font-size: 5rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

.subtitle {
  font-size: 1.5rem;
  color: #6e6e73;
  margin-bottom: 40px;
  text-align: center;
  animation: fadeIn 1.3s ease-out;
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  text-align: center;
  transition: all 0.3s ease-in-out;
  animation: slideUp 0.8s ease-out;
}

.subjects {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 28px;
}

button {
  background-color: #000000;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  font-size: 16px;
  cursor: pointer;
  margin: 10px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover:enabled {
  background-color: #6a6a6a;
}

button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#historySection {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-top: 40px;
  max-width: 520px;
  width: 100%;
}

#historySection.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#historySection h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 16px;
}

#historyContent {
  font-size: 0.95rem;
  color: #3a3a3c;
  line-height: 1.7;
}

@media (max-width: 600px) {
  body {
    justify-content: start; /* Align to top on small screens */
    padding-top: 40px;
  }

  h1 {
    font-size: 2rem;
  }

  .card {
    padding: 24px;
  }

  button {
    width: 100%;
    margin: 8px 0;
  }

  .subjects {
    font-size: 1.2rem;
  }

  button {
    width: 100%;
    max-width: 320px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
