/* 기본 리셋 */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: white;
  overflow: hidden;

  /* background.js가 body에 배경을 넣는 방식과 호환 */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 숨김 */
.hidden {
  display: none !important;
}

/* 배경 위에 어두운 오버레이(가독성) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}

/* 가운데 정렬용 레이어 */
#clock,
#greeting,
#todo-form {
  position: relative; /* 오버레이 위로 */
  z-index: 1;
}

/* 시계 */
#clock {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-size: clamp(64px, 10vw, 140px);
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 0 6px 24px rgba(0,0,0,0.45);
}

/* 인삿말 */
#greeting {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translateX(-50%);
  margin: 0;
  font-size: clamp(18px, 3vw, 44px);
  font-weight: 700;
  text-shadow: 0 6px 24px rgba(0,0,0,0.45);
}

/* 투두 입력 폼(가운데 아래) */
#todo-form {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translateX(-50%);
  width: min(520px, 80vw);
}

#todo-form input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.85);
  padding: 10px 8px;
  font-size: 18px;
  color: white;
  text-align: center;
  outline: none;
}

#todo-form input::placeholder {
  color: rgba(255,255,255,0.75);
}

/* 투두 리스트 */
#todo-list {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translateX(-50%);
  width: min(520px, 80vw);
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  z-index: 1;
}

#todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  margin: 6px 0;
  border-radius: 12px;
  background: rgba(0,0,0,0.20);
  backdrop-filter: blur(6px);
}

#todo-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#todo-list button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

/* 로그아웃 버튼 */
#logout-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.6);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

#logout-btn:hover {
  background: rgba(255,255,255,0.15);
}

/* 로그인 폼 (처음에만 중앙) */
#login-form {
  position: absolute;
  left: 50%;
  top: 72%;
  transform: translateX(-50%);
  width: min(360px, 75vw);
  z-index: 2;
  text-align: center;
}

#login-form input[type="text"] {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.85);
  padding: 10px 8px;
  font-size: 18px;
  color: white;
  text-align: center;
  outline: none;
}

#login-form input[type="text"]::placeholder {
  color: rgba(255,255,255,0.75);
}

#login-form input[type="submit"] {
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.25);
  color: white;
  border-radius: 999px;
  cursor: pointer;
}

/* 날씨: 우측 상단 */
#weather {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  font-size: 14px;
  text-shadow: 0 6px 24px rgba(0,0,0,0.45);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 명언: 하단 중앙 */
#quote {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  z-index: 1;
  text-align: center;
  text-shadow: 0 6px 24px rgba(0,0,0,0.45);
  line-height: 1.5;
}

#quote .quote {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

#quote .translation {
  display: block;
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 6px;
}

#quote .author {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

#weather {
  display: flex;
  align-items: center;
  gap: 8px;
}

#weather img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}