body {
  font-family: "Noto Sans KR", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  padding-bottom: 50px; /* 푸터 높이만큼 본문 하단에 여백 추가 */
}

header {
  background-color: #2c3e50;
  color: #fff;
  padding: 20px 0;
  text-align: center;
}

section {
  padding: 20px;
  margin: 10px auto;
  max-width: 800px;
  background-color: #fff;
  border-radius: 5px;
}

h2 {
  color: #2c3e50;
}

ul {
  list-style-type: disc;
  padding-left: 20px;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #e74c3c;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

.button:hover {
  background-color: #c0392b;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  background-color: #2c3e50; /* 푸터 배경색 추가 */
  color: #fff; /* 푸터 글자색 추가 */
  font-size: 10px;
  z-index: 1000; /* 다른 요소 위에 표시되도록 z-index 설정 */
}

.score {
  font-weight: bold;
  margin-left: 10px;
}

.weight {
  font-weight: bold;
  margin-left: 10px;
}

.players {
  margin-left: 10px;
}

.sort-button {
  padding: 5px 10px;
  color: white;
  border: 3px solid #ffffff;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
}

.sort-button:hover {
  filter: brightness(0.9);
  border: 3px solid #d9ff00;
}

.sort-button.selected {
  border: 3px solid #d9ff00;
}

.sort-button.selected:hover {
  filter: brightness(0.9);
  border: 3px solid #b6d600;
}

.better-gradient {
  background-image: linear-gradient(to right, #770000, #007700);
}

.worse-gradient {
  background-image: linear-gradient(to right, #007700, #770000);
}

.better-gradient.recently-sorted {
  background-image: linear-gradient(to right, #c93737, #42c942);
}

.worse-gradient.recently-sorted {
  background-image: linear-gradient(to right, #42c942, #c93737);
}

.recently-sorted {
  border: 3px solid #d9ff00;
  border-radius: 4px;
}

/* 필터 섹션 스타일링 */
#filters {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#filters label {
  margin-right: 5px;
}

#filters input {
  width: 80px;
  padding: 5px;
}

#filters .button {
  padding: 5px 10px;
}

@media (max-width: 600px) {
  #filters {
    flex-direction: column;
    align-items: flex-start;
  }

  #filters input {
    width: 100%;
  }
}

/* 필터 상태 메시지 스타일링 */
.filter-status {
  margin-top: 10px;
  padding: 10px;
  background-color: #e7f3fe;
  border-left: 6px solid #2196f3;
  color: #0b5394;
  font-weight: bold;
  display: none;
}

.suggested-players {
  font-style: italic;
  color: #555;
  margin-left: 10px;
}

.best-count {
  background-color: #fbffe0;
}

.recommended-count {
  background-color: #ffffff;
}

.not-recommended {
  background-color: #e7e7e7;
}

#game-table {
  width: 100%;
  border-collapse: collapse;
}

#game-table th,
#game-table td {
  border: 1px solid #ddd;
  padding: 4px;
  text-align: center;
}

#game-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

a {
  color: #0080ff;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

a:hover {
  color: #005bb8;
}

a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #005bb8;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

@keyframes sortAnimation {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.98);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#game-list tr {
  transition: background-color 0.3s ease;
}

#game-list.sorting tr {
  animation: sortAnimation 0.5s ease;
}

.sort-button {
  transition: background 0.3s ease;
}

.sort-button.recently-sorted {
  animation: sortAnimation 0.5s ease;
}

/* 내비게이션 스타일링 */
nav {
  margin-top: 10px;
  margin-bottom: 20px;
  text-align: center;
}

nav .button {
  margin: 0 10px;
  background-color: #3498db;
}

nav .button:hover {
  background-color: #2980b9;
}

/* 모임 일지 섹션 스타일링 (필요 시 기존 #meeting-logs 스타일 유지) */

/* 추가적인 스타일이 필요하다면 여기에 작성 */

#log-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

#log-table th,
#log-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

#log-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}

/* 필터 레벨 슬라이더 스타일링 */
.filter-controls {
  margin: 8px 0;
  padding: 0 4px;
  opacity: 1;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-controls[style*="display: none"] {
  opacity: 0;
}

.slider-container {
  width: 80px;
  padding: 4px 0;
  position: relative;
}

.slider-container::before {
  content: "추천도";
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #666;
  background: #f5f5f5;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.slider {
  -webkit-appearance: none;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--slider-color, #d3d3d3) 0%,
    var(--slider-color, #d3d3d3) 100%
  );
  border-radius: 1px;
  outline: none;
  margin: 8px 0;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--slider-color, #4caf50);
  cursor: pointer;
  box-shadow: 0 0 0 2px white, 0 1px 2px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--slider-color, #4caf50);
  cursor: pointer;
  box-shadow: 0 0 0 2px white, 0 1px 2px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  border: none;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px white, 0 2px 4px 3px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 2px white, 0 2px 4px 3px rgba(0, 0, 0, 0.3);
}

#wishlist {
  margin-top: 2rem;
  padding: 1rem;
}

.wishlist-controls {
  margin-bottom: 1rem;
}

.wishlist-form .modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.wishlist-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wishlist-form input,
.wishlist-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.wishlist-form textarea {
  min-height: 100px;
  resize: vertical;
}

.form-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.vote-button,
.delete-button {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.vote-button {
  background: none;
  font-size: 1.2rem;
}

.delete-button {
  background: #ff4444;
  color: white;
}

.delete-button:hover {
  background: #cc0000;
}

#wishlist-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

#wishlist-table th,
#wishlist-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

#wishlist-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.votes {
  margin-right: 0.5rem;
  font-weight: bold;
}

/* 모임 사진 스타일 */
.photo-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meeting-photo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.meeting-photo:hover {
  transform: scale(1.05);
}

.photo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  cursor: pointer;
}

.photo-modal img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
