
/* --- General Body and Navbar --- */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f7f8fa;
  margin: 0;
  padding: 0;
}

/* 네비게이션 아래 첫 번째 요소들의 간격 */
body > h1:first-of-type,
body > h2:first-of-type,
.container > h1:first-child,
.container > h2:first-child {
  margin-top: 120px; /* 네비게이션 높이 + 여유 공간 */
}
.h2_org_list {
  margin-top: 30px !important;
}
#navbar {
  top: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  background: #222;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding: 1.5vw 2.5vw;
  font-size: 1.2em;
  height: 5vh; 
}

.navbar-left {
  display: flex;
  align-items: center;
  flex: 1; /* 왼쪽 영역이 가능한 공간을 차지 */
}

  .navbar-brand {
    font-weight: bold;
    font-size: 1.3em;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
  }
  
  .navbar-brand i {
    font-size: 1em;
  }
  
  .nav-text {
    margin-left: 8px;
    font-weight: 500;
    white-space: nowrap;
  }
  
  /* 모바일에서 텍스트 숨기기 */
  @media (max-width: 768px) {
    .nav-text {
      display: none;
    }
    
    .navbar-brand i {
      font-size: 1.2em;
    }
  }
  
  /* 데스크톱에서 아이콘과 텍스트 모두 표시 */
  @media (min-width: 769px) {
    .navbar-brand i {
      font-size: 1em;
    }
  }

.navbar-menu {
  display: inline-flex;
  align-items: center;
  margin-left: 30px;
}

.navbar-menu-item {
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.navbar-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.navbar-auth {
  display: flex;
  align-items: center;
  position: relative;
  gap: 10px;
  margin-left: auto;
  margin-left: auto; /* 우측 정렬 강화 */
  justify-content: flex-end; /* 우측 정렬 강화 */
}

.navbar-auth a, .navbar-auth span {
  color: #fff;
  text-decoration: none;
  margin-left: 10px;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.navbar-auth a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* 기본 햄버거 스타일 - 데스크톱에서 숨김 */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  order: 2; /* 햄버거 메뉴를 맨 뒤(오른쪽)로 이동 */
  margin-left: 10px; /* 간격 추가 */
}

.hamburger i {
  font-size: 24px;
  color: #fff;
}

.hamburger:hover i {
  color: #ccc;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  color: #fff;
  text-align: center;
  background: #222;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
  height: clamp(30px, 8vh, 60px);
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  padding: 0.5vw 0.5vw;
}

/* 모바일에서는 스크롤 맨 하단에서만 푸터 보이기 */
@media (max-width: 768px) {
  .site-footer {
    transform: translateY(100%);
    opacity: 0;
  }
  .site-footer.show {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 드롭다운 메뉴 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.3s;
  text-align: right;
  white-space: nowrap;
}

.dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0; /* 이미 우측 정렬되어 있음 */
  left: auto; /* 왼쪽 정렬 제거 */
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  min-width: 160px;
  z-index: 1020;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  margin-top: 5px;
}

/* 마우스 호버로 드롭다운 표시 */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  display: block !important;
}



.dropdown-menu.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 15px;
  color: #333 !important;
  text-decoration: none;
  font-size: 0.9em;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #f8f9fa !important;
}

.dropdown-divider {
  height: 1px;
  background-color: #eee;
  margin: 5px 0;
}

/* --- Page Layouts --- */
.quiz-page-container {
    display: flex;
    max-width: 1200px;
    margin: 10px auto 0; /* 네비게이션 아래 적절한 간격 */
    align-items: flex-start;
    gap: 24px;
    padding: 5px;
}

.quiz-main-content {
    flex: 2;
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.quiz-sidebar {
    flex: 1;
    position: sticky;
    top: 90px;
}

/* --- Sidebar Sections --- */
.sidebar-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.sidebar-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.95em;
    color: #333;
}

.sidebar-section .ad-content {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;

  /* width: 340px; 
  height: 250px;  */
}

.sidebar-section .sidebar-content p {
    margin: 0;
    font-size: 0.95em;
    color: #555;
}

.sidebar-section .sidebar-content .recent-comment {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
}
.sidebar-section .sidebar-content .recent-comment:last-child {
    border-bottom: none;
}
.sidebar-section .sidebar-content .recent-comment-author {
  font-weight: bold;
  color: #2d72d9;
  font-size: clamp(0.75rem, 1.8vw, 0.9rem); /* chosen-answer-section과 동일한 폰트 크기 */
}
.recent-comment-question-link {
    font-weight: bold;
    color: #2d72d9; /* Primary blue color */
    cursor: pointer;
    text-decoration: none; /* Remove default underline */
    margin-right: 5px;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.recent-comment-question-link:hover {
    color: #1a5bbd; /* Darker blue on hover */
    text-decoration: underline; /* Underline on hover */
}
.sidebar-section .sidebar-content .recent-comment-content {
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 플로팅 메뉴 내 북마크 항목 스타일 */
#my-bookmarks-section .bookmark-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em; /* 최근 댓글과 동일한 글자 크기 */
    color: #555;
}

#my-bookmarks-section .bookmark-item:last-child {
    border-bottom: none;
}

#my-bookmarks-section .bookmark-item .question-id {
    font-weight: bold;
    color: #2d72d9; /* 글자색을 파란색으로 변경 */
    background-color: transparent; /* 배경색을 투명하게 설정 */
    font-size: 1em; /* 부모 요소와 동일한 글자 크기 */
}

#my-bookmarks-section .bookmark-item .bookmark-date {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

/* --- Quiz Content Styles --- */
.quiz-list {
  margin-top: 24px;
}
.quiz-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 18px 0 12px 0;
}
.choices {
  margin: 10px 0 10px 0;
}
.choice {
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #f7f8fa;
  border: 1px solid #e0e0e0;
  transition: background 0.2s, border 0.2s;
}
.choice.correct {
  border: 2px solid #2ecc40;
  background: #eaffea;
  font-weight: bold;
}
/* 기본 pagination 스타일 */
/* 페이징 영역을 flex로 변경하여 한 줄에 배치 */
.pagination {
    margin-top: 1.5rem;
    text-align: center;
    display: flex; /* inline-flex → flex로 변경 */
    justify-content: center; /* 중앙 정렬 */
    align-items: center; /* 수직 중앙 정렬 */
    gap: 0.5rem;
    user-select: none;
    flex-wrap: wrap; /* 화면이 작을 때 줄바꿈 허용 */
}

@media screen and (max-width: 768px) {
  
  /* class="q-ko" 속성을 가진 SPAN 내부에 있는 IMG 태그를 선택 */
  span.q-ko img, span.q-en img, span.c-ko img, span.c-en img {
    max-width: 100%; 
    height: auto;    
    display: block;  
  }

}

