:root {
  --main-color: #2A4365;
  --accent-color: #F6AD55;
  --bg-color: #F7FAFC;
  --text-color: #2D3748;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  scroll-behavior: auto;
  touch-action: manipulation;
  
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--text-color);
  background-color: white;
}

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
}

/* 헤더 스타일 */
.header {            
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  background: rgba(42, 67, 101, 0.9);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.logo {
  max-width: 200px; 
  width: 100%;
  height: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.desktop-nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s;
}

.desktop-nav a:hover {
  color: var(--accent-color);
}

.admin-link {
  margin-left: 30px;
  color: var(--accent-color) !important;
  font-weight: 700 !important;
}

/* Footer */
.footer {
  background: #2A4365;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  width: 200px;
}

.footer-section {
  width: 250px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

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

.footer-section ul li {
  margin: 0.5rem 0;
}
.footer-section a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #F6AD55;
}

.footer-section ul li a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: #F6AD55;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}

.social-icons img:hover {
  transform: scale(1.1);
}

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  font-size: 0.9rem;
}
.footer-bottom a{
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-bottom a:hover{
  color: #F6AD55;
}
/*쳇봇*/
/* 🔥 챗봇 플로팅 버튼 스타일 */
.chat-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--main-color);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s;
  z-index: 1050;
  position: relative;
  overflow: visible;
}

/* 토글버튼의 말풍선 꼬리 제거 */
.chat-toggle-btn:after {
  /* 기존 꼬리 스타일 삭제 */
  display: none;
}

.chat-toggle-btn:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}

/* ✅ 챗봇 창 기본 스타일 */
.chatbot-container {
  position: fixed;
  bottom: 110px;
  right: 20px;
  width: 320px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInUp 0.3s ease-out;
  z-index: 1051;
}

/* 챗봇 헤더 */
.chat-header {
  background: var(--main-color);
  color: white;
  padding: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

/* 챗봇 본문 (채팅 영역) - 높이 증가 */
.chat-body {
  height: 400px; /* 250px → 400px로 증가 */
  overflow-y: auto;
  padding: 15px;
  font-size: 1rem;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  background: #f8f9fa; /* 배경색 추가로 대화창 구분 */
}
.send-btn {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  display: inline-block;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap;
}

/* ✅ 자주 묻는 질문 버튼 스타일 */
.faq-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px;
  justify-content: center;
}

.faq-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.3s;
}

.faq-btn:hover {
  background: var(--main-color);
}



/* 챗봇 입력창 */
.chat-input {
  width: 100%;
  padding: 10px;
  border: none;
  border-top: 1px solid #ddd;
  font-size: 1rem;
}

/* 채팅 메시지 스타일 */
.chat-body div {
  background: var(--bg-color);
  padding: 8px 12px;
  border-radius: 15px;
  margin-bottom: 5px;
  max-width: 100%;
  word-wrap: break-word;
}

.chat-body div strong {
  font-weight: 600;
}

