body {
  font-family: 'Poppins', sans-serif;
  background-color: #f0f3f5 !important; /* Light grey background color */
  color: #f2f2f5; /* Dark text color */
  font-size: 14px;
  margin: 0 auto; /* 양쪽 여백 제거 */
  margin-top: 100px; /* navbar 아래로 들어가지 않도록 margin-top 증가 */
  padding: 0 !important;
  margin-top: 0 !important;
  padding-top: 30px !important;
  width: 100vw !important;
  box-sizing: border-box;
}

.bg-primary {
  --bs-bg-opacity: 1;
  background-color: #2b6cb0 !important;
}

.navbar-custom {
  background-color: #2b6cb0; /* Blue background color */
  transition: top 0.3s; /* Smooth transition for hiding and showing the navbar */
  font-size: 14px;
}

/* Navbar styles */
.navbar {
  background-color: #2b6cb0 !important;
}

.navbar .container-fluid {
  background-color: #2b6cb0 !important;
  padding: 0.5rem 1rem;
  margin: 0;
  width: 100%;
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  color: white !important;
  padding: 0.3125rem 0;
  margin-right: 1rem;
  font-size: 1.25rem;
}

/* Override Bootstrap's default styles */
.container-fluid {
  --bs-gutter-x: 0 !important;
  --bs-gutter-y: 0 !important;
  width: 100% !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
  background-color: #2b6cb0 !important;
}

/* Remove all previous navbar styles */
.bg-primary,
.navbar-dark,
.navbar-expand-lg,
.navbar-custom {
  background-color: #2b6cb0 !important;
}

h1, h2 {
  text-align: center;
  font-size: 15px;
}

form {
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto 20px;
}

form input, form textarea {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form input::placeholder,
form textarea::placeholder {
  color: #999;
  transition: all 0.2s ease;
}

form input:focus::placeholder,
form textarea:focus::placeholder {
  opacity: 0;
  transform: translateY(-10px);
}

form button {
  padding: 10px;
  font-size: 16px;
  border: none;
  background-color: #007BFF;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

form button:hover {
  background-color: #0056b3;
}

.guestbook-container {
  margin-top: 5px;
  max-width: 1400px;
  margin: 0 auto;
  background-color: #f0f3f5; /* Dark blue background color */
  position: relative;
}

#write-post-button {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  outline: none !important;
  background: #f0f3f5 !important;
  color: #2b6cb0 !important;
  border: none !important;
  border-radius: 5px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  margin-top: 10px !important;
  width: 100px !important;
  height: 40px !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

#write-post-button::before {
  content: "✏️";
  font-size: 20px;
}

/* 모바일에서 Write 버튼이 확실히 보이도록 */
@media (max-width: 767px) {
  #write-post-button {
    width: 80px !important;
    height: 35px !important;
    font-size: 12px !important;
    background: #f0f3f5 !important;
    color: #007bff !important;
    border: none !important;
    border-radius: 5px !important;
    display: block !important;
    margin: 10px 0 !important;
    position: relative !important;
    z-index: 999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    outline: none !important;
  }
  
  #write-post-button::before {
    content: "✏️";
    font-size: 16px !important;
    display: block !important;
  }
}

#write-post-button:hover::after {
  content: "Write";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #f0f3f5 ;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  margin-top: 5px;
}

#write-post-container {
  max-width: 1400px;
  background-color: #f0f3f5 ; /* Dark blue background color */
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  margin-top: 20px;
  position: relative;
  z-index: 10;
}

#write-post-container input,
#write-post-container textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #f0f3f5 ;
  border-radius: 5px;
  margin-bottom: 10px;
}

#write-post-container #message {
  height: 500px !important;
  min-height: 500px !important;
  max-height: none !important;
  resize: vertical !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

#write-post-container button {
  width: 100%;
  background-color: #007bff;
  color: #f0f3f5 ;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

th, td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #f0f3f5; /* Dark blue background color */
}

th.title {
  width: 30%;
  text-align: center;
}

th.number, th.author, th.date, th.views {
  font-size: 12px;
}

th.actions {
  width: 20%;
}

.btn-danger {
  background-color: #d9534f; /* Delete 버튼의 배경 색상 */
  border: none; /* 버튼의 테두리 제거 */
  color: white; /* 버튼 텍스트 색상 */
  padding: 6px 12px; /* 버튼 패딩 */
  text-align: center; /* 텍스트 정렬 */
  text-decoration: none; /* 텍스트 밑줄 제거 */
  display: inline-block; /* 인라인 블록 요소로 설정 */
  font-size: 12px; /* 폰트 크기 */
  margin: 2px; /* 버튼 간격 */
  cursor: pointer; /* 커서 모양 변경 */
  border-radius: 4px; /* 둥근 테두리 */
}

