/* 기본 리셋 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

/* 네비게이션 제거됨 - 메인 페이지는 헤더 없음 */
.main-nav {
  display: none;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo a {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 모바일 네비게이션 토글 버튼 */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* 배경 영상 컨테이너 */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.background-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  /* 모바일 비디오 재생을 위한 추가 속성 */
  -webkit-playsinline: true;
  playsinline: true;
}

.background-video.active {
  opacity: 1;
}

/* 오버레이 */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

/* 메인 콘텐츠 */
.main-content {
  position: relative;
  z-index: 100;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem;
}

.content-wrapper {
  max-width: 800px;
}

h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}

p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 게시판 그리드 버튼 */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-decoration: none;
  border-radius: 20px;
  backdrop-filter: blur(15px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-height: 140px;
  position: relative;
  overflow: hidden;
  z-index: 10;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.grid-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
  opacity: 0.9;
  z-index: -1;
}

.btn-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.btn-label {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
  text-align: center;
}

/* 파스텔 컬러 테마 */
.btn-red {
  background: linear-gradient(135deg, #ffb3ba, #ff8a95);
}

.btn-orange {
  background: linear-gradient(135deg, #ffdfba, #ffc947);
}

.btn-yellow {
  background: linear-gradient(135deg, #ffffba, #fff066);
}

.btn-green {
  background: linear-gradient(135deg, #baffc9, #85e085);
}

.btn-blue {
  background: linear-gradient(135deg, #bae1ff, #74b9ff);
}

.btn-purple {
  background: linear-gradient(135deg, #e1baff, #b885ff);
}

/* 호버 효과 */
.grid-btn:hover:not(.btn-disabled) {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

.grid-btn:hover:not(.btn-disabled) .btn-icon {
  transform: scale(1.2) rotate(5deg);
}

.grid-btn:hover:not(.btn-disabled)::before {
  opacity: 1;
}

/* 비활성화된 버튼 */
.btn-disabled {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.btn-disabled .btn-label {
  color: rgba(0, 0, 0, 0.5);
}

/* 비디오 인디케이터 */
.video-indicators {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.indicator {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.6);
}

.indicator.active {
  background: rgba(255, 255, 255, 0.8);
}

/* 페이드 인 애니메이션 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-wrapper {
  animation: fadeIn 1s ease-out;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  /* 모바일에서는 네비게이션 완전 제거 */
  .main-nav {
    display: none !important;
  }

  h1 {
    font-size: 2.5rem;
  }

  p {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }

  .board-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
    max-width: 400px;
  }

  .grid-btn {
    min-height: 120px;
    padding: 1.5rem 1rem;
  }

  .btn-icon {
    font-size: 2.5rem;
  }

  .btn-label {
    font-size: 0.9rem;
  }

  .video-indicators {
    bottom: 1rem;
  }

  .indicator {
    width: 30px;
    height: 3px;
  }

  .main-content {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
  }

  .board-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
    gap: 0.8rem;
    max-width: 280px;
  }

  .grid-btn {
    min-height: 100px;
    padding: 1rem;
  }

  .btn-icon {
    font-size: 2rem;
  }

  .btn-label {
    font-size: 0.8rem;
  }

  .indicator {
    width: 25px;
    height: 2px;
  }
}

/* 로딩 인디케이터 */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  z-index: 10;
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* 페이지 전환 로딩 오버레이 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(255, 255, 255);
  z-index: 99999 !important;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  pointer-events: auto;
}

.loading-overlay.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.loading-content {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.loading-video {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite, fadeInScale 0.5s ease-out;
  background: white;
  border: 4px solid rgba(255, 255, 255, 0.8);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0px);
  }
}