/* 사용자 메시지: 오른쪽 정렬 */
.chat-message.user {
  align-self: flex-end;
  background: #4a90e2; /* 파란색 배경 */
  color: white; /* 흰색 텍스트로 명확한 대비 */
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
  margin: 8px 0;
  max-width: 80%;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

/* === 통합된 챗봇 말풍선 디자인 === */
/* 챗봇 메시지 컨테이너 */
.chat-message.bot {
  align-self: flex-start;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  max-width: 98%;
  text-align: left;
}

/* 통합된 챗봇 말풍선 스타일 */
.chat-message.bot .message-content {
  background: #ffffff;
  color: #2d3748;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--accent-color, #4a90e2);
  border-radius: 18px 18px 18px 4px;
  padding: 16px 20px;
  margin: 12px 0;
  box-shadow: 0 3px 15px rgba(42, 67, 101, 0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
  font-weight: 500;
  flex: 1;
  transition: box-shadow 0.2s ease;
}

/* 호버 효과 */
.chat-message.bot .message-content:hover {
  box-shadow: 0 5px 20px rgba(42, 67, 101, 0.15);
}

/* 챗봇 프로필 아이콘 */
.chat-message.bot .profile-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-color, #4a90e2);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  margin-top: 2px;
}

/* 채팅 애니메이션 */
@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* 타이핑 인디케이터 스타일 */
.typing-indicator {
  background: #ffffff;
  color: #666;
  border: 1px solid #e1e8ed;
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  margin: 8px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* 에러 메시지 스타일 */
.error-message {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
  color: #856404;
}

.error-message button {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.3s;
}

.error-message button:hover {
  background: #357abd;
}

/* 퀵 메뉴 토글 래퍼 개선 */
.chat-toggle-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1060;
}

/* 퀵 메뉴 스타일 */
.quick-menu-toggle {
    position: absolute;
    top: 8px;
    right: 12px;
    background: var(--accent-color);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s, background 0.3s;
    z-index: 1;
    color: white;
}

.quick-menu-toggle:hover {
    transform: scale(1.1);
    background: #e08e3e;
}

.quick-menu {
    position: absolute;
    top: 50px;
    right: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    display: none;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    max-width: 250px;
    z-index: 1052;
    animation: 0.3s ease-out fadeInDown;
}

.quick-btn {
    background: var(--bg-color);
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 10px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
}

.quick-btn:hover {
    background: var(--main-color);
    color: #fff;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 메시지 내부 요소 스타일 */
.message-content h4 {
    color: var(--main-color, #2a4365);
    margin-bottom: 12px;
    font-size: 1.1rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
    font-weight: 600;
}

.message-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.message-content li {
    margin: 6px 0;
    line-height: 1.6;
}

.message-content p {
    margin: 10px 0;
    line-height: 1.6;
}

.message-content button {
    background: var(--accent-color, #4a90e2);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    margin: 8px 4px 8px 0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.2);
}

.message-content button:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✅ 반응형 (모바일 대응) */
@media (max-width: 950px) {
  .chatbot-container {
      width: 90%;
      right: 5%;
      bottom: 90px; /* 모바일에서 하단 여백 조정 */
  }

  .chat-toggle-btn {
      font-size: 1.3rem;
      width: 55px;
      height: 55px; /* 모바일에서 약간 작게 */
  }

  .chat-body {
      height: 350px; /* 모바일에서 높이 약간 조정 */
      padding: 12px;
  }

  .chat-message.bot {
      max-width: 96%; /* 모바일에서 너비 조정 */
  }
  
  .chat-message.bot .message-content,
  .chat-message.user {
      font-size: 0.9rem; /* 모바일에서 폰트 크기 조정 */
      padding: 14px 18px; /* 모바일에서 패딩 약간 축소 */
  }
}



/* 히어로 섹션 */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(42, 67, 101, 0.8), rgba(42, 67, 101, 0.8)),
              url('/uploads/img/main_image1_L.jpeg') center/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
}

.hero h1 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
  font-size: Clamp(3rem, 5vw,6rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}
.hero h2{
  opacity: 0;
  transform: translateY(20px);
  margin-bottom: 40px;
  animation: fadeInUp 1s ease-out forwards;
}

.cta-buttons a {
  margin-top: 2rem;
  display: inline-block;
  padding: 1rem 2rem;
  margin: 4 1rem;
  border: 3px solid white;
  border-radius: 30px;
  background: transparent;
  color: white;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cta-btn {
  display: inline-block;
  padding: 1rem 2rem;
  margin: 0 1rem;
  border: 3px solid white;
  border-radius: 30px;
  background: transparent;
  color: white;
  font-size: 1.1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cta-buttons a:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: scale(1.05);
}

/* 섹션 공통 스타일 */
section {
  padding: 5rem 10%;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}
      
.section-content h2 {
  align-items: center;
  text-align: center;
}
/* 스크롤 다운 화살표 스타일 */
.scroll-down-arrow {
  /* 위치 관련 속성 제거: position, bottom, left, transform */
  cursor: pointer;
  width: 52px;
  height: 52px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  margin: 24px auto 0 auto; /* 버튼 아래 여백, 가운데 정렬 */
}


/* 스크롤 다운 화살표 호버 효과 (선택 사항) */
.scroll-down-arrow:hover {
  background-color: rgba(255, 255, 255, 0.1); /* 하얀색 투명 배경 */
}

/* 스크롤 다운 화살표 아이콘 (CSS로 생성) */
.scroll-down-arrow::before {
  content: ''; /* 가상 요소 생성 */
  width: 13px; /* 화살표 선 길이 (10px -> 13px) */
  height: 13px; /* 화살표 선 길이 (10px -> 13px) */
  border-left: 2px solid #fff; /* 화살표 왼쪽 선 색상: 하얀색 */
  border-bottom: 2px solid #fff; /* 화살표 아래쪽 선 색상: 하얀색 */
  transform: rotate(-45deg); /* 아래쪽을 향하도록 회전 */
  animation: bounce 2s infinite; /* 바운스 애니메이션 적용 */
}

/* 화살표 바운스 애니메이션 정의 */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
      transform: translateY(0) rotate(-45deg);
  }
  40% {
      transform: translateY(-8px) rotate(-45deg); /* 위로 살짝 이동 */
  }
  60% {
      transform: translateY(-4px) rotate(-45deg); /* 중간 지점으로 이동 */
  }
}

/* 모바일 화면 대응 (선택 사항, 필요시 크기 조절) */
@media (max-width: 768px) {
  .scroll-down-arrow {
      width: 46px;
      height: 46px;
      margin-top: 18px;
  }
  .scroll-down-arrow::before {
      width: 10px;
      height: 10px;
  }
}

/* 문제 해결 섹션 */
.problem-solve {
  background: var(--bg-color);
  gap: 3rem;
}

.split-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  text-align: center;
}

.split-item {
  flex: 1;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 1rem 0;
}

/* 섹션3 */
.auto-search-demo {
  background: #f8fafc;
  padding: 5rem 10%;
  text-align: center;
}