.btn-warning {
  background-color: #f0ad4e; /* Edit 버튼의 배경 색상 */
  border: none; /* 버튼의 테두리 제거 */
  color: white; /* 버튼 텍스트 색상 */
  padding: 6px 12px; /* 버튼 패딩 */
  text-align: center; /* 텍스트 정렬 */
  text-decoration: none; /* 텍스트 밑줄 제거 */
  display: inline-block; /* 인라인 블록 요소로 설정 */
  font-size: 12px; /* 폰트 크기 */
  margin: 2px; /* 버튼 간격 */
  cursor: pointer; /* 커서 모양 변경 */
  border-radius: 4px; /* 둥근 테두리 */
}

.btn-danger2 {
  background-color: #858c92; /* Admin 버튼의 배경 색상 */
  border: none; /* 버튼의 테두리 제거 */
  color: white; /* 버튼 텍스트 색상 */
  padding: 6px 12px; /* 버튼 패딩 */
  text-align: center; /* 텍스트 정렬 */
  text-decoration: none; /* 텍스트 밑줄 제거 */
  display: inline-block; /* 인라인 블록 요소로 설정 */
  font-size: 12px; /* 폰트 크기 */
  margin: 2px; /* 버튼 간격 */
  cursor: pointer; /* 커서 모양 변경 */
  border-radius: 4px; /* 둥근 테두리 */
  display: none;
}

#edit-message {
  height: 200px !important; /* Adjust this value to set the desired height */
  padding: 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #ffffff; /* Background color */
  resize: vertical; /* Allows the user to resize the textarea vertically */
}

#write-post-container h3.text-primary {
  font-size: 18px !important;
}

/* Mobile styles */
@media (max-width: 767px) {
  body {
    padding: 10px;
    margin-top: 80px;
    font-size: 10px; /* 더 작게 조정 */
  }

  h1 {
    font-size: 14px; /* 더 작게 조정 */
    margin-bottom: 8px;
  }

  #post-container {
    max-width: 100%;
    padding: 8px;
    margin-top: 30px !important;
  }

  #post-header {
    margin-top: 20px;
  }

  #post-title {
    font-size: 16px; /* 더 작게 조정 */
  }

  #post-meta {
    font-size: 8px; /* 더 작게 조정 */
  }

  #post-content {
    font-size: 10px; /* 더 작게 조정 */
  }

  form {
    max-width: 90%;
    padding: 0;
    margin: 0 auto;
    font-size: 10px; /* 더 작게 조정 */
  }

  form input,
  form textarea {
    padding: 4px;
    margin: 4px 0;
    font-size: 8px;
  }

  form button {
    padding: 6px 8px;
    margin: 4px 0;
    font-size: 8px; /* 더 작게 조정 */
  }

  .guestbook-container {
    max-width: 95%;
    padding: 4px;
    margin: 0 auto;
    font-size: 8px; /* 더 작게 조정 */
  }

  #write-post-container, .guestbook-container {
    max-width: auto;
    font-size: 8px; /* 더 작게 조정 */
  }

  table, th, td {
    font-size: 8px; /* 더 작게 조정 */
    padding: 4px;
  }

  .btn-danger, .btn-warning, .btn-danger2 {
    padding: 3px 6px;
    font-size: 8px; /* 더 작게 조정 */
    margin: 1px;
  }

  #write-post-button {
    width: 80px; /* 모바일에서도 보이도록 크게 조정 */
    height: 35px; /* 모바일에서도 보이도록 크게 조정 */
    font-size: 12px; /* 모바일에서도 보이도록 크게 조정 */
    background: #f0f3f5  !important;
    color: #007bff !important;
    border: 2px solid #007bff !important;
    border-radius: 5px !important;
    display: block !important;
    margin: 10px auto !important;
  }

  .item-title a {
    font-size: 0.9rem; /* 더 작게 조정 */
  }

  .item-meta {
    font-size: 0.8rem; /* 더 작게 조정 */
  }

  .item-number {
    font-size: 0.85rem; /* 더 작게 조정 */
  }

  .sliders-container,
  .btn-danger2 {
    display: none;
  }
}

.guestbook-item {
  border-bottom: 1px solid #ddd;
  padding: 12px 0 6px 0;
}
.item-title a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  text-decoration: none;
}
.item-title a:hover {
  color: #2b6cb0;
  text-decoration: underline;
}
.item-meta {
  font-size: 0.92rem;
  color: #888;
  margin-top: 2px;
}
.item-meta span {
  margin-right: 12px;
}

.item-number {
  font-weight: bold;
  color: #2b6cb0;
  margin-right: 8px;
  font-size: 1.05rem;
}

.item-author {
  margin-left: 2.2rem;
}

.guestbook-list {
  margin-top: 4rem;
}

#write-post-button,
#write-post-button:focus,
#write-post-button:active,
#write-post-button:hover {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#post-container {
  width: calc(100% + 40px) !important;
  max-width: calc(100% + 40px) !important;
  margin-left: -20px !important;
  margin-right: -20px !important;
}

#post-content {
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

#post-message {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#post-container,
#post-content,
#post-message {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

#write-post-button {
  margin-top: 70px !important;
}

@media (max-width: 767px) {
  #write-post-button {
    background: #f0f3f5  !important;
  }
}