/* 모의고사 문제 텍스트 좌우 정렬 */
.q-en, .q-ko, .c-en, .c-ko {
  text-align: justify; /* 좌우로 가득 차게 정렬 */
  text-justify: inter-word; /* 단어 간격 조정으로 균등 분배 */
  line-height: 1.6; /* 줄 간격 조정으로 가독성 향상 */
  word-break: keep-all; /* 한글 단어 중간에서 줄바꿈 방지 */
  hyphens: auto; /* 영어 단어 하이픈 자동 추가 (선택사항) */
}

/* 모바일에서도 동일하게 적용 */
@media screen and (max-width: 768px) {
  .q-en, .q-ko, .c-en, .c-ko {
    text-align: justify;
    text-justify: inter-word;
  }
}


/* 이전/다음 버튼 스타일 */
.pagination .nav-btn {
    display: inline-grid;
    place-items: center;
    height: 2rem; /* 30px 대신 rem 사용 */
    min-width: 2rem; /* 30px 대신 rem 사용 */
    padding: 0.375rem 0.375rem; /* 6px 6px 대신 rem 사용 */
    border-radius: 0.5rem; /* 8px 대신 rem 사용 */
    background: transparent;
    color: #0d1117;
    border: 1px solid rgba(30,144,255,0.15);
    cursor: pointer;
    transition: background .12s, transform .08s, box-shadow .12s;
    box-sizing: border-box;
    font-size: 0.875rem; /* 14px 대신 rem 사용 */
}
.pagination .nav-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.pagination .nav-btn:focus {
  outline: 3px solid rgba(30,144,255,0.16);
  outline-offset: 2px;
}

/* 페이지 번호 박스 (기본) */
.pagination .page {
    display: flex; /* inline-grid → flex로 변경 */
    align-items: center; /* place-items → align-items로 변경 */
    justify-content: center;
    width: 2rem; /* 30px 대신 rem 사용 */
    height: 2rem; /* 30px 대신 rem 사용 */
    min-width: 1.25rem; /* 20px 대신 rem 사용 */
    padding: 0.3125rem 0.625rem; /* 5px 10px 대신 rem 사용 */
    border-radius: 0.3125rem; /* 5px 대신 rem 사용 */
    background: #f3f6fb;
    color: #0d1117;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s, background .12s, box-shadow .12s;
    border: none;
    box-sizing: border-box;
    font-size: 0.875rem; /* 14px 대신 rem 사용 */
}

/* 호버 / 포커스 */
.pagination .page:hover,
.pagination .page:focus {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13,17,23,0.06);
}
.pagination .page:focus {
  outline: 3px solid rgba(30,144,255,0.12);
  outline-offset: 3px;
}

/* 활성(현재) 페이지: 파란색 배경, 흰색 글씨 */
.pagination .current-page {
  background: linear-gradient(180deg, #1e90ff, #176fd1);
  color: white;
  box-shadow: 0 6px 20px rgba(30,144,255,0.18);
  transform: translateY(-1px);
}

/* --- General Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex; /* Use flex to center the modal box */
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
}

/* 로그인/회원가입 모달은 댓글 모달보다 위에 표시 */
.modal-overlay:not(#comment-modal) {
  z-index: 10001;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 32px 28px;
  min-width: 240px;
  max-width: 320px;
  width: 70%;
  z-index: 10000;
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

/* 로그인/회원가입 모달 박스는 댓글 모달보다 위에 표시 */
.modal-overlay:not(#comment-modal) .modal-box {
  z-index: 10002;
}

/* --- Login/Register Modal Specific Styles --- */
.modal-box h2 {
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.5em;
}

.modal-box input[type="email"],
.modal-box input[type="password"],
.modal-box input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  opacity: 1;
  pointer-events: auto;
  background: #fff;
}

.modal-box input[type="email"]:focus,
.modal-box input[type="password"]:focus,
.modal-box input[type="text"]:focus {
  outline: none;
  border-color: #2d72d9;
  box-shadow: 0 0 0 2px rgba(45, 114, 217, 0.2);
}

.modal-box button {
  width: 100%;
  margin-bottom: 12px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
  opacity: 1;
  pointer-events: auto;
}

.modal-box #do-login,
.modal-box #do-register {
  background: #2d72d9;
  color: white;
  font-weight: bold;
  padding: 8px;
}

.modal-box #do-login:hover,
.modal-box #do-register:hover {
  background: #1a5bbd;
}

.modal-box .google-btn {
  background: #4285f4;
  color: white;
  font-weight: bold;
  padding: 8px;
}

.modal-box .google-btn:hover {
  background: #357abd;
}

.error-msg {
  background: #f8d7da;
  color: #721c24;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 0.9em;
  display: none;
}

.error-msg.show {
  display: block;
}

.modal-link {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9em;
  color: #666;
}

.modal-link a {
  color: #2d72d9;
  text-decoration: none;
  font-weight: bold;
}

.modal-link a:hover {
  text-decoration: underline;
}

/* Status messages for registration form */
#email-status,
#password-status,
#nickname-status {
  display: block;
  font-size: 0.8em;
  margin-top: -8px;
  margin-bottom: 8px;
  padding-left: 4px;
}

#email-status.valid,
#password-status.valid,
#nickname-status.valid {
  color: #28a745;
}

#email-status.invalid,
#password-status.invalid,
#nickname-status.invalid {
  color: #dc3545;
}

/* Warning message style for withdrawal modal */
.warning-message {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.warning-message ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.warning-message li {
  color: #856404;
  margin-bottom: 5px;
}

/* Button styles for withdrawal modal */
.btn {
  width: 100%;
  margin-bottom: 12px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 8px;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  font-weight: bold;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: #dc3545;
  color: white;
  font-weight: bold;
}

.btn-danger:hover {
  background: #c82333;
}

/* Modal Header for alignment */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px; /* Add some space below the header */
    margin-bottom: 15px; /* Space between header and body */
    border-bottom: 1px solid #eee; /* Separator */
}

.modal-header h5 {
    margin: 0; /* Remove default margin from h5 */
    font-size: 1.2em;
    color: #333;
}

/* Close button general style for all modals */
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8em; /* Make it larger */
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1; /* Align 'x' vertically */
    transition: color 0.2s ease;
    width: 10px; /* close-profile-modal과 동일한 너비 */
}

.modal-close:hover {
    color: #333;
}

/* --- Comment Modal Specific Styles --- */
#comment-modal .modal-box {
    background: #fff;
    max-width: 850px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    width: 70%;
    /* max-height: 80vh; */
    max-height: 65vh;
    overflow-y: auto;
    align-self: center; 
    margin-top: 10vh; 
    margin-bottom: 10vh;
    opacity: 1;
    pointer-events: auto;
}

/* 
.modal-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  padding: 32px 28px;
  min-width: 300px;
  max-width: 320px;
  width: 70%;
  z-index: 10000;
  position: relative;
  opacity: 1;
  pointer-events: auto;
} */