.search-container {
  max-width: 600px;
  margin: 3rem auto;
}

.fake-searchbar {
  position: relative;
  height: 60px;
  border: 3px solid var(--main-color);
  border-radius: 40px;
  padding: 0 25px;
  display: flex;
  align-items: center;
  background: white;
  box-shadow: 0 8px 20px rgba(42, 67, 101, 0.15);
}

.search-icon {
  font-size: 1.5rem;
  margin-right: 15px;
}

.dynamic-text {
  flex-grow: 1;
  text-align: left;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.typed-text {
  color: var(--main-color);
  font-weight: 500;
  font-size: 1.1rem;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 25px;
  background: var(--accent-color);
  margin-left: 3px;
  animation: blink 1s infinite;
}

.result-preview {
  max-width: 400px;
  margin: 3rem auto;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.result-card {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.result-badge {
  background: var(--accent-color);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.result-details p {
  margin: 0.8rem 0;
  color: var(--text-color);
}

.highlight {
  color: var(--main-color);
  font-weight: 600;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 🔥 종목별 Top10 섹션 스타일 */
.top10-section {
  background: #f3f4f6;
  padding: 60px 0;
  text-align: center;
  
}

.top10-section h3 {
  font-size: 1.8rem;
  color: #2A4365;
  margin-bottom: 20px;
}

.ranking-animation {
  margin-top: 20px;

}

.ranking-item {
  background: white;
  padding: 15px 25px;
  margin: 10px 0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-20px);
}

/* 애니메이션 */
.animate-rank {
  animation: rankSlide 0.8s ease-out forwards;
}

@keyframes rankSlide {
  to {
      opacity: 1;
      transform: translateX(0);
  }
}

/* 지연 시간 설정 */
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.6s; }
.delay-3 { animation-delay: 0.9s; }
.delay-4 { animation-delay: 1.2s; }

/* 섹션 4 */
.advantage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.advantage-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 4rem 0;
}

.stat-item {
  text-align: center;
}

.stat-box {
  background: #FFD700;
  padding: 2rem 3rem;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 200px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: black;
}

.stat-label {
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.about-section{
  background: rgba(42, 67, 101, 0.5)
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.notice {
  display: block;
  margin-top: 1rem;
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 950px) {
  .stats-container {
      flex-direction: column;
      gap: 2rem;
  }
  .ranking-item {
    width: 80%;
    align-items: center;
  }
  .ranking-animation{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
          
  .gallery-grid {
      grid-template-columns: 1fr;
  }
}

/* 이미지 모달 스타일 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

/* 중복된 .modal-content 스타일 제거 (중앙 고정 스타일로 통일) */

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--accent-color);
}

/* 모바일 네비게이션 */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 25px;
  right: 20px;
  z-index: 1002;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 30px;
  height: 3px;
  background: white;
  margin: 5px 0;
  transition: 0.3s;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  max-width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 20px;
  z-index: 1103;
  transition: 0.3s;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.close-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
}

.mobile-nav li {
  list-style: none;
  margin: 15px 0;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1rem;
  transition: 0.3s;
}

.mobile-nav a:hover {
  color: var(--accent-color);
}

/* 반응형 디자인 */
@media (max-width: 950px) {
  .header {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  .desktop-nav {
      display: none;
  }

  .mobile-menu-btn {
      display: block;
  }

  .split-layout {
      flex-direction: column;
  }

  section {
      padding: 3rem 5%;
  }
  .hero h1 {
      font-size: Clamp(3rem, 5vw, 5rem);
  }

  .cta-buttons a {
      display: block;
      margin: 1rem auto;
  }
  .logo {
      margin-top: 0.7rem;
      max-width: 100px; 
      width: 50%;
      height: auto;
  }
}

@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}
/* selectTournaments 스타일 */
.main-background {
  position: relative;
  height: calc(100vh - 100px); /* 화면 전체 높이에서 헤더 높이 제외 */
  background: url('/uploads/img/selectTBanner.webp') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.select-container {
  background: rgba(0, 0, 0, 0.5); /* 배경 반투명 처리 */
  padding: 30px;
  border-radius: 12px;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.main-subtitle {
  font-size: 40px;
  margin-bottom: 20px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.select-label {
  display: block;
  margin-bottom: 20px;
  font-size: 18px;
  color: #ffffff;
}

.select-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* 요소들이 다음 줄로 넘어가도록 설정 */
  gap: 1rem; /* 요소들 사이의 간격 */
  margin-top: 1rem; /* 레이블과의 간격 */
}

/* 드롭다운이 항상 전체 너비를 차지하도록 설정하여 버튼을 아래로 내립니다 */
.select-wrapper .tournament-dropdown {
  flex-basis: 100%; /* flex 아이템의 기본 크기를 컨테이너의 100%로 설정 */
  max-width: 400px; /* 최대 너비 제한 (선택 사항) */
}

.select-button {
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  color: #1e1e2f;
  background-color: #ffdf00;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}


.select-button:hover {
  background-color: #ffd700;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  margin-left: 2rem;
  font-weight: 500;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-color);
}
/* 결과 페이지 전용 스타일 */
#resultsPage section {
  display: block;        /* 기본 블록 흐름으로 전환 */
  min-height: auto;      /* 굳이 100vh가 필요 없다면 제거 */
  padding: 2rem 3%;     /* 여백 조정 */
  margin-top: 4rem;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--main-color);
}

/* 검색 바 스타일 */
.search-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

#searchQuery {
  flex-grow: 1;
  padding: 1rem 1.5rem;
  border: 2px solid var(--main-color);
  border-radius: 30px;
  font-size: 1rem;
  width: 100%;
}

#searchButton {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.3s;
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  white-space: nowrap;
}

