@charset "UTF-8";

@font-face {
  font-family: 'mabinogi_classic';
  src: url('https://s3.ap-northeast-2.amazonaws.com/dessert-map.bucket/mobinogi/font/Mabinogi_Classic_OTF.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Pretendard-Regular';
  src: url('https://s3.ap-northeast-2.amazonaws.com/dessert-map.bucket/mobinogi/font/Pretendard-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg-color: #f4f6f8;
  --text-color: #2d3436;
  --header-blue-text: #0984e3;
  --header-bg: #2d3436;
  --header-text: white;
  --nav-bg: #dfe6e9;
  --nav-text: #2d3436;
  --nav-scrollbar-track: #dfe6e9;
  --nav-scrollbar-thumb: #b2bec3;
  --container-bg: white;
  --section-bg: #f9f9f9;
  --section-border: #dfe6e9;
  --button-bg: #0984e3;
  --button-text: white;
  --button-hover-bg: #74b9ff;
  --action-btn-bg: none;
  --action-btn-border: #0984e3;
  --action-btn-text: #0984e3;
  --notification-bg: #e7f1ff;
  --notification-border: #b3d4fc;
  --notification-text: #2d3436;
  --modal-bg: rgba(0, 0, 0, 0.5);
  --modal-content-bg: white;
  --modal-content-text: #2d3436;
  --footer-bg: #dfe6e9;
  --footer-text: #2d3436;
  --input-bg: white;
  --input-border: #dfe6e9;
  --input-text: #2d3436;
}

/* 모든 요소에 box-sizing 적용 */
*, *:before, *:after {
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard-Regular';
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-width: 300px;
}

/* 사이드바 활성화 시 본문 스크롤 비활성화 */
body.no-scroll {
  overflow: hidden;
}

button, input, select, textarea {
  font-family: 'Pretendard-Regular';
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
}

header {
  font-family: 'mabinogi_classic';
  background: var(--header-bg);
  color: var(--header-text);
  padding: 1rem;
  text-align: center;
  font-size: 1.3rem;
}

footer {
  font-family: 'mabinogi_classic';
  text-align: center;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: var(--footer-bg);
  color: var(--footer-text);
  z-index: 2;
}

.divide {
	color: var(--notification-border);
}

/* 버튼 디자인 */
button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

button.default-style {
  background: var(--button-bg);
  color: var(--button-text);
  font-family: 'mabinogi_classic';
}

button.default-style:hover {
  background: var(--button-hover-bg);
}

.action-btn {
  background: var(--action-btn-bg);
  border: 1px solid var(--action-btn-border);
  color: var(--action-btn-text);
  font-weight: bold;
  cursor: pointer;
}

.action-btn:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

/*약간 캐주얼한*/
.casual-btn {
	font-family: 'mabinogi_classic';
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.registered-label {
  color: green;
  font-weight: bold;
  font-size: 0.9rem;
}

.save-notice {
  display: none;
  color: #ff0000;
  margin-right: 10px;
}

.save-notice.changed {
  display: inline;
}

.action-btn#save-btn {
  display: none;
}

.action-btn#save-btn.changed {
  display: inline-block;
}

#save-btn {
  background-color: #f1f2f6;
}

.danger-style {
    background-color: #e95051 !important;
    color: #fff !important;
    border: none !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 4px !important;
    text-decoration: none !important;
}
.danger-style:hover {
    background-color: #e17055;
}

.header-nav-wrapper {
	position: relative; 
}
.header-nav-wrapper.hide-on-scroll {
  transform: translateY(-2.5rem); /* site-header 높이만큼 위로 밀기 */
}
/* 헤더 스타일 조정 */
.site-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0.75rem 1rem;
  position: static;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: 3.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  padding: 0 2rem;
}

.site-title {
  margin: 0;
  font-size: 1.1rem;
  text-align: center;
  flex-grow: 1;
}

.menu-toggle-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--header-text);
  cursor: pointer;
  padding: 0.5rem;
  position: absolute;
  left: 1rem;
}

.header-actions {
  position: absolute;
  right: 1rem;
}

.login-btn {
  background: var(--button-bg);
  color: var(--button-text);
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.login-btn:hover {
  background: var(--button-hover-bg);
}

/* 페이지 헤더 스타일 */
.page-header {
  padding: 0.75rem 1rem;
  background: var(--bg-color);
  border-bottom: 1px solid var(--section-border);
  position: relative;
}

.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.page-title {
  font-family: 'mabinogi_classic';
  font-size: 1.2rem;
  margin: 0;
  text-align: center;
}

/* 슬라이드 메뉴 스타일 */
.slide-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background: var(--nav-bg);
  color: var(--nav-text);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 999;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.slide-menu.open {
  transform: translateX(0);
}

.slide-menu-content {
  padding: 1rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.menu-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--nav-text);
  cursor: pointer;
  align-self: flex-end;
  margin-bottom: 1rem;
}