#comment-modal .modal-body {
  padding: 0;
}

/* 댓글 스레드 관련 스타일 */
.comment-thread {
    position: relative;
    margin-bottom: 20px;
}

/* .comment-thread .replies {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid #e0e0e0;
    margin-top: 10px;
} */



/* 댓글 모달 숨김 처리 */
#comment-modal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

/* 댓글 모달 완전히 숨김 */
#comment-modal.completely-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -9999 !important;
    pointer-events: none !important;
}

#chosen-answer-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #eee;
  flex-wrap: nowrap; /* 줄바꿈 방지 */
  min-width: 0; /* flex 아이템이 축소될 수 있도록 */
  overflow-x: auto; /* 가로 스크롤 허용 */
}

#chosen-answer-section strong {
  color: #555;
  white-space: nowrap;
  flex-shrink: 0; /* 텍스트가 줄어들지 않도록 */
  font-size: clamp(0.8rem, 2vw, 1rem); /* 반응형 폰트 크기 */
}

#choices-checkboxes {
  display: flex;
  flex-wrap: nowrap; /* 줄바꿈 방지 */
  gap: 0.8rem;
  min-width: 0; /* flex 아이템이 축소될 수 있도록 */
  overflow-x: auto; /* 가로 스크롤 허용 */
  font-size: clamp(0.75rem, 1.8vw, 0.9rem); /* 반응형 폰트 크기 */
}

#comment-form-section {
  position: relative;
  margin-bottom: 20px;
}

#comment-form-section textarea, .reply-form textarea {
  width: 100%;
  padding: 10px;
  padding-bottom: 50px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  resize: vertical;
  box-sizing: border-box;
}

#submit-comment-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    margin: 0;
    width: auto;
    background: #2d72d9;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.3rem 0.6rem;
    font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#submit-comment-btn:hover {
  background-color: #1a5bbd;
}

#close-modal-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 18px;
    height: 18px;
    text-align: center;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #555;
    border: none;
    cursor: pointer;
    font-weight: bold;
    z-index: 1;
    transition: background-color 0.2s;
}

#comments-list-section {
    margin-top: 20px;
    padding-left: 10px;
}

.comment-thread {
    position: relative;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: none;
}

.comment-main {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.comment-body {
    flex: 1;
    padding: 1vw;
    border-radius: 8px;
    background-color: #f9f9f9;
    margin-left: 2vw;
    margin-bottom: 15px;
}

.replies {
    margin: 0;
    padding-left: 4vw;
    position: relative;
}





.edit-form {
    margin-top: 10px;
}

.edit-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95em;
    resize: vertical;
}

.edit-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.edit-actions .save-edit-btn {
    background-color: #2d72d9;
    color: white;
    font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.edit-actions .save-edit-btn:hover {
    background-color: #1a5bbd;
}

.edit-actions .cancel-edit-btn {
    background-color: #6c757d;
    color: white;
    font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.edit-actions .cancel-edit-btn:hover {
    background-color: #5a6268;
}

/* 답글 폼과 버튼 스타일 */
.reply-form {
    margin-top: 10px;
}

.reply-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    resize: vertical;
    margin-bottom: 8px;
}

.submit-reply-btn {
    background-color: #2d72d9;
    color: white;
    font-size: clamp(0.7rem, 1.6vw, 0.85rem);
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: normal;
    line-height: 1.2;
    min-height: auto;
    height: auto;
    box-sizing: border-box;
}

/* .edit-actions .save-edit-btn {
  background-color: #2d72d9;
  color: white;
  font-size: clamp(0.7rem, 1.6vw, 0.85rem);
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
} */

.submit-reply-btn:hover {
    background-color: #1a5bbd;
}
.comment-author {
  font-weight: bold;
  color: #2d72d9;
  margin-bottom: 5px;
  font-size: clamp(0.75rem, 1.8vw, 0.9rem); /* chosen-answer-section과 동일한 폰트 크기 */
}
.comment-author small {
  color: #888;
  font-weight: normal;
  font-size: clamp(0.7rem, 1.6vw, 0.85rem); /* 약간 작은 폰트 크기 */
}
.comment-content {
  margin-top: 5px;
  margin-bottom: 10px;
  line-height: 1.5;
  color: #333;
  font-size: clamp(0.75rem, 1.8vw, 0.9rem); /* chosen-answer-section과 동일한 폰트 크기 */
}
.comment-actions {
  display: flex;
  flex-direction: row;
}
.comment-actions button {
  background: #f0f2f5;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 0.3rem 0.6rem;
  font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  margin-right: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  max-width: 25%; 
}
.comment-actions button:hover {
  background-color: #e0e2e6;
}

/* 비활성화된 추천 버튼 시각 표시 */
.like-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* 작성자 본인의 댓글에서 추천 수만 표시하는 스타일 */
.like-count {
  color: #6c757d;
  font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  margin-right: 8px;
  padding: 0.3rem 0.6rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 5px;
  display: inline-block;
}
.text-danger {
  color: #dc3545;
}

.text-muted {
  color: #6c757d;
  font-size: clamp(0.75rem, 1.8vw, 0.9rem); /* chosen-answer-section과 동일한 폰트 크기 */
}

.chosen-answers {
  font-size: clamp(0.75rem, 1.8vw, 0.9rem); /* chosen-answer-section과 동일한 폰트 크기 */
}
.navbar-auth button {
  background: #2d72d9;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  margin-left: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s;
}
.navbar-auth button:hover {
  background: #1a5bbd;
}

/* --- Centering Containers --- */
.centered-container {
  max-width: 900px; /* Adjust as needed */
  margin: 100px auto 0; /* 네비게이션 아래 적절한 간격 */
  padding: 20px; /* Add some padding on smaller screens */
}

/* --- Quiz Button Styles --- */
.quiz-main-content button,
.purchase-btn,
.back-button[data-link],
.exam-item button,
.exam-card button { /* Target buttons within quiz-main-content, specific buttons, and buttons within exam items */
  background: #2d72d9;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 15px;
  margin-right: 10px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}

.quiz-main-content button:hover,
.purchase-btn:hover,
.back-button[data-link]:hover,
.exam-item button:hover,
.exam-card button:hover {
  background: #1a5bbd;
}

/* 로그인 프롬프트 스타일 */
.login-prompt {
  background: #e3f2fd;
  border: 2px solid #2196f3;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  margin: 20px 0;
}

.login-prompt h1, .login-prompt h2 {
  color: #1976d2;
  margin-bottom: 15px;
}

.login-prompt p {
  color: #555;
  margin-bottom: 20px;
  font-size: 1.1em;
}

.login-prompt button {
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 1.1em;
  cursor: pointer;
  margin: 0 10px;
}

.login-prompt button:hover {
  background: #1976d2;
}

/* 버튼 컨테이너 스타일 추가 */
.question-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap; /* 줄바꿈 방지 */
  align-items: center;
  min-width: 0; /* flex 아이템이 축소될 수 있도록 */
}