#searchButton:hover {
  transform: scale(1.05);
  background: var(--accent-color);
}

/* 테이블 기본 스타일 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    border: 2px solid #000;
}

table, th, td {
    padding: 1rem;
    text-align: center;
    white-space: nowrap;
    border: 1px solid #000;
}

/* 테이블 헤더 */
thead {
    background: var(--main-color);
    color: white;
    font-size: 1rem;
    text-align: center;
}

/* 테이블 본문 글자 크기 증가 */
tbody td {
    font-size: 1.1rem;
    padding: 1.2rem 1rem;
}

tbody tr:hover {
    background-color: var(--bg-color);
}

.card-view {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin: 1rem 0;
  padding: 1rem;
  transition: transform 0.3s;
}
.card-view:hover {
  transform: scale(1.01);
}
.card-view p {
  margin: 0.4rem 0;
}

/* 레코드 카드 스타일 */
.record-card {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  margin: 1rem 0;
  padding: 1rem;
  transition: transform .3s;
}

.record-card:hover {
  transform: scale(1.01);
}

.record-card p {
  margin: 0.4rem 0;
}

/* 인쇄 관련 스타일 */
.record-card.printing .certificate-btn { 
  display: none; 
}

/* 상장 인쇄 버튼 스타일 */
.certificate-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #28a745;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.certificate-btn:hover {
  background: #218838;
  transform: scale(1.05);
}

/* 필터 섹션 */
.filter-section {
  display: block;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.filter-section label {
  font-weight: 500;
}

select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--main-color);
  border-radius: 20px;
  background: white;
  text-align: center !important; 
}

#filterTop10Button {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}

#filterTop10Button:hover {
  background: var(--accent-color);
}

/* 보기 전환 버튼 스타일 */
.view-toggle-buttons {
  display: block;
  gap: 1rem;
  margin-bottom: 2rem;
}

.view-toggle-buttons button {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.view-toggle-buttons button:hover {
  transform: scale(1.05);
  background: var(--accent-color);
}

/* 반응형 디자인 */
@media (max-width: 950px) {

  nav a {
    margin-left: 1rem;
  }

  .search-bar {
    flex-direction: column;
    flex-grow: 1;
  }
  .search-bar Button{
    font-size: 1rem;
  }
  #searchButton {
    width: 100%;
  }
  .view-toggle-buttons {
    display: flex;
    gap: 1rem;
  }

  .filter-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-size: 1rem;
  }
  .filter-section Button {
    font-size: 1rem;
  }
  select {
    font-size: 1.1rem;     /* 원래보다 크게 */
    padding: 0.7rem 1rem;  /* 내부 여백도 늘림 */
    text-align: center !important; /* 텍스트 가운데 정렬 */
  }

    .search-bar select,
    .filter-section select {
        text-align: center;
        text-align-last: center;
        -moz-text-align-last: center;
        font-size: 16px;  /* 기본 글자 크기 */
    }
    
    .search-bar,
    .filter-section {
        text-align: center;
    }

    select::-ms-expand {
        display: none;
    }

    /* 드롭다운 목록이 열렸을 때의 옵션 스타일 */
    select option {
        font-size: 16px;  /* 옵션 글자 크기 */
        padding: 10px;    /* 옵션 내부 여백 */
        line-height: 1.5; /* 줄 간격 */
    }

  table {
    display: table;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* 테이블 본문 글자 크기 유지 */
  tbody td {
    font-size: 1rem;
    padding: 1rem 0.8rem;
  }

}
/* 조회 페이지 스타일 */
 
  .search-bar button {
    padding: 0.5em 1em;
    background-color: #32CD32;
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    border-radius: 30px;
  }
  .search-result-table, .top10-table {
    width: auto;
    table-layout: auto;
    overflow-x: auto;
    border-collapse: collapse;
  }
  .search-result-table th, .search-result-table td,
  .top10-table th, .top10-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
  }

/* 추가: 테이블만 가로 스크롤 되도록 하는 스타일 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-responsive table {
    min-width: 600px;
    width: max-content;
}
  
/***************************************************************
 * 관리자 페이지 전용 스타일
 ***************************************************************/

