/* 전체 기본 설정 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f7fb;
  color: #222;
}

/* 링크 기본 스타일 */
a {
  text-decoration: none;
  color: inherit;
}

/* 버튼 기본 스타일 초기화 */
button {
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* 상단 헤더 */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: left;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 40px;
  background: #ffffffcc;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e1e5ee;
  position: relative;   /* nav를 absolute 중앙정렬하기 위해 필요 ( 변경함) */
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 40px; 
  object-fit: contain;
}

.logo span {
  font-size: 22px;
  font-weight: 1000; /* 폰트 굵기 */
  line-height: 1;
}

/* 상단 네비게이션 ( 변경함 ) */
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;  /* 메뉴 간격 */
  font-size: 16px;
  align-items: center;
}

.nav a {
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav a:hover {
  background: #1f6feb11;
  color: #1f6feb;
}

.auth-buttons {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px
}

.admin-buttons {
    display: flex;
    align-items: center;
    gap: 10px; /* 버튼 간격 */
}

/* 로그인 버튼 */
.btn-login {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid #d0d7e2;
  background: #ffffff;
  color: #222;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* hover */
.btn-login:hover {
  border-color: #1f6feb;
  background: #f3f8ff;
  color: #1f6feb;
}

/* 회원가입 버튼 */
.btn-signup {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  background: #1f6feb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* hover */
.btn-signup:hover {
  background: #1859d6;
}

.btn-primary {
  padding: 7px 14px;
  border-radius: 999px;
  background: #1f6feb;
  color: white;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: #1852b5;
  transform: translateY(-1px);
}

/* 메인 레이아웃 */
.container {
  max-width: 1100px;
  margin: 20px auto 40px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(260px, 1fr);
  gap: 20px;
}

/* 메인 게시판 영역 */
.main-content {
  background: white;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 18px 18px 20px;
}

/* 게시판 탭 */
.board-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  padding: 7px 14px;
  border-radius: 999px;
  background: #f2f4f9;
  font-size: 13px;
}

.tab.active {
  background: #1f6feb;
  color: white;
}

/* 글쓰기, 검색 줄 */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.search-box input {
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid #d0d7e2;
  font-size: 13px;
  width: 180px;
}

.search-box input:focus {
  outline: none;
  border-color: #1f6feb;
}

/* 게시글 테이블 */
.post-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.post-table thead {
  background: #f6f7fb;
}

.post-table th,
.post-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf0f7;
}

.post-table th {
  text-align: left;
  color: #6b7280;
  font-weight: 600;
}

.post-table tbody tr:hover {
  background: #f9fafb;
}

.notice-row {
  background: #fff9e6;
  font-weight: 600;
}

.col-category {
  width: 80px;
}

.col-title {
  width: auto;
}

.col-writer {
  width: 120px;
}

.col-date {
  width: 110px;
}

.col-views {
  width: 70px;
  text-align: right;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
}

.page-btn {
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e0e4ef;
  background: white;
  font-size: 13px;
}

.page-btn.active {
  background: #1f6feb;
  color: white;
  border-color: #1f6feb;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: default;
}

/* 오른쪽 사이드바 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 카드 공통 */
.card {
  background: white;
  border-radius: 14px;
  padding: 14px 14px 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.card h3 {
  font-size: 15px;
  margin-bottom: 10px;
}

/* 로그인 폼 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.login-form input {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #d0d7e2;
  font-size: 13px;
}

.login-form input:focus {
  outline: none;
  border-color: #1f6feb;
}

.btn-primary.full {
  width: 100%;
  margin-top: 2px;
}

.login-links {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.login-links a {
  color: #374151;
}

/* 공지, 인기글 리스트 */
.simple-list {
  list-style: none;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.simple-list li {
  padding-left: 4px;
}

.rank-list {
  margin-left: 18px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 태그 영역 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

/* 푸터 */
.footer {
  border-top: 1px solid #e1e5ee;
  padding: 14px 16px 20px;
  font-size: 12px;
  color: #6b7280;
  display: flex;
  justify-content: center;

}

.btn-logout {
    padding: 6px 14px;
    background: #efefef;
    color: #111;
    border-radius: 999px;
    border: 1px solid #d0d7e2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: #e5e7eb;
}

