/* 전체 박스 크기 설정 및 리셋 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 스크롤 방지 + 기본 폰트 */
html, body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9fafb;
  color: #111827;
  width: 100%;
  overflow-x: hidden; /* 좌우 스크롤 방지 */
}

/* 헤더 영역 */
header {
  background: #1f2937;
  color: white;
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* 로고 */
.logo {
  font-size: 1.6rem;
  font-weight: bold;
  white-space: nowrap;
}

/* 내비게이션 */
nav {
  display: flex;
  gap: 1.25rem;
  white-space: nowrap;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  color: #93c5fd;
}

/* 메인 섹션 */
main {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
  width: 100%;
}

/* 제목 및 설명 */
h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.sub-description {
  text-align: center;
  color: #374151;
  margin-bottom: 2rem;
}

.features-description {
  background: #e5e7eb;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.features-description ul {
  padding-left: 1.5rem;
  list-style: disc;
}

/* 텍스트 입력창 */
textarea {
  width: 100%;
  height: 180px;
  margin: 1rem 0;
  padding: 1rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  resize: vertical;
  background: white;
}

/* 버튼 영역 */
.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.button-group button {
  padding: 0.6rem 1.2rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.button-group button:hover {
  background: #1d4ed8;
}

/* 결과 출력창 */
pre#json-output {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

/* 섹션 공통 */
section {
  padding: 2rem 1rem;
  background: #fff;
  border-top: 1px solid #ddd;
  max-width: 900px;
  margin: auto;
  width: 100%;
}

section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* 푸터 */
footer {
  text-align: center;
  padding: 1rem;
  background: #1f2937;
  color: white;
  font-size: 0.9rem;
  width: 100%;
}

/* 반응형 (모바일 대응) */
@media (max-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  nav {
    flex-direction: row;
    gap: 1rem;
    margin-top: 0;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.6rem;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .button-group button {
    width: 100%;
    max-width: 300px;
  }

  textarea {
    font-size: 0.95rem;
  }

  section {
    padding: 1.5rem 1rem;
  }
}



/* 푸터를 항상 화면 맨 하단에 붙이기 위한 스타일 */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

footer {
  margin-top: auto;
  background-color: #1f2937;
  color: white;
  text-align: center;
  padding: 1rem 0;
  width: 100%;
}



/* 로고의 밑줄 제거 및 색 고정 */
.logo a {
  color: white;
  text-decoration: none;
}

/* 로고 애니메이션 제거 보장 (아예 none 명시) */
.logo, .logo a {
  animation: none !important;
  transition: none !important;
}

/* 상단 메뉴 정렬 통일 유지 */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

/* 전체 페이지 높이 확보 + footer 바닥 정렬 */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* footer 하단 고정 + 배경 및 여백 제거 */
footer {
  margin-top: auto;
  background-color: #1f2937;
  color: white;
  text-align: center;
  padding: 1rem 0;
  width: 100%;
  position: relative;
}



/* 로고와 메뉴 간 간격 조정 */
.navbar {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 2rem;
  padding-left: 1rem;
}

/* 로고 텍스트와 메뉴 사이 여백 유지 */
.logo {
  margin-right: 2rem;
}

/* 메뉴 항목 간격 */
nav {
  display: flex;
  gap: 1.5rem;
  white-space: nowrap;
}



/* 간격을 더 줄이기 위한 수정 */
.navbar {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 1rem; /* 기존 2rem → 1rem로 줄임 */
  padding-left: 1rem;
}

.logo {
  margin-right: 1rem; /* 기존 2rem → 1rem로 줄임 */
}

nav {
  display: flex;
  gap: 1rem; /* 기존 1.5rem → 1rem */
  white-space: nowrap;
}



/* 로고와 메뉴 간 간격 최적화 */
.navbar {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem; /* 더 좁은 간격 */
}

.logo {
  margin-right: 0; /* 로고 오른쪽 여백 제거 */
}

nav {
  display: flex;
  gap: 1rem; /* 메뉴 간 간격은 유지 */
}



/* 햄버거 메뉴 버튼 기본 숨김 */
.hamburger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* 모바일에서 햄버거 보이기 & 메뉴 숨김 */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1.2rem;
  }

  nav {
    display: none;
    flex-direction: column;
    background-color: #1a1a2e;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 99;
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 1rem;
    border-top: 1px solid #333;
  }

  .navbar {
    position: relative;
  }
}


@media (max-width: 768px) {
  nav {
    display: none;
    flex-direction: column;
    background-color: #fff;
    padding: 10px;
  }

  nav.show {
    display: flex;
  }

  .hamburger {
    display: block;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
  }

  header nav a {
    margin: 5px 0;
  }
}

@media (min-width: 769px) {
  .hamburger {
    display: none;
  }

  nav {
    display: flex !important;
    flex-direction: row;
  }
}


@media (max-width: 768px) {
  nav a {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
  }

  nav a:hover {
    background-color: #f9f9f9;
  }
}