/* 관리자 페이지 최상위 섹션 제목 */
#adminPage section {
  display: block;        /* 기본 블록 흐름으로 전환 */
  padding: 2rem 10%;     /* 여백 조정 */
  margin-top: 2rem;
}
#adminPage .section-title {
  font-size: 2rem;
  color: var(--main-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* 로그아웃 버튼 스타일 */
#adminPage form[action="../backend/logout.php"] button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  margin-left: 1rem;
  transition: background 0.3s;
}
#adminPage form[action="../backend/logout.php"] button:hover {
  background: #f09045; /* var(--accent-color)보다 조금 어두운 톤 */
}

/* 관리자 대시보드 전체 컨테이너 */
.admin-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem 0;
}

/* 대시보드 카드 */
.admin-card {
  flex: 1;
  min-width: 280px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* teamRecordDownload.html에서만 admin-card를 세로로 강제 */


.admin-card h4 {
  font-size: 1.3rem;
  color: var(--main-color);
  margin-bottom: 0.8rem;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 0.5rem;
}

/* 카드 내부 폼요소 */
.admin-card label {
  display: inline-block;
  margin: 0.8rem 0 0.3rem;
  font-weight: 600;
  color: var(--text-color);
}
.admin-card input[type="text"] {
  width: 100%;
  border: 2px solid var(--main-color);
  border-radius: 5px;
  padding: 0.4rem;
}
.admin-card button {
  margin-top: 0.6rem;
  background: var(--main-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}
.admin-card button:hover {
  background: #1f2f46; /* var(--main-color)보다 조금 어두운 톤 */
}

/* 업로드 현황 섹션의 리스트 */
.admin-card ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.admin-card li {
  margin: 0.3rem 0;
  color: var(--text-color);
}

/* 로그 뷰어 */
#log-list {
  max-height: 250px; 
  overflow-y: auto; 
  border: 1px solid #ddd; 
  border-radius: 8px; 
  padding: 0.5rem;
}
#log-list li {
  font-size: 0.9rem;
  margin: 0.2rem 0;
  line-height: 1.3;
}
#view-all-logs {
  background: var(--accent-color);
  margin-top: 0.5rem;
  border-radius: 20px;
  transition: background 0.3s;
}
#view-all-logs:hover {
  background: #f09045;
}

/* CSV 업로드 섹션 */
.upload-section {
  margin-top: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  padding: 1.5rem;
}
.upload-section h4 {
  font-size: 1.3rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 0.5rem;
}
.upload-section label {
  display: inline-block;
  margin: 0.6rem 0 0.3rem;
  font-weight: 600;
  color: var(--text-color);
}
.upload-section select,
.upload-section input[type="file"] {
  margin-bottom: 1rem;
}
#uploadCSV {
  background: var(--main-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}
#uploadCSV:hover {
  background: #1f2f46;
}

/* 데이터 관리 섹션 */
.data-manage-section {
  margin-top: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  padding: 1.5rem;
}
.data-manage-section h4 {
  font-size: 1.3rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 0.5rem;
}

.data-manage-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.data-manage-section thead {
  background: var(--main-color);
  color: white;
}
.data-manage-section th,
.data-manage-section td {
  border: 1px solid #ddd;
  padding: 0.8rem;
  text-align: center;
}
.data-manage-section tbody tr:hover {
  background-color: var(--bg-color);
}
.data-manage-section button {
  background: var(--accent-color);
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}
.data-manage-section button:hover {
  background: #f09045;
}

/************************************************************
 * 반응형 디자인
 ************************************************************/
@media (max-width: 950px) {
  .admin-dashboard {
    flex-direction: column;
  }

  .admin-card {
    margin-bottom: 1rem;
  }

  .upload-section,
  .data-manage-section {
    margin-bottom: 1.5rem;
  }
  #adnubPage section {
    display: block;        /* 기본 블록 흐름으로 전환 */
    min-height: auto;      /* 굳이 100vh가 필요 없다면 제거 */
    padding: 2rem 10%;     /* 여백 조정 */
    margin-top: 2rem;
  }
}

/* 관리자 페이지 모바일 최적화 스타일 */
#adminPage .container {
    padding: 1rem;
    max-width: 100%;
}

#adminPage section {
    padding: 1rem;
    margin-top: 4rem;
}

#adminPage .admin-dashboard {
    gap: 1rem;
    margin: 1rem 0;
}

#adminPage .admin-card {
    min-width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
}

#adminPage .data-manage-section {
    padding: 1rem;
    overflow-x: hidden;
}

/* 컨트롤 그룹 모바일 최적화 */
.record-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.control-group label {
    font-size: 0.9rem;
}

.control-group select,
.control-group input {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
}

/* 버튼 모바일 최적화 */
#adminPage form button,
#adminPage .admin-card button,
#adminPage .upload-section button,
#adminPage .data-manage-section button {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.8rem;
    font-size: 1rem;
}

/* 모달 모바일 최적화 */
/* 중복된 .modal-content 스타일 제거 (중앙 고정 스타일로 통일) */

.modal .form-group {
    margin-bottom: 1rem;
}

.modal .form-group input,
.modal .form-group select {
    font-size: 1rem;
    padding: 0.8rem;
}

