/* -------------------- 기본 레이아웃 -------------------- */
body {
  background-color: white;
  color: black;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* -------------------- 사이드바 -------------------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 180px;
  height: 100%;
  background-color: #f4f4f4;
  padding: 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar.hide {
  transform: translateX(-100%);
}

.sidebar h3 {
  margin-top: 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 10px 0;
}

.sidebar a {
  text-decoration: none;
  color: #333;
}

/* -------------------- 사이드바 토글 버튼 -------------------- */
.sidebar-toggle {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1100;
  background-color: #444;
  color: white;
  border: none;
  padding: 6px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 4px;
}

/* -------------------- 메인 콘텐츠 -------------------- */
.main-content {
  flex: 1;
  padding: 40px;
  background-color: #d9d8d8;
  margin-left: 180px;
}

/* -------------------- 메뉴 버튼 -------------------- */
.menu-button {
  display: block;
  background-color: #ffffff;
  color: #333;
  text-decoration: none;
  padding: 12px 20px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: background-color 0.3s;
  text-align: center;
  font-weight: bold;
}

.menu-button:hover {
  background-color: #e0e0e0;
}

/* -------------------- 댓글 폼 -------------------- */
#commentForm {
  max-width: 600px;
  margin: 40px auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#commentForm input[type="text"],
#commentForm textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  resize: vertical;
}

#commentForm button {
  background-color: #007bff;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#commentForm button:hover {
  background-color: #0056b3;
}

/* -------------------- 댓글 리스트 -------------------- */
#commentList {
  max-width: 600px;
  margin: 20px auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#commentList div,
.comment-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
}

.comment-card button.delete-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}

.comment-card button.delete-button:hover {
  background-color: #b02a37;
}

/* -------------------- 공지사항 박스 -------------------- */
.notice-box {
  background-color: #fff8dc;
  border: 1px solid #f0c36d;
  padding: 15px;
  margin: 20px;
  border-radius: 8px;
  font-family: 'Arial', sans-serif;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.notice-box h2 {
  margin-top: 0;
  color: #d2691e;
}

.notice-box p {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

/* -------------------- 푸터 -------------------- */
.footer {
  background-color: #f2f2f2;
  text-align: center;
  padding: 20px 10px;
  font-size: 0.9rem;
  color: #555;
  margin-top: 50px;
  border-top: 1px solid #ddd;
}

.footer p {
  margin: 5px 0;
}

/* -------------------- 다크모드 -------------------- */
body.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

body.dark-mode a,
body.dark-mode .menu-button {
  color: #ddd;
  background-color: #333;
}

body.dark-mode .main-content,
body.dark-mode .sidebar,
body.dark-mode .footer {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

body.dark-mode .notice-box {
  background-color: #2c2c1f;
  color: #f0e68c;
  border-color: #cfa83f;
}

body.dark-mode #commentForm {
  background-color: #2a2a2a;
  color: #eee;
}

body.dark-mode #commentForm input,
body.dark-mode #commentForm textarea {
  background-color: #333;
  color: #eee;
  border-color: #555;
}

body.dark-mode #commentList div,
body.dark-mode .comment-card {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #444;
}

body.dark-mode .comment-card button.delete-button {
  background-color: #aa2e3b;
}

body.dark-mode .comment-card button.delete-button:hover {
  background-color: #911f2d;
}

/* -------------------- 토글 스위치 -------------------- */
.toggle-container {
  display: flex;
  align-items: center;
  margin-top: 20px;
  padding-left: 10px;
}

.toggle-label {
  margin-left: 10px;
  color: inherit;
  font-size: 14px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* -------------------- 반응형 -------------------- */
@media (max-width: 600px) {
  .sidebar {
    width: 40%;
  }

  .sidebar.hide {
    transform: translateX(-100%);
  }

  #commentForm,
  #commentList {
    margin: 20px 10px;
    padding: 15px;
  }

  #commentForm button {
    font-size: 0.9rem;
  }

  .footer {
    font-size: 0.8rem;
    padding: 15px;
  }
}

body.dark-mode .modal-box {
  background-color: #1e1e1e;
  color: #e0e0e0;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .modal-box input {
  background-color: #333;
  color: #f0f0f0;
  border: 1px solid #666;
}

body.dark-mode .modal-box button {
  background-color: #444;
  color: #fff;
}

body.dark-mode .modal-box button:hover {
  background-color: #666;
}