/* 모든 버튼 공통 스타일 */
.show-answer-btn,
.toggle-en-btn,
.view-comments-btn,
.bookmark-btn {
  white-space: nowrap; /* 텍스트 줄바꿈 방지 */
  flex-shrink: 0; /* 버튼이 줄어들지 않도록 */
  min-width: 0; /* 최소 너비 제거 */
  padding: 0.4rem 0.8rem; /* 패딩을 상대값으로 */
  font-size: clamp(0.8rem, 2vw, 1rem); /* 폰트 크기를 반응형으로 */
}

/* 댓글 버튼 내부 스팬 (숫자) */
.view-comments-btn span {
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
}

/* Specific style for the "Show Answer" button when active/showing answer */
.show-answer-btn.active {
    background-color: #dc3545; /* Red for "Hide Answer" */
}

.show-answer-btn.active:hover {
    background-color: #c82333;
}


.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

.btn-success {
  background: #2d72d9;
  color: white;
}

.btn-success:hover {
  background: #1a5bbd;
}

.btn-warning {
  background: #2d72d9;
  color: white;
}

.btn-warning:hover {
  background: #1a5bbd;
}

.hidden {
  display: none;
}

/* 모의고사 시험 페이지 스타일 */
.mock-exam-container {
  max-width: 1200px;
  margin: 100px auto 0; /* 네비게이션 아래 적절한 간격 */
  padding: 5px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #f8f9fa;
  min-height: 100vh;
}

.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 20px;
}

.exam-title h2 {
  margin: 0;
  color: #333;
  font-size: 1.5em;
}

.exam-timer {
  background: #2d72d9;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2em;
}

.timer-display {
  font-family: 'Courier New', monospace;
}

.question-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #f2f4f8;
  border-radius: 8px;
  margin-bottom: 20px;
}

.nav-info {
  font-weight: bold;
  color: #333;
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-btn {
  padding: 8px 16px;
  background: #2d72d9;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.nav-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 댓글 모달 숨김 클래스 */
.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  z-index: -1 !important;
}

.question-area {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 20px;
  min-height: 400px;
}

.question-text h3 {
  margin-bottom: 20px;
  color: #333;
  line-height: 1.6;
  font-size: 1.1em;
}

.choices-area {
  margin-top: 20px;
}

.choices .choice {
  padding: 15px;
  margin-bottom: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8f9fa;
}

.choices .choice:hover {
  border-color: #2d72d9;
  background: #f0f4ff;
}

.choices .choice.selected {
  border-color: #2d72d9;
  background: #e3f2fd;
  font-weight: bold;
  color: #333;
}

/* 시험 목록 스타일 */
.exam-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exam-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exam-info h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.2em;
}

.exam-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 20px;
}
.exam-actions button { 
  min-width: 92px;
  padding: 10px;
}

/* 전체 시험 목록 스타일 */
.org-section {
  margin-bottom: 40px;
}

.org-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2d72d9;
}

.org-name {
  color: #2d72d9;
  font-size: 1.5em;
  margin: 0;
}

.exam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* --- View Toggles --- */
.org-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-toggle {
  display: flex;
  gap: 10px;
}

.view-toggle i {
  font-size: 1.5em;
  cursor: pointer;
  color: #ccc;
}

.view-toggle i:hover {
  color: #2d72d9;
}

.view-toggle i.active {
  color: #2d72d9;
}

#card-view-btn {
    display: none;
}

/* --- Exam List View Styles --- */

/* Default (Card View) Styles for new structure */
.exam-card {
    display: flex;
    flex-direction: column;
}

.exam-card .exam-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}
.exam-card .exam-code {
    color: #555;
    font-size: 0.9em;
    margin-bottom: 8px;
}
.exam-card .exam-q-count {
    color: #2d72d9;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.exam-grid.list-view {
    display: block;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    gap: 0;
}

.exam-grid.list-view .exam-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 0;
    border-bottom: 1px solid #e9e9e9;
    box-shadow: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.exam-grid.list-view .exam-card:last-child {
    border-bottom: none;
}

.exam-grid.list-view .exam-name,
.exam-grid.list-view .exam-code,
.exam-grid.list-view .exam-q-count,
.exam-grid.list-view .exam-actions {
    display: flex;
    align-items: center;
    padding: 0 5px;
    margin-bottom: 0;
}

.exam-grid.list-view .exam-name { flex: 1 1 50%; }
.exam-grid.list-view .exam-code { flex: 1 1 15%; }
.exam-grid.list-view .exam-q-count { flex: 1 1 15%; font-size: 0.9em; }
.exam-grid.list-view .exam-actions { flex: 1 1 20%; justify-content: flex-end; }

.popular-badge {
    background-color: #f39c12;
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    font-weight: normal;
    display: inline-block;
}

@media (max-width: 768px) {
    /* Hide the list header on mobile, as the layout changes */
    .exam-list-header {
        display: none !important;
    }

    .exam-grid.list-view .exam-card {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
    }

    /* Reset flex-basis and set width to auto or 100% */
    .exam-grid.list-view .exam-name,
    .exam-grid.list-view .exam-code,
    .exam-grid.list-view .exam-q-count,
    .exam-grid.list-view .exam-actions {
        flex-basis: auto;
        width: 100%;
        justify-content: flex-start; /* Align content to start */
        margin-bottom: 8px;
        padding: 0; /* Reset padding */
    }

    .exam-grid.list-view .exam-actions {
        margin-bottom: 0;
        justify-content: flex-end; /* Keep buttons to the right */
    }
}

.exam-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.exam-card .exam-info h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.1em;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

.question-minimap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 5px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.minimap-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  background: #f5f5f5; /* 회색 - 미방문 문제 */
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s;
  color: #666;
}

.minimap-btn:hover {
  background: #e3f2fd;
  border-color: #2d72d9;
}

.minimap-btn.current {
  background: #2d72d9; /* 파랑 - 현재 문제 */
  color: white;
  border-color: #2d72d9;
}

.minimap-btn.answered {
  background: #28a745; /* 초록 - 답안 선택 완료 */
  color: white;
  border-color: #28a745;
}

.minimap-btn.flagged {
  background: #ffc107; /* 노랑 - 플래그 표시된 문제 */
  color: #212529;
  border-color: #ffc107;
}

.minimap-btn.flagged.answered {
  background: linear-gradient(45deg, #28a745 50%, #ffc107 50%); /* 초록+노랑 - 답안 완료 + 플래그 */
  color: white;
}

#flag-btn.flagged {
  background: #ffc107;
  color: #212529;
}

#flag-btn.flagged:hover {
  background: #e0a800;
}