/* 테이블 컨테이너 모바일 최적화 */
.data-manage-section .table-container {
    margin: 1rem -1rem;
    padding: 0;
}

@media (max-width: 950px) {
    #adminPage .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    #adminPage .admin-dashboard {
        margin: 0;
    }

    .upload-section {
        padding: 1rem;
    }

    .data-manage-section {
        margin-top: 1rem;
    }

    .table-container th,
    .table-container td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* 로그인*/
.login-container {
    width: 300px;
    margin: 100px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-container input {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.login-container button {
    width: 100%;
    padding: 10px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

body.no-scroll {
  overflow: hidden;
}

/* 🔼 위로 가기 버튼 스타일 */
.scroll-top-btn {
  position: fixed;
  left: 30px;
  bottom: 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 1.1rem;
  display: none ;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;

}

.scroll-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 반응형 조정 */
@media (max-width: 950px) {
  .scroll-top-btn {
      left: 30px;
      bottom: 40px;
      width: 40px;
      height: 40px;
      font-size: 1rem;
  }
}

.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #000;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.scroll-to-top:hover {
  opacity: 1;
}

.scroll-to-top.visible {
  display: flex;
}

/* 챗봇 토글 영역 wrapper (버튼과 말풍선 함께) */
.chat-toggle-wrapper {
  position: fixed;
  bottom: 20px;
  right: 5px;
  z-index: 1050;
  /* 크기는 버튼에 맞추고 내부에서 배치 */
  width: 60px;
  height: 60px;
  position: fixed;
}

/* 말풍선: 이제 wrapper 내부에서 절대 위치 */
.chat-speech-bubble {
  position: absolute;
  bottom: 20px;
  left: -140px; /* 토글버튼 왼쪽에 위치 */
  background: var(--accent-color);
  color: white;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  max-width: 150px;
  text-align: center;
}

/* 말풍선 꼬리 */
.chat-speech-bubble:after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px; /* 화살표를 오른쪽에 표시하여 토글버튼을 가리킴 */
  transform: translateY(-50%);
  border-width: 10px 0 10px 10px;
  border-style: solid;
  border-color: transparent transparent transparent var(--accent-color);
}

/*feedback 페이지 스타일*/
/* 피드백 섹션 */
.feedback-section {
  padding: 5rem 10%;
  min-height: 100vh;
  background: var(--bg-color);
}

.feedback-form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--main-color);
}

.form-select, .form-input, .form-textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--main-color);
  border-radius: 8px;
  font-size: 1rem;
}

.form-textarea {
  resize: vertical;
}

.submit-btn {
  width: 100%;
  background: var(--main-color);
  color: white;
  margin: 1rem auto;
  display: block;
}

.thankyou-message {
  display: none;
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* connect us 페이지 스타일 */
/* Connect Us 페이지 스타일 */
.connect-hero {
  padding: 4rem 10% 2rem;
  background: var(--bg-color);
}
#connectUsPage section {
 min-height: 60vh;
}
.notice-box {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.guide-list {
  list-style: none;
  padding: 0;
}

.guide-list li {
  position: relative;
  padding-left: 30px;
  margin: 1rem 0;
  font-size: 1.1rem;
}

.guide-list li::before {
  content: "✔️";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.contact-methods {
  padding: 4rem 10%;
  text-align: center;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.contact-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-5px);
}

.contact-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.contact-btn {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.8rem ;
  width: fit-content;
  border: 2px solid var(--main-color);
  color: var(--main-color);
}

.kakao-btn {
  background: #FFE812 !important;
  color: #3A1D1D !important;
  border-color: #FFE812 !important;
}
.insta-btn {
  background: #E1306C !important;
  color: #ffffff !important;
  border-color: #C13584 !important;
}
/* 반응형 조정 */
@media (max-width: 950px) {
  .contact-cards {
    grid-template-columns: 1fr;
  }
  
  .guide-list li {
    font-size: 1rem;
  }
}

/* 개발중 모달 스타일*/
#aboutModal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgb(0,0,0); 
  background-color: rgba(0,0,0,0.4); 
}

#aboutModal .modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* 기본적으로 중앙에 위치 */
  background-color: #fefefe;
  padding: 20px;
  border: 1px solid #888;
  width: 80%; 
  max-width: 600px;
  text-align: center;
  border-radius: 10px;
  z-index: 1001; /* 모달이 다른 요소 위에 표시되도록 z-index 추가 */
}

/* PC 화면에서 모달을 더 위쪽으로 배치 */
@media (min-width: 768px) {
  #aboutModal .modal-content {
    transform: translate(-50%, -70%); /* Y축 변환값을 -50%에서 -70%로 변경하여 더 위쪽에 배치 */
  }
}
#aboutModal .modal-content p{
font-size: 1.3rem !important;
}

#aboutModal .close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#aboutModal .close:hover,
#aboutModal .close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* 글자크기 조절*/

