/* styles.css */
body {
  font-family: 'Kaiti', 'KaiTi', 'KaiTi SC', 'STKaiti', 'AR PL KaitiM GB', serif;
  margin: 0;
  padding: 0;
  background: #f0f4f8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 1rem;
}

#week-info {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

#phrase-buttons {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

#phrase-buttons > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#phrase-buttons button {
  background-color: #e0e0e0;
  color: black;
  border: none;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  font-size: clamp(2.4rem, 5vw, 4rem);  /* Significantly larger */
  cursor: pointer;
  font-family: inherit;
  /*width: 100%;*/
  text-align: left;
  white-space: nowrap;
  overflow-x: auto;
  word-wrap: normal;
}



#phrase-buttons button:hover {
  background-color: #d0d0d0;
}

.controls {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  width: 100%;
  max-width: 600px;
  margin-top: auto;
}

.controls button {
  flex: 1;
  margin: 0 0.5rem;
  background-color: #4a90e2;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.controls button:hover {
  background-color: #357ab8;
}

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  /* Let width adjust but keep it reasonable */
  width: auto;
  max-width: 90vw;
  min-width: 200px;
  text-align: center;

  /* Allow text to wrap naturally */
  white-space: normal;

  /* Remove scroll bar */
  overflow: visible;

  /* Font styles */
  font-family: 'Noto Sans SC', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;  /* Adjust as needed */
  color: #222;
}

.modal-content p:first-of-type {
  white-space: nowrap;   /* Pinyin never wraps */
  font-family: 'YourPreferredFontForPinyin', sans-serif;
  font-size: 1.4rem; /* adjust size */
  margin-bottom: 0.5rem;
}

.modal-content p:last-of-type {
  white-space: normal;   /* English can wrap */
  font-family: 'YourPreferredFontForEnglish', serif;
  font-size: 1.2rem; /* adjust size */
}


.close {
  float: right;
  font-size: 1.2rem;
  cursor: pointer;
}