/* 언어 토글 버튼 활성 상태 */
#toggle-lang-btn.active {
  background: #28a745;
  color: white;
}

#toggle-lang-btn.active:hover {
  background: #218838;
}

/* 내정보 모달 스타일 */
.profile-info {
  margin: 20px 0;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.profile-item:last-child {
  border-bottom: none;
}

.profile-item label {
  font-weight: bold;
  color: #333;
  min-width: 100px;
}

.profile-item span {
  color: #666;
  text-align: right;
  flex: 1;
  margin-left: 20px;
}

/* 모의고사 문제 제어 버튼 영역 */
.question-controls {
    margin: 15px 0;
    text-align: right;
}

.toggle-lang-btn {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}

.toggle-lang-btn:hover {
    background: #138496;
}

.toggle-lang-btn.active {
    background: #28a745;
    color: white;
}

.toggle-lang-btn.active:hover {
    background: #218838;
}

/* 모의고사 결과 페이지 스타일 */
.mock-exam-result {
  max-width: 1000px;
  margin: 100px auto 0; /* 네비게이션 아래 적절한 간격 */
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.result-header {
  text-align: center;
  margin-bottom: 30px;
}

.result-header h2 {
  color: #333;
  margin: 20px 0;
}

.result-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.score-card {
  background: #ffffff;
  color: #333;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid #e0e0e0;
}

.score-display {
  margin-bottom: 20px;
}

.score-number {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 5px;
}

.score-label {
  font-size: 1.2em;
  opacity: 0.9;
}

.score-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.detail-item .label {
  font-weight: bold;
}

.detail-item .value {
  font-weight: bold;
}

.detail-item .value.correct {
  color: #4ade80;
}

.detail-item .value.wrong {
  color: #f87171;
}

.detail-item .value.unanswered {
  color: #fbbf24;
}

.exam-info-card {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 15px;
  border: 1px solid #e0e0e0;
}

.exam-info-card h3 {
  margin-bottom: 20px;
  color: #333;
}

.info-grid {
  display: grid;
  gap: 15px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item .label {
  font-weight: bold;
  color: #555;
}

.info-item .value {
  color: #333;
}

.question-results {
  margin-bottom: 30px;
}

.question-results h3 {
  margin-bottom: 20px;
  color: #333;
}

.results-grid {
  display: grid;
  gap: 15px;
}

.result-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.2s;
}

.result-card.correct {
  border-left: 4px solid #28a745;
  background: #ffffff;
}

.result-card.incorrect {
  border-left: 4px solid #dc3545;
  background: #ffffff;
}

.question-number {
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.question-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.status-icon {
  font-size: 1.2em;
}

.status-text {
  font-weight: bold;
}

.result-card.correct .status-text {
  color: #28a745;
}

.result-card.incorrect .status-text {
  color: #dc3545;
}

.question-text {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #333;
}

.answer-info {
  display: grid;
  gap: 8px;
}

.your-answer {
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #6c757d;
}

.correct-answer {
  padding: 8px 12px;
  background: #d4edda;
  border-radius: 6px;
  border-left: 3px solid #28a745;
  color: #155724;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

/* 모의고사 결과 페이지 반응형 스타일 */
@media (max-width: 768px) {
  .mock-exam-result {
    margin: 80px 10px 0;
    padding: 15px;
  }
  
  .result-summary {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .score-card {
    padding: 20px;
  }
  
  .score-number {
    font-size: 2.5em;
  }
  
  .score-details {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .exam-info-card {
    padding: 20px;
  }
  
  .info-grid {
    gap: 10px;
  }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 8px 0;
  }
  
  .result-card {
    padding: 15px;
  }
  
  .question-text {
    font-size: 0.95em;
    line-height: 1.5;
  }
  
  .answer-info {
    gap: 6px;
  }
  
  .your-answer,
  .correct-answer {
    padding: 6px 10px;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .mock-exam-result {
    margin: 70px 5px 0;
    padding: 10px;
  }
  
  .result-header h2 {
    font-size: 1.3em;
    margin: 15px 0;
  }
  
  .score-card {
    padding: 15px;
  }
  
  .score-number {
    font-size: 2em;
  }
  
  .score-label {
    font-size: 1em;
  }
  
  .exam-info-card {
    padding: 15px;
  }
  
  .exam-info-card h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
  }
  
  .detail-item {
    padding: 8px;
    font-size: 0.9em;
  }
  
  .info-item {
    font-size: 0.9em;
  }
  
  .result-card {
    padding: 12px;
  }
  
  .question-number {
    font-size: 0.9em;
  }
  
  .question-text {
    font-size: 0.9em;
  }
  
  .your-answer,
  .correct-answer {
    padding: 5px 8px;
    font-size: 0.85em;
  }
}

/* 새로운 모의고사 스타일 (mock_exam.html용) */
body {
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0 0 56px 0; /* 고정 푸터와 겹침 방지 */
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

.exam-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.timer {
  font-size: 1.2em;
  font-weight: bold;
}

.main-content {
  display: flex;
  min-height: 600px;
}

.question-section {
  flex: 1;
  padding: 10px;
  border-right: 1px solid #eee;
}

.minimap-section {
  width: 300px;
  padding: 20px;
  background: #f8f9fa;
}

.question {
  margin-bottom: 30px;
}

.question-header {
    margin-bottom: 15px;
}

.question-header strong {
    font-size: 1.2em;
    color: #2c5aa0;
    font-weight: bold;
}

.question-text {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #333;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.choice:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.choice.selected {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.nav-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prev-btn {
  background: #6c757d;
  color: white;
}

.prev-btn:hover:not(:disabled) {
  background: #5a6268;
}

.next-btn {
  background: #667eea;
  color: white;
}

.next-btn:hover:not(:disabled) {
  background: #5a6fd8;
}

.submit-btn {
  background: #28a745;
  color: white;
}

.submit-btn:hover:not(:disabled) {
  background: #218838;
}

.minimap-title {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}

.minimap-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.minimap-btn {
  width: 40px;
  height: 40px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.minimap-btn:hover {
  border-color: #667eea;
  background: #f8f9ff;
}

.minimap-btn.current {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.minimap-btn.answered {
  border-color: #28a745;
  background: #28a745;
  color: white;
}

.minimap-btn.flagged {
  border-color: #ffc107;
  background: #ffc107;
  color: #333;
}

.flag-btn {
  padding: 8px 16px;
  border: 2px solid #ffc107;
  background: white;
  color: #ffc107;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 10px;
  transition: all 0.3s ease;
}

.flag-btn.flagged {
  background: #ffc107;
  color: white;
}

.flag-btn:hover {
  background: #ffc107;
  color: white;
}

.loading {
  text-align: center;
  padding: 50px;
  color: #666;
}

.error {
  color: #dc3545;
  text-align: center;
  padding: 20px;
}





/* 모의고사 결과 화면 스타일 */
.result-summary {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.exam-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.result-stats h2 {
    color: #34495e;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.stat-label {
    font-weight: 600;
    color: #2c3e50;
}

.stat-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.stat-value.correct {
    color: #27ae60;
}

.stat-value.incorrect {
    color: #e74c3c;
}

.stat-value.unanswered {
    color: #95a5a6;
}

.question-results {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.question-results h2 {
    color: #34495e;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.result-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.question-number {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.question-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.question-status.correct {
    background: #d4edda;
    color: #155724;
}

.question-status.incorrect {
    background: #f8d7da;
    color: #721c24;
}

.question-status.unanswered {
    background: #e2e3e5;
    color: #383d41;
}

.question-preview {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* 상세 해설 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 5px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* 상세 해설 내용 스타일 */
.question-detail {
    line-height: 1.6;
}

.question-text h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.question-text p {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    margin-bottom: 2rem;
}

.answer-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.my-answer, .correct-answer {
    padding: 1rem;
    border-radius: 6px;
    border: 2px solid transparent;
}

.my-answer {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.correct-answer {
    background: #d4edda;
    border-color: #c3e6cb;
}

.my-answer h4, .correct-answer h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.my-answer h4 {
    color: #495057;
}

.correct-answer h4 {
    color: #155724;
}

.my-answer p, .correct-answer p {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.my-answer p.correct {
    color: #27ae60;
}

.my-answer p.incorrect {
    color: #e74c3c;
}

.my-answer p.unanswered {
    color: #95a5a6;
}

.correct-answer p {
    color: #155724;
}

.explanation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
}

.explanation h4 {
    color: #856404;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.explanation p {
    color: #856404;
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .quiz-page-container {
        flex-direction: column;
    }

    .quiz-sidebar {
        position: static;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .answer-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-buttons .btn {
        width: 100%;
        max-width: 300px;
    }


}

/* --- Mock Exam Setup Styles --- */
.mock-exam-setup {
    max-width: 800px;
    margin: 100px auto 0; /* 네비게이션 아래 적절한 간격 */
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.back-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

.mock-exam-setup h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
}

.exam-info {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;         
    flex-direction: column;
    justify-content: space-between;
}

.exam-info h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.exam-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.exam-info li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.exam-info li:last-child {
    border-bottom: none;
}

.exam-info strong {
    color: #333;
    font-weight: 600;
}

.progress-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.progress-section.hidden {
    display: none;
}

.progress-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.progress-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.progress-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.progress-item .label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.progress-item .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.warning-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 25px;
}

/* --- Organization List Card Styles --- */
.org-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 10px;
  justify-content: center;
}

.org-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  min-width: 150px;
  min-height: 120px;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.org-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.org-card img {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
}

.org-card h3 {
  margin: 0;
  color: #333;
  font-size: 1.1em;
}

.org-card-link {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 992px) {
  .org-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .org-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .org-grid {
    grid-template-columns: 1fr;
  }
}


/* --- 북마크 관련 스타일 --- */

/* 북마크 버튼 */
.bookmark-btn {
    background: none;
    border: none;
    font-size: clamp(1.2rem, 3vw, 1.5rem); /* 반응형 폰트 크기 */
    cursor: pointer;
    color: #ccc;
    transition: color 0.3s ease;
    padding: 0.3rem 0.6rem; /* 패딩 조정 */
    min-width: 2rem; /* 최소 너비 설정 */
}

.bookmark-btn.bookmarked {
    color: #ffd700;
}

.bookmark-btn:hover {
    color: #ffd700;
}

/* 북마크 페이지 스타일 */
.bookmarks-page-container {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 20px;
}

.bookmarks-header {
    text-align: center;
    margin-bottom: 40px;
}

.bookmarks-header h2 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.bookmarks-subtitle {
    color: #666;
    font-size: 1.1em;
}

.bookmarks-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 북마크 통계 섹션 */
.bookmarks-stats h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.stat-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.exam-code {
    background: #2d72d9;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.stat-content {
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    color: #333;
    font-weight: bold;
}

.view-exam-bookmarks-btn {
    width: 100%;
    background: #2d72d9;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.view-exam-bookmarks-btn:hover {
    background: #1a5bbd;
}

/* 북마크 목록 섹션 */
.bookmarks-list-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.bookmarks-list {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.loading-message, .error-message, .no-bookmarks {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
}

.error-message {
    color: #f44336;
}

.no-bookmarks {
    color: #999;
    font-style: italic;
}

/* 북마크 그룹 */
.exam-group {
    margin-bottom: 30px;
}

.exam-group:last-child {
    margin-bottom: 0;
}

.exam-group h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2d72d9;
    font-size: 1.3em;
}

.bookmark-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 북마크 아이템 */
.bookmark-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background: #fafafa;
    transition: background-color 0.2s;
}

.bookmark-item:hover {
    background: #f5f5f5;
}

.question-number {
    color: #2d72d9;
    font-weight: bold;
    font-size: 1.1em;
    margin-right: 10px;
    min-width: 30px;
    flex-shrink: 0;
}

.question-text {
    flex: 1;
    color: #333;
    font-weight: 500;
    margin-right: 15px;
    line-height: 1.4;
}

.bookmark-date {
    color: #666;
    font-size: 0.9em;
    margin-right: 15px;
    white-space: nowrap;
}

.bookmark-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.view-question-btn, .remove-bookmark-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s;
}

.view-question-btn {
    background: #2d72d9;
    color: white;
}

.view-question-btn:hover {
    background: #1a5bbd;
}

.remove-bookmark-btn {
    background: #f44336;
    color: white;
}

.remove-bookmark-btn:hover {
    background: #d32f2f;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .bookmarks-page-container {
        padding: 15px;
        margin-top: 80px;
    }
    
    .bookmarks-header h2 {
        font-size: 2em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bookmark-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bookmark-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .question-number {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .question-text {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .bookmark-date {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 로그인 필요 페이지 */
.login-required-container {
    max-width: 600px;
    margin: 100px auto 0;
    padding: 20px;
}

.login-required-content {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.login-required-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.login-required-content h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 15px;
}

.login-required-message {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.5;
}

.login-required-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.login-btn, .register-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-btn {
    background: #2d72d9;
    color: white;
}

.login-btn:hover {
    background: #1a5bbd;
}

.register-btn {
    background: #28a745;
    color: white;
}

.register-btn:hover {
    background: #218838;
}

.login-required-info {
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .login-required-container {
        padding: 15px;
        margin-top: 80px;
    }
    
    .login-required-content {
        padding: 30px 20px;
    }
    
    .login-required-content h2 {
        font-size: 1.8em;
    }
    
    .login-required-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .login-btn, .register-btn {
        width: 200px;
    }
}

/* --- 시험 응시 이력 페이지 스타일 --- */

/* 메인 컨테이너  */
.centered-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 필터링 섹션 */
.history-filters {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* 테이블 컨테이너 */
.history-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

/* 테이블 스타일 */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.history-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #dee2e6;
}

.history-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.history-table tbody tr:hover {
    background-color: #f8f9fa;
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

/* 시험명 컬럼 */
.exam-name strong {
    color: #333;
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.exam-full-name {
    color: #666;
    font-size: 12px;
}

/* 날짜 컬럼 */
.exam-date {
    color: #666;
    font-size: 14px;
}

/* 점수 컬럼 */
.exam-score strong {
    color: #333;
    font-size: 16px;
    display: block;
    margin-bottom: 2px;
}

.score-percentage {
    color: #666;
    font-size: 12px;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-in-progress {
    background-color: #fff3cd;
    color: #856404;
}

/* 소요시간 */
.exam-duration {
    color: #666;
    font-size: 14px;
}

/* 액션 버튼 관련 CSS 제거 - 더 이상 필요하지 않음 */

.btn-primary {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    /* padding 제거 - 각 버튼 크기별로 개별 설정 */
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: white;
}

.btn-sm {
    padding: 6px 12px;         /* 패딩을 늘려서 더 균형잡힌 모양 */
    font-size: 12px;           /* 폰트 크기도 약간 늘림 */
    vertical-align: middle;     /* 수직 중앙 정렬 */
    line-height: 1.2;          /* 줄 높이 조정 */
}

/* 요약 정보 */
.history-summary {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.history-summary p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.history-summary strong {
    color: #333;
    font-weight: 600;
}

/* 이력이 없는 경우 */
.no-history {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.no-history-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.no-history h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-history p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.no-history .btn {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    max-width: 100%;           /* 최대 너비 제한 */
    box-sizing: border-box;    /* 패딩과 보더를 너비에 포함 */
    word-wrap: break-word;     /* 긴 텍스트 줄바꿈 */
    white-space: normal;       /* 텍스트 줄바꿈 허용 */
}

/* 시험 응시 이력 페이지 반응형 디자인 */
@media (max-width: 768px) {
    .history-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .filter-group select {
        min-width: auto;
    }
    
    .history-table {
        font-size: 12px;
    }
    
    .history-table th,
    .history-table td {
        padding: 10px 8px;
    }
    
    .exam-name strong {
        font-size: 14px;
    }
    
    .exam-score strong {
        font-size: 14px;
    }
    
    /* 상세보기 버튼 관련 CSS 제거 - 더 이상 필요하지 않음 */
    
    .no-history {
        padding: 40px 15px;
    }
    
    .no-history h3 {
        font-size: 1.3rem;
    }
    
    .no-history .btn {
        padding: 10px 20px;    /* 모바일에서 패딩 줄임 */
        font-size: 14px;       /* 모바일에서 폰트 크기 줄임 */
        width: auto;            /* 자동 너비 설정 */
        max-width: 90%;         /* 컨테이너의 90%로 제한 */
    }
}

/* 문제 번호 찾기 기능 스타일 */
.question-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1.25rem; /* 페이징 버튼들과의 간격 */
}

.question-search-input {
    width: 5rem; /* 80px 대신 rem 사용 */
    height: 2rem; /* 고정 높이 */
    padding: 0.375rem 0.625rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem; /* 4px 대신 rem 사용 */
    font-size: 0.875rem; /* 14px 대신 rem 사용 */
    text-align: center;
    box-sizing: border-box;
    line-height: 1.2; /* 텍스트 수직 정렬 */
    display: flex; 
    align-items: center;
    justify-content: center;
}

.question-search-btn {
    height: 2rem; /* min-height → height로 변경 */
    padding: 0.375rem 0.625rem;
    line-height: 1.2;
    background: linear-gradient(180deg, #1e90ff, #176fd1);
    color: white;
    box-shadow: 0 6px 20px rgba(30,144,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    box-sizing: border-box;
}



.question-search-input:focus {
  outline: none;
  border-color: #2d72d9;
  box-shadow: 0 0 0 2px rgba(45, 114, 217, 0.2);
}

.question-search-btn:hover {
    background-color: #1e5bb8;
}

.question-search-btn:active {
    transform: translateY(1px);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
        margin-top: 1rem;
        flex-direction: row; /* 모바일에서 가로 배치 */
    }
    
    .pagination .page {
        width: 1.75rem; /* 모바일에서 크기 줄임 */
        height: 1.75rem;
        min-width: 1.75rem;
        padding: 0.25rem 0.5rem; /* 모바일에서 패딩 줄임 */
        font-size: 0.8rem; /* 모바일에서 폰트 크기 줄임 */
    }
    
    .pagination .nav-btn {
        height: 1.75rem; /* 모바일에서 크기 줄임 */
        min-width: 1.75rem;
        padding: 0.25rem 0.25rem; /* 모바일에서 패딩 줄임 */
        font-size: 0.8rem; /* 모바일에서 폰트 크기 줄임 */
    }
    
    .question-search {
        margin-left: 0;
        margin-top: 0.625rem; /* 10px 대신 rem 사용 */
    }
    

    
    .question-search-input {
        width: 4rem;
        font-size: 0.8rem;
    }
    
    .question-search-btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
}

/* 태블릿 반응형 */
@media (min-width: 769px) and (max-width: 1024px) {
    .pagination {
        gap: 0.375rem;
    }
    
    .pagination .page {
        width: 1.875rem; /* 태블릿에서 중간 크기 */
        height: 1.875rem;
        min-width: 1.875rem;
        font-size: 0.85rem; /* 태블릿에서 중간 폰트 크기 */
    }
    
    .pagination .nav-btn {
        height: 1.875rem; /* 태블릿에서 중간 크기 */
        min-width: 1.875rem;
        font-size: 0.85rem; /* 태블릿에서 중간 폰트 크기 */
    }
    
    .question-search-input {
        width: 4.5rem; /* 태블릿에서 중간 크기 */
    }
    
    .question-search-btn {
        height: 1.875rem;
        font-size: 0.85rem;
        padding: 0.3125rem 0.5625rem;
    }
}

/* 대형 화면 반응형 */
@media (min-width: 1025px) {
    .pagination {
        gap: 0.625rem;
        margin-top: 2rem;
    }
    
    .pagination .page {
        width: 2.25rem; /* 대형 화면에서 크기 증가 */
        height: 2.25rem;
        min-width: 2.25rem;
        padding: 0.375rem 0.75rem; /* 대형 화면에서 패딩 증가 */
        font-size: 0.9rem; /* 대형 화면에서 폰트 크기 증가 */
    }
    
    .pagination .nav-btn {
        height: 2.25rem; /* 대형 화면에서 크기 증가 */
        min-width: 2.25rem;
        padding: 0.4375rem 0.4375rem; /* 대형 화면에서 패딩 증가 */
        font-size: 0.9rem; /* 대형 화면에서 폰트 크기 증가 */
    }
    
    .question-search-input {
        width: 5.5rem; /* 대형 화면에서 크기 증가 */
    }
    
    .question-search-btn {
        height: 2.25rem;
        font-size: 0.9rem;
        padding: 0.4375rem 0.6875rem;
    }
}

/* 초소형 모바일 반응형 */
@media (max-width: 480px) {
    .pagination {
        gap: 0.125rem;
    }
    
    .pagination .page {
        width: 1.5rem; /* 초소형 모바일에서 더 작은 크기 */
        height: 1.5rem;
        min-width: 1.5rem;
        padding: 0.1875rem 0.375rem; /* 초소형 모바일에서 더 작은 패딩 */
        font-size: 0.75rem; /* 초소형 모바일에서 더 작은 폰트 */
    }
    
    .question-search-input {
        width: 3.5rem; /* 초소형 모바일에서 더 작은 너비 */
        height: 1.5rem; /* 초소형 모바일에서 더 작은 높이 */
        font-size: 0.75rem; /* 초소형 모바일에서 더 작은 폰트 */
    }
    
    .pagination .nav-btn {
        height: 1.5rem; /* 초소형 모바일에서 더 작은 크기 */
        min-width: 1.5rem;
        padding: 0.1875rem 0.1875rem; /* 초소형 모바일에서 더 작은 패딩 */
        font-size: 0.75rem; /* 초소형 모바일에서 더 작은 폰트 */
    }
    
    .question-search-btn {
        height: 1.5rem;
        font-size: 0.75rem;
        padding: 0.1875rem 0.375rem;
    }
}

/* 회원탈퇴 모달 스타일 */
.withdrawal-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    overflow-y: auto;
}

.withdrawal-modal .modal-header {
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #eee;
}

.withdrawal-modal .modal-title {
    margin: 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.withdrawal-modal .modal-content {
    padding: 20px;
}

.withdrawal-modal .warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.withdrawal-modal .warning-message ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.withdrawal-modal .warning-message li {
    color: #856404;
    margin-bottom: 5px;
}

.withdrawal-modal .modal-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.withdrawal-modal .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.withdrawal-modal .btn-secondary {
    background: #6c757d;
    color: white;
}

.withdrawal-modal .btn-secondary:hover {
    background: #5a6268;
}

.withdrawal-modal .btn-danger {
    background: #dc3545;
    color: white;
}

.withdrawal-modal .btn-danger:hover {
    background: #c82333;
}

/* 태블릿 (768px 이하) */
@media (max-width: 768px) {
    .withdrawal-modal {
        width: 90%;
        max-width: 450px;
        max-height: 80vh;
        margin: 20px;
    }
}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
    .withdrawal-modal {
        width: 95%;
        max-width: 350px;
        max-height: 90vh;
        margin: 10px;
        border-radius: 6px;
    }
    
    .withdrawal-modal .modal-title {
        font-size: 18px;
        padding: 15px 20px;
    }
    
    .withdrawal-modal .modal-content {
        padding: 20px;
    }
    
    .withdrawal-modal .btn {
        min-height: 44px;
        font-size: 16px;
        margin: 10px 0;
    }
}

/* 초소형 모바일 (320px 이하) */
@media (max-width: 320px) {
    .withdrawal-modal {
        width: 98%;
        margin: 5px;
    }
    
    .withdrawal-modal .modal-content {
        padding: 15px;
    }

    .hamburger i {
      font-size: 24px;
      color: #fff; /* 가로 바를 흰색으로 */
    }
    
    .hamburger:hover i {
      color: #ccc; /* 호버 시 연한 회색 */
    }
  }

@media (max-width: 768px) {
  .navbar-container {
    justify-content: space-between; /* 좌우 정렬 유지 */
  }

  .navbar-auth {
    display: none;
    flex-direction: row;
    position: absolute;
    top: 49px;
    right: 0;
    background-color: #333;
    width: 100%;
    text-align: center;
    gap: 10px;
    justify-content: center;
  }

  .navbar-auth.active {
    display: flex;
  }

  .hamburger {
    display: block; /* 모바일에서만 보이게 */
    background: #222;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    margin-left: auto; /* 우측 정렬 */
    order: 2; /* 맨 오른쪽으로 */
  }

  .hamburger i {
    font-size: 24px;
    color: #fff;
  }

  .hamburger:hover i {
    color: #ccc;
  }
}

/* 상세보기 버튼 특화 스타일 제거 - 더 이상 필요하지 않음 */

/* 시험명 링크 스타일 */
.exam-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: color 0.2s ease;
}

.exam-link:hover {
    color: #007bff;
}

.exam-link:hover strong {
    color: #007bff;
}

/* 액션 버튼 관련 스타일 제거 - 더 이상 필요하지 않음 */

/* --- Notice Rolling Styles (Revised for smooth animation) --- */
.notice-rolling-container {
    width: 100%;
    padding: 15px 0px;
    /* background-color: #103d5b; */
    background-color: #2b0808;
    /* border-radius: 10px; */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Important for rolling effect */
    height: 25px; /* Show 3 lines (approx 1.2 * 3 = 3.6em height, plus padding) */
    display: flex;
    align-items: center;
    position: relative; /* For absolute positioning of wrapper */
    z-index: 0;
}

.notice-rolling-wrapper {
    width: 100%;
    height: auto; /* Let content define height */
    position: absolute; /* Position relative to container */
    top: 0;
    left: 0;
    transition: transform 0.5s ease-in-out; /* Smooth transition for rolling */
}

.notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    font-size: 1em;
    color: #eff2f2;
    padding: 2px 0;
    margin-bottom: 5px; /* Added spacing */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    cursor: pointer; /* Indicate clickable */
    padding-left: 10px; /* Indent for better look */
}

.notice-list li:last-child {
    margin-bottom: 0; /* 마지막 항목은 마진 없음 */
}

.notice-rolling-container p {
    font-size: 1.1em;
    color: #00796b;
    text-align: center;
    margin: 0;
    width: 100%; /* Ensure it takes full width */
}

/* --- Notice Detail Modal Styles --- */
.notice-detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Higher than other modals if any */
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}

.notice-detail-modal-overlay.show {
    visibility: visible;
    opacity: 1;
}

.notice-detail-modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}

.notice-detail-modal-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.notice-detail-modal-box .modal-content-body {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    white-space: pre-wrap; /* Preserve whitespace and line breaks */
    word-wrap: break-word; /* Break long words */
}

.notice-detail-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #888;
}

.notice-detail-modal-close:hover {
    color: #333;
}

/* .ad-container {
  width: 50%; 
  margin: 0 auto;
  justify-content: center;
  align-items: center;
} */