/* 글자 크기 조절 버튼 스타일 */
.font-size-controls {
  text-align: center;
  position: fixed !important;
  top: 5.5rem;
  right: 1rem !important;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  background-color: var(--accent-color);
  padding: 0.5rem 0.5rem;
  border-radius: 5px;
  z-index: 1100;
}

.font-size-controls button {
  background: var(--main-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-left: 0.5rem;
  font-size: 1rem;
}

.font-size-controls button:hover {
  background: #FFD700;
}

.font-size-label {
  margin-right: 0.5rem;
  font-size: 1rem;
  color: var(--text-color);

}
@media screen and (max-width: 950px) {
  .font-size-controls {

    top: 0.5rem;
    right: 4rem !important;
  }
  
}
/* 추가: 테이블만 가로 스크롤 되도록 하는 스타일 */
/* 추가: 테이블만 가로 스크롤 되도록 하는 스타일 */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap; /* 텍스트가 줄바꿈되지 않도록 */
}

.table-container table {
  min-width: 100%; /* 테이블이 컨테이너의 너비를 초과할 때 가로 스크롤이 가능하도록 설정 */
}
.qr-reader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 1200;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px; /* 비디오와 버튼 사이 간격 */
}

.qr-reader {
  width: 100%;
  height: calc(100% - 100px); /* 버튼을 위한 공간 확보 */
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-reader video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 비디오 비율 유지 */
  display: block;
}

#closeQrScan {

  padding: 15px 30px;
  background-color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  z-index: 1201;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#closeQrScan:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* 자동완성 드롭다운 스타일 */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
}

.autocomplete-items div:hover {
    background-color: var(--bg-color);
}

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

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    /* margin: 0 auto; 또는 margin: 15% auto; 등은 제거 */
}


.modal .form-group {
    margin-bottom: 15px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.modal .form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.modal .button-group {
    margin-top: 20px;
    text-align: right;
}

.modal .button-group button {
    margin-left: 10px;
    padding: 8px 15px;
    border-radius: 4px;
}

.modal .button-group button[type="submit"] {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.modal .button-group button[type="button"] {
    background-color: #f44336;
    color: white;
    border: none;
}

/* 테이블 컨테이너 스타일 수정 및 보완 */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    padding-bottom: 1rem; /* 스크롤바 여유 공간 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.table-container table {
    margin: 0; /* 기존 테이블 마진 제거 */
    min-width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    border: 2px solid #000;
}

/* 테이블 셀 최소 너비 설정 */
.table-container th,
.table-container td {
    min-width: 40px; /* 최소 너비를 더 작게 */
    padding: 1rem;
    text-align: center;
    border: 1px solid #000;
    white-space: nowrap; /* 한 줄로 표시 */
}

/* 특정 컬럼 너비 조정 */
.table-container th:first-child,
.table-container td:first-child {
    
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,0.04);
}
.table-container th:first-child {
    z-index: 3; /* 헤더가 본문보다 위에 오도록 */
}

.table-container th:nth-child(2),
.table-container td:nth-child(2) {
    min-width: 20px; /* 이름 컬럼 */
}

/* statistics.html 타이틀 헤더 가림 방지용 마진/패딩 */
#statsPage main {
  margin-top: 5.5rem;
}

#statsPage .stats-header {
  padding-top: 1.2rem;
}

/* 왕중왕전 대상자 조회 페이지 전용 스타일 */

#goldAwardResultsPage .gold-section-container,
#goldAwardCountsPage .gold-section-container {
  display: block;
  min-height: auto;
  padding: 2rem 3%;
  margin-top: 4rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
#goldAwardResultsPage .gold-form-wrap,
#goldAwardCountsPage .gold-form-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  box-sizing: border-box;
}
#goldAwardResultsPage .control-group,
#goldAwardCountsPage .control-group {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}
#goldAwardResultsPage .control-group label,
#goldAwardCountsPage .control-group label {
  margin-bottom: 0.4rem;
  font-weight: 500;
  text-align: center;
}
#goldAwardResultsPage .control-group select,
#goldAwardCountsPage .control-group select,
#goldAwardResultsPage .control-group input[type="text"],
#goldAwardCountsPage .control-group input[type="text"] {
  width: 100%;
  max-width: 400px;
  min-width: 180px;
  padding: 0.7rem 1rem;
  border: 2px solid #2A4365;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
#goldAwardResultsPage #searchButton,
#goldAwardCountsPage #searchButton {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 1.5rem auto 0 auto;
  padding: 0.8rem 0;
  font-size: 1.1rem;
  font-weight: bold;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(42,67,101,0.07);
  cursor: pointer;
  transition: background 0.2s;
}
#goldAwardResultsPage #searchButton:hover,
#goldAwardCountsPage #searchButton:hover {
  background: #f09045;
}
#goldAwardResultsPage .gold-guide-box,
#goldAwardCountsPage .gold-guide-box {
  text-align: center;
  color: #2A4365;
  background: #f7fafc;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.08em;
  max-width: 480px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(42,67,101,0.09);
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 600px) {
  #goldAwardResultsPage .gold-section-container,
  #goldAwardCountsPage .gold-section-container {
    margin-top: 5.5rem;
    max-width: 100vw;
    width: 100vw;
  }
  #goldAwardResultsPage .gold-form-wrap,
  #goldAwardCountsPage .gold-form-wrap,
  #goldAwardResultsPage .control-group,
  #goldAwardCountsPage .control-group {
    max-width: 98vw;
  }
  #goldAwardResultsPage .control-group select,
  #goldAwardCountsPage .control-group select,
  #goldAwardResultsPage .control-group input[type="text"],
  #goldAwardCountsPage .control-group input[type="text"] {
    max-width: 98vw;
    min-width: 0;
  }
  #goldAwardResultsPage #searchButton,
  #goldAwardCountsPage #searchButton {
    max-width: 98vw;
  }
}