.menu-group {
  margin-bottom: 1rem;
}

.menu-group:not(:last-child)::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--nav-text);
  opacity: 0.3;
  margin: 0.5rem 0;
}

.menu-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-group li {
  margin-bottom: 0.5rem;
}

.menu-group a {
  text-decoration: none;
  color: var(--nav-text);
  font-weight: bold;
  font-family: 'mabinogi_classic';
  font-size: 1.1rem;
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}

.menu-group a:hover {
  background: var(--button-hover-bg);
  color: var(--button-text);
}

.theme-toggle-btn {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--nav-text);
  border-radius: 6px;
  text-align: left;
  font-family: 'mabinogi_classic';
  font-weight: bold;
}

.theme-toggle-btn:hover {
  background: var(--button-hover-bg);
  color: var(--button-text);
}

/* 컨테이너 스타일 복구 */
.container {
  max-width: 900px;
  margin: 2rem auto;
  margin-top: 1rem;
  background: var(--container-bg);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

/* 섹션 스타일 복구 */
.section {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 8px;
}

.section.selected-tasks {
  background: var(--section-bg);
  border: 1px solid var(--section-border);
}

.section.all-tasks {
  background: var(--section-bg);
  border: 1px solid var(--section-border);
}

h2 {
  font-family: 'mabinogi_classic';
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section.selected-tasks h2 {
  color: var(--header-blue-text);
}

.section.all-tasks h2 {
  color: var(--text-color);
}

.checkbox-task .left {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

.task-text {
  cursor: pointer;
  flex-grow: 1;
}

.task-text:hover {
  text-decoration: underline;
}

.task-entry {
  justify-content: space-between;
}

li input[type="checkbox"] {
  margin-right: 0.5rem;
}

.controls {
  text-align: right;
  margin-top: 1.5rem;
}


/* 알림 스타일 복구 */
.notification {
  background: var(--notification-bg);
  border: 1px solid var(--notification-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  font-size: 0.95rem;
  color: var(--notification-text);
}

.notification p {
  margin: 0;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.modal-title {
  flex-grow: 1;
  text-align: center;
  margin: 0 0 1rem 0;
  font-family: 'mabinogi_classic';
}

.modal-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 다크모드 스타일 */
body.dark-mode {
  --bg-color: #1a1a1a;
  --text-color: #e0e0e0;
  --header-blue-text: #42a5f5;
  --header-bg: #121212;
  --header-text: #ffffff;
  --nav-bg: #2d2d2d;
  --nav-text: #e0e0e0;
  --nav-scrollbar-track: #2d2d2d;
  --nav-scrollbar-thumb: #666666;
  --container-bg: #2d2d2d;
  --section-bg: #252525;
  --section-border: #3a3a3a;
  --button-bg: #165c9a;
  --button-text: #ffffff;
  --button-hover-bg: #42a5f5;
  --action-btn-bg: none;
  --action-btn-border: #1e88e5;
  --action-btn-text: #1e88e5;
  --notification-bg: #37474f;
  --notification-border: #546e7a;
  --notification-text: #e0e0e0;
  --modal-bg: rgba(0, 0, 0, 0.7);
  --modal-content-bg: #2d2d2d;
  --modal-content-text: #e0e0e0;
  --footer-bg: #121212;
  --footer-text: #e0e0e0;
  --input-bg: #3a3a3a;
  --input-border: #546e7a;
  --input-text: #e0e0e0;
}

body.dark-mode .slide-menu {
  background: var(--nav-bg);
  color: var(--nav-text);
}

body.dark-mode .menu-group a {
  color: var(--nav-text);
}

body.dark-mode .menu-group a:hover {
  background: var(--button-hover-bg);
  color: var(--button-text);
}

body.dark-mode .menu-group:not(:last-child)::after {
  background: var(--nav-text);
}

body.dark-mode .page-title {
  color: var(--text-color);
}

body.dark-mode .menu-toggle-btn {
  color: var(--header-text);
}

body.dark-mode .theme-toggle-btn {
  color: var(--nav-text);
}

body.dark-mode .theme-toggle-btn:hover {
  background: var(--button-hover-bg);
  color: var(--button-text);
}

body.dark-mode .section.selected-tasks h2,
body.dark-mode .section.all-tasks h2 {
  color: var(--header-blue-text);
}

body.dark-mode .task-text:hover {
  text-decoration: underline;
  color: #81d4fa;
}

body.dark-mode #save-btn {
  background-color: #3a3a3a;
}

/* 기존 nav 스타일 제거 */
nav {
  display: none;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
  .site-header {
    padding: 0.5rem;
    height: 3rem;
  }

  .header-inner {
    padding: 0 1.5rem;
  }

  .site-title {
    font-size: 1rem;
  }

  .menu-toggle-btn {
    font-size: 1.3rem;
    padding: 0.3rem;
    left: 0.5rem;
  }

  .header-actions {
    right: 0.5rem;
  }

  .login-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
  }

  .page-header {
    padding: 0.5rem;
  }

  .page-title {
    font-size: 1rem;
  }

  .slide-menu {
    width: 200px;
  }

  .menu-group a {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }

  .theme-toggle-btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  .container {
    margin: 2rem auto;
    margin-top: 1rem;
    padding: 0.25rem; 
  }

  .section {
    margin-top: 0.7em;
    padding: 0.5rem;
  }

  h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  ul {
    padding: 0;
  }

  li {
    padding: 0.5rem;
  }

  .sub-category-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .task-text {
    font-size: 1rem;
    line-height: 1.6;
  }

  .sub-tasks {
    gap: 0.75rem;
  }

  .sub-task-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .notification {
    font-size: 0.9rem;
    padding: 0.75rem;
  }
}

#userInfoBtn {
  position: absolute;
  display: none;
  z-index: 1500;
}

#userInfoModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background: var(--modal-bg);
  z-index: 2000;
}

#userInfoModal .modal-body {
  background: var(--modal-content-bg);
  color: var(--modal-content-text);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

#userInfoModal .user-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'mabinogi_classic';
}

