@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* 기본 설정 */
* {
  text-align: center;
  font-family: "Pretendard";
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-color: rgb(133, 173, 198);
  color: #000;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 상단 영역 */
header {
  width: 100%;
  padding: 16px 0;
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
}

.title {
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
}

.menuButton {
  position: absolute;
  left: 1rem;
  border: none;
  background-color: transparent;
  font-size: 2rem;
  cursor: pointer;
}

/* 사이드바 디자인 */
.menuList {
  position: fixed;
  top: 0;
  left: -100%;
  width: 70%;
  max-width: 320px;
  height: 100vh;
  padding: 24px 0;
  background-color: #f5f5f5;
  transition: left 0.3s ease;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
}

.closeMenu {
  align-self: flex-start;
  margin-left: 16px;
  font-size: 2rem;
  cursor: pointer;
  background: transparent;
}

.week {
  border: none;
  background: transparent;
  font-size: 2rem;
  color: #3b1f1f;
  cursor: pointer;
}

#calendar {
  border: none;
  background: transparent;
  font-size: 2rem;
  color: #3b1f1f;
  text-align: center;
}

.darkMode {
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
}

/* 날짜 표시 영역 */
.dateBox {
  margin-top: 8px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.date {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

#currentDateText {
  font-size: 1.5rem;
  font-weight: 600;
}

/* 메인 영역 */
main {
  width: 100%;
  max-width: 600px;
  margin-top: 24px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.inputArea {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.input {
  width: 280px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
  text-align: left;
  font-size: 1rem;
}

.enter {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background-color: white;
  cursor: pointer;
  font-size: 1rem;
}

#total {
  font-size: 1rem;
  font-weight: 600;
}

#todoList {
  width: 100%;
  list-style: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#todoList li {
  width: 100%;
  max-width: 500px;
  padding: 10px 14px;
  border-radius: 10px;
  background-color: white;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

#todoList li input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#todoList span {
  flex: 1;
  background: transparent;
  font-size: 1.1rem;
  word-break: break-word;
}

#todoList li button {
  border: none;
  background: transparent;
  color: red;
  cursor: pointer;
  font-size: 0.95rem;
  flex-shrink: 0;
}

/* 다크모드 디자인 */
body.darkTheme {
  background-color: black;
  color: white;
}

body.darkTheme .menuList {
  background-color: gray;
}

body.darkTheme .title,
body.darkTheme .menuButton,
body.darkTheme .closeMenu,
body.darkTheme .week,
body.darkTheme #calendar,
body.darkTheme .darkMode,
body.darkTheme .date,
body.darkTheme #currentDateText,
body.darkTheme #total,
body.darkTheme #todoList span {
  color: white;
}

body.darkTheme .input,
body.darkTheme .enter,
body.darkTheme #todoList li {
  background-color: #2d2c2c;
  color: white;
  border: 1px solid #555;
}

body.darkTheme .deleteButton {
  color: white;
}
