@font-face {
    font-family: '양진체';
    src: url('https://fastly.jsdelivr.net/gh/supernovice-lab/font@0.9/yangjin.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}


body {
  margin: 0;
  padding: 0;
  background: #f0f0f0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 모코코 */
.mokoko {
  width: 644px;
  height: 644px;
  bottom: -290px; /* 화면 아래 위치 */
  position: absolute; /* 절대 위치로 설정 */
  background-image: url('assets/mokoko_sprite.png');
  background-size: 200% auto; /* 가로에 프레임 2개라면 */
  background-position: left top;
  transition: left 0.2s ease, top 0.2s ease, transform 0.2s ease;
}

/* CSS 가상 클래스, 요소 위에 마우스 올리면...*/
.mokoko:hover {
  transform: translateY(-80px); /* 살짝 띄움 */
}

/* 클릭 시 오른쪽 프레임으로 변경하는 클래스 */
.mokoko.clicked {
  background-position: right top; 
}


/* 메뉴 */
.menu-icon {
  position: absolute;
  object-fit: cover;
  width: 50px; /* 메뉴 아이콘 크기 */
  height: 50px; /* 메뉴 아이콘 크기 */
  top: 25px; /* 화면 위쪽 위치 */
  right: 20px; /* 화면 오른쪽 위치 */
  cursor: pointer;
}

/* 로그인 아이콘 */
.user-icon {
  visibility: hidden; /* 초기에는 숨김 */
  position: absolute;
  object-fit: cover;
  width: 50px; /* 로그인 아이콘 크기 */
  height: 50px; /* 로그인 아이콘 크기 */
  top: 85px; /* 메뉴 바 아래 위치 */
  right: 20px;
  cursor: pointer;
}



/* 체크 아이콘 */
.toDo-icon {
  visibility: hidden; /* 초기에는 숨김 */
  position: absolute;
  object-fit: cover;
  width: 50px; /* 체크 아이콘 크기 */
  height: 50px; /* 체크 아이콘 크기 */
  top: 145px; /* 화면 위쪽 위치 */
  right: 20px; /* 화면 오른쪽 위치 */
  cursor: pointer;
}

/* 할 일 팝업 */
.todo-popup {
  position: fixed;
  top: 215px;
  right: 20px;
  width: 300px;
  background-color: white;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 1001;
  border-radius: 10px;
}

.todo-popup-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "양진체";
}

.todo-popup .close-todo {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
}

#todo-form {
  display: flex;
  gap: 5px;
}

#todo-form input {
  flex: 1;
}

#todo-list {
  list-style: none;
  padding: 0;
}

#todo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f1f1;
  padding: 5px 10px;
  margin-top: 5px;
  border-radius: 5px;
}

.todo-popup button {
  font-family: '양진체', sans-serif;
}

#todo-list li.completed {
  background: #d1ffd1; /* 완료된 할 일은 연한 초록색 배경 */
  opacity: 0.6;
}


/* 입력창 스타일 통일 */
.styled-input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  font-size: 18px;
  font-family: '양진체';
  border: 2px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

/* 입력창 포커스 시 스타일 */
.styled-input:focus {
  border-color: #92d050;
  outline: none;
}



/* 메뉴 아이콘 애니메이션 */
@keyframes slideDown {
  from {
    transform: translateY(-30%); /*어디서부터 날라오는가*/
  }
  to {
    transform: translateY(0);
  }
}
.slideDown {
  visibility: visible;
  animation: slideDown 0.1s forwards;
}


/* 시계 */
.clock {
  position: absolute;
  top: 130px; /* 화면 아래 위치 */
  color: #000000;
  display: flex;
  flex-direction: column; /* 세로 정렬 */
  align-items: center;     /* 중앙 정렬 */
  gap: 4px;
}

#time {
  font-family: '양진체';
  font-size: 70px;
}

#date {
  font-family: '양진체';
  font-size: 20px;
}

/* 날씨 */
.weather {
  position: absolute;
  top: 25px;
  left: 30px;
  font-family: '양진체';
  font-size: 30px;
  color: #000000;
  padding: 10px;
  border-radius: 5px;
  transition: font-size 0.2s ease;
}


/* 구글 검색창 */
.google-search {
  position: absolute;
  top: 250px; /* 시계보다 아래에 배치 */
  display: flex;
  justify-content: center;
  width: 100%;
}

.search-form {
  display: flex;
  gap: 10px;
  font-family: '양진체';
}

.search-input {
  padding: 10px 15px;
  font-size: 20px;
  border: 2px solid #ccc;
  border-radius: 20px; /* 검색창 모서리 둥글기 */
  width: 500px;
}

.search-button img { /* 검색 아이콘 크기 조정 */
  width: 30px; 
  height: 30px;
  filter: brightness(0) invert(1); /* 흰색으로 변경 */
}

.search-input:focus {
  outline: none;
  border-color: #4cc452;
}


/* 검색 버튼 */
.search-button {
  padding: 10px 20px;
  background-color: #4cc452;
  color: white;
  border: none;
  border-radius: 40px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s;
}
/* 검색 버튼 호버 효과 : 색깔 진해짐*/
.search-button:hover {
  background-color: #409944;
}




/* 로그인 창 */
/* 팝업되면 뒤에 반투명해지는 배경 */
.login-popup {
  display: none; /* 처음엔 숨김 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw; /* 화면 크기 비례 */
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* 반투명 배경 */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 팝업 박스 */
.login-popup-content {
  display: none; /* 처음엔 숨김 */
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  width: 500px;
  flex-direction: column;
  gap: 10px;
  font-family: '양진체';
  animation: fadeIn 0.3s ease-out;
}

.login-popup-content button {
  font-size: 24px;
  font-family: '양진체';
  text-align: center;
  padding: 10px;   /* 위아래 10px 공간 주기 */
  box-sizing: border-box; /* 패딩이 크기 안에 포함되도록 */
  cursor: pointer;       /* 마우스 올리면 손가락 커서 */
}


/* 닫기 버튼 */
.close-btn {
  align-self: flex-end;
  font-size: 24px;
  cursor: pointer;
}

/* 간단한 등장 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}



/* 모코코 이름 */
.mokoko-name {
  display: none; /* 처음엔 숨김 */
  position: absolute;
  bottom: 20px; /* 모코코 위에 위치 */
  left: 75%;
  transform: translateX(-50%); /* 중앙 정렬 */
  color: #000000;
  font-family: '양진체';
  font-size: 24px;
  flex-direction: column; /* 세로 정렬 */
  align-items: center;     /* 중앙 정렬 */
}