#userInfoModal .user-info-list li {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--section-border);
  font-family: 'mabinogi_classic';
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#userInfoModal .user-info-list li:nth-child(odd) {
  background: var(--section-bg);
}

#userInfoModal .user-info-list li:last-child {
  border-bottom: none;
}

#userInfoModal .user-info-list .label {
  font-weight: bold;
  color: var(--header-blue-text);
}

#userInfoModal .user-info-list .value {
  font-family: 'Pretendard-Regular';
  margin-left: auto;
  text-align: right;
  display: block;
}

#userInfoModal .info-accordion-btn {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-weight: bold;
  font-family: 'mabinogi_classic';
  cursor: pointer;
  padding: 0 1rem 0 0;
  position: relative;
}

#userInfoModal .info-accordion-btn::after {
  content: '\25BC';
  position: absolute;
  right: 0;
  transition: transform 0.2s;
}

#userInfoModal .info-accordion-btn.open::after {
  transform: rotate(180deg);
}

#userInfoModal .info-accordion-content {
  display: none;
  margin-top: 0.5rem;
  padding-left: 1rem;
}

.author-signature {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--section-border);
  font-family: 'mabinogi_classic';
  font-size: 0.9rem;
}

.author-signature .signature-heading {
  margin: 0 0 0.5rem;
  font-weight: bold;
  color: var(--header-blue-text);
}

.author-signature .user-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.author-signature .user-info-list li {
  display: flex;
  align-items: center;
  width: calc(50% - 0.5rem);
}

.author-signature .user-info-list .label {
  font-weight: bold;
  color: var(--header-blue-text);
}

.author-signature .user-info-list .value {
  margin-left: auto;
  font-family: 'Pretendard-Regular';
}

.author-signature .signature-modal-btn {
  background: none;
  border: none;
  font-family: 'mabinogi_classic';
  padding: 0;
  cursor: pointer;
}
#userInfoModal .rune-grade-엘리트 {
    background-color: #9656ff;
    color: white;
}

#userInfoModal .rune-grade-에픽 {
    background-color: #ea16a8;
    color: white;
}

#userInfoModal .rune-grade-전설 {
    background-color: #ec6016;
    color: white;
}

#userInfoModal .rune-grade-원형 {
    background-color: #e1c541;
    color: white;
}

#userInfoModal .rune-grade-신화 {
    background-color: #FFD700;
    color: white;
}

#userInfoModal .rune-grade-유니크 {
    background-color: #f4e9d4;
    color: #474541;
}