/* 왕중왕전 대상자 조회 버튼 스타일 */
.select-button.king-search-btn {
  background: var(--main-color) !important;
  color: white !important;
  border: none;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}
.select-button.king-search-btn:hover {
  background: var(--accent-color) !important;
  color: white !important;
}

#adminPage .mobile-menu-btn {
  left: auto !important;
  right: 20px !important;
}

#adminPage .mobile-menu-btn {
  left: auto !important;
  right: 20px !important;
}

/* statistics.html 전용 세로 레이아웃 및 비율 개선 (gold_award_results.html 참고, 영향 X) */
#statsPage main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

#statsPage section {
  display: block;
  min-height: auto;
  padding: 2rem 0.5rem;
  margin-top: 2rem;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

#statsPage .stats-header {
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color, #2A4365);
  margin-bottom: 2rem;
  text-align: center;
  letter-spacing: -1px;
}

#statsPage .stats-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin: 2rem 0;
  width: 100%;
}

#statsPage .stat-card {
  background: #fff;
  padding: 1.2rem 0.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  min-width: 0;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

#statsPage .stat-card .number {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--main-color, #2A4365);
}

#statsPage .stat-card .label {
  font-size: 1.05rem;
  color: var(--text-color, #4a5568);
  margin-top: 0.3rem;
}

#statsPage .chart-container,
#statsPage .bar-chart-container,
#statsPage .rank-table-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 1.2rem 0.5rem;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

#statsPage .chart-container { max-width: 320px; }
#statsPage .bar-chart-container { max-width: 400px; }
#statsPage .rank-table-container { max-width: 400px; }

#statsPage .section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2A4365;
  margin-bottom: 1.2rem;
  text-align: center;
}

#statsPage .search-result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 1rem;
}

#statsPage .search-result-table th, 
#statsPage .search-result-table td {
  padding: 0.7rem 0.3rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

#statsPage .search-result-table th {
  background: #f7fafc;
  color: #2A4365;
  font-weight: 700;
}

@media (max-width: 600px) {
  #statsPage main,
  #statsPage section,
  #statsPage .chart-container,
  #statsPage .bar-chart-container,
  #statsPage .rank-table-container,
  #statsPage .stat-card {
    max-width: 98vw;
    width: 98vw;
    min-width: 0;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
  #statsPage .stats-header {
    font-size: 1.3rem;
  }
  #statsPage .stat-card .number {
    font-size: 1.4rem;
  }
  #statsPage .section-title {
    font-size: 1rem;
  }
}

/* gold_award_counts.html(단체별 금상 개수)에서만 단체명 열 고정 */


#goldAwardCountsPage .table-container th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--main-color); /* 헤더는 메인 컬러 */
    color: #fff;
    box-shadow: 2px 0 4px rgba(0,0,0,0.04);
    border: 2px solid #000;
}
#goldAwardCountsPage .table-container td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff; /* 본문은 흰색 */
    box-shadow: 2px 0 4px rgba(0,0,0,0.04);
    border: 2px solid #000;
}

/* ====== 세부필터 스타일 (results.html) ====== */

/* 세부필터 토글 버튼 컨테이너 */
.filter-toggle-container {
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.5rem 0;
  margin-bottom: 0;
}

/* 세부필터 토글 버튼 */
.toggle-filter-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-filter-btn:hover {
  background: #e5963e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

/* 세부필터 패널 */
.detail-filter-panel {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin: 1rem 0;
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
  }
  to {
    opacity: 1;
    max-height: 500px;
    overflow: visible;
  }
}

.detail-filter-content {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

/* 필터 그룹 (각 필터 항목) */
.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.filter-group select {
  padding: 0.6rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 0.95rem;
  background-color: white;
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-group select:hover {
  border-color: var(--accent-color);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: 0 0 0 2px rgba(42, 67, 101, 0.1);
}

/* 초기화 버튼 */
.reset-filter-btn {
  padding: 0.6rem 1.2rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #e2e8f0;
  color: var(--text-color);
  grid-column: 1 / -1;
  width: 100%;
}

.reset-filter-btn:hover {
  background: #cbd5e0;
  border-color: #a0aec0;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .detail-filter-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .toggle-filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .filter-group select {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  .reset-filter-btn {
    margin-top: 0.5rem;
  }
}


