@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  background-color: #69495f;
  color: #fff;
}

/* 헤더 */
.header {
  background-color: #1b1b1b6c;
  border-bottom: 1px solid #1b1b1b;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

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

.logo-container {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 48px;
  margin-right: 10px;
  border-radius: 50%;
}

.header h1 {
  color: #ff8ab5;
  font-size: 1.8rem;
  font-weight: 600;
}

/* 내비게이션 */
.nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
}

.nav a {
  color: #eee;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav a:hover {
  background-color: #ff8ab5;
  color: #0f0f0f;
}

/* 메인 히어로 섹션 */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 5rem auto;
  padding: 0 2rem;

  /* 👇 이 줄을 추가하세요 */
  gap: 7rem; /* 글과 이미지 사이 여백 (원하는 만큼 조정 가능, 예: 5rem, 6rem 등) */
}
.hero-content {
  max-width: 550px;
}

.tagline {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ffb8d8;
  margin-bottom: 1rem;
}

.subtitle {
  color: #d6d6d6;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  text-decoration: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.8rem 1.6rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn.primary {
  background-color: #ff8ab5;
  color: #0f0f0f;
}

.btn.primary:hover {
  background-color: #ffb8d8;
  transform: translateY(-2px);
}

.btn.secondary {
  background-color: #2a2a2a;
  color: #f1f1f1;
}

.btn.secondary:hover {
  background-color: #3a3a3a;
  transform: translateY(-2px);
}

/* 이미지 */
.hero-image img {
  max-width: 550px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

/* 푸터 */
.footer {
  background-color: #141414;
  border-top: 1px solid #2a2a2a;
  padding: 2rem 1rem;
}

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

.footer h3 {
  color: #ff8ab5;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer a {
  color: #b8b8b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #ffffff;
}

.footer p {
  color: #999;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 메인 영역이 화면을 꽉 채우도록 설정 */
main {
  flex: 1;
}

/* 푸터 */
.footer {
  background-color: #141414;
  border-top: 1px solid #2a2a2a;
  padding: 2rem 1rem;
  color: #b8b8b8;
  margin-top: auto; /* 핵심 포인트! */
}

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

.footer h3 {
  color: #ff8ab5;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer a {
  color: #b8b8b8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #ffffff;
}

.footer p {
  color: #999;
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem;
}

/* 모바일 반응형 스타일 */
@media (max-width: 768px) {
  /* 헤더 */
  .header .container {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .logo-container {
    margin-bottom: 1rem;
    justify-content: center;
  }

  .nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  /* 히어로 섹션 */
  .hero {
    margin: 2rem auto;
    padding: 0 1rem;
    gap: 2rem;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .tagline {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-image img {
    max-width: 100%;
  }

  /* 명령어 페이지 */
  .commands-page {
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .commands-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* 명령어 상세 페이지 */
  .command-detail-page {
    flex-direction: column;
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-bottom: 1rem;
  }

  .command-detail {
    padding: 1rem;
  }

  /* 푸터 */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-content {
    justify-content: center;
  }
}

/* 작은 화면 디바이스 (320px ~ 480px) */
@media (max-width: 480px) {
  .tagline {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

/* 명령어 페이지 전용 */
.commands-page {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 2rem;
  text-align: center;
}

/* 상단 타이틀 */
.commands-hero h2 {
  font-size: 2.5rem;
  color: #ffb8d8;
  margin-bottom: 0.5rem;
}

.commands-hero p {
  color: #ccc;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* 안내 배너 */
.alert-box {
  background-color: #3a2f36;
  color: #ffdce6;
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.95rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* 명령어 카드들 */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.command-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.command-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.command-card {
  background-color: #1b1b1b6c;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: center;
}
.command-card .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.8rem;
}

.command-card h3 {
  color: #ff8ab5;
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.command-card p {
  color: #cfcfcf;
  font-size: 0.95rem;
}

/* 현재 페이지 표시 */
.nav a.active {
  background-color: #ff8ab5;
  color: #0f0f0f;
}


/* ─────────────── 명령어 상세 페이지 ─────────────── */

.command-detail-page {
  display: flex;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
  gap: 2rem;
}

/* 사이드바 */
.sidebar {
  flex: 0 0 230px;
  background-color: #1b1b1b6c;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar h3 {
  color: #ff8ab5;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
}

.sidebar ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: #ddd;
  transition: background 0.3s ease;
  text-align: left;
}

.sidebar a:hover {
  background-color: #3a2a34;
}

.sidebar a.active {
  background-color: #ff8ab5;
  color: #111;
  font-weight: 600;
}

/* 명령어 본문 */
.command-detail {
  flex: 1;
  background-color: #1b1b1b6c;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.command-detail h2 {
  color: #ffb8d8;
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.command-detail .subtitle {
  color: #bbb;
  margin-bottom: 1.2rem;
}

/* 공통 경고 박스 재사용 */
.command-detail .alert-box {
  background-color: #3a2f36;
  color: #ffdce6;
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* 섹션 */
.command-section {
  margin-bottom: 2rem;
  text-align: left;
}

.command-section h3 {
  color: #ff8ab5;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #333;
  padding-bottom: 0.3rem;
}

.command-section p {
  color: #ddd;
  line-height: 1.6;
}

/* 코드 블록 */
code {
  background-color: #2a2a2a;
  color: #ffb8d8;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
}
/* ========================================
   모바일 반응형 보정
   데스크톱 레이아웃은 유지하고 768px 이하에서 적용
   ======================================== */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
}

@media (max-width: 768px) {
  /* 공통 여백과 텍스트 */
  body {
    min-height: 100vh;
    height: auto;
  }

  h1, h2, h3, p, li, a {
    overflow-wrap: break-word;
  }

  /* 상단 로고와 메뉴: 세로로 길게 늘어지지 않도록 정리 */
  .header {
    padding: 0.85rem 0;
  }

  .header .container {
    width: 100%;
    padding: 0 1rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
  }

  .logo-container {
    justify-content: center;
    margin: 0;
    gap: 0.55rem;
  }

  .logo-img {
    width: 42px;
    height: 42px;
    margin-right: 0;
    object-fit: cover;
  }

  .header h1 {
    font-size: clamp(1.25rem, 5vw, 1.65rem);
  }

  .nav {
    width: 100%;
  }

  .nav ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
  }

  .nav ul li {
    margin: 0;
  }

  .nav a,
  .nav ul li a {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* 메인 소개 화면 */
  .hero {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 2rem auto 2.5rem;
    padding: 0 1rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .tagline {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 0.85rem;
  }

  .subtitle {
    font-size: clamp(1rem, 4vw, 1.2rem);
    line-height: 1.65;
    margin-bottom: 1.3rem;
  }

  .hero-buttons {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.7rem;
  }

  .btn {
    display: inline-flex;
    flex: 1 1 10rem;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    text-align: center;
  }

  .hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-image img {
    display: block;
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
  }

  /* 명령어 목록 */
  .commands-page {
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .commands-hero h2 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    line-height: 1.3;
  }

  .commands-hero p {
    font-size: 1rem;
    line-height: 1.65;
  }

  .commands-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .command-card {
    min-width: 0;
    padding: 1.15rem 0.85rem;
  }

  .command-card h3 {
    font-size: 1.05rem;
    line-height: 1.4;
  }

  .command-card p {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  /* 명령어 상세 화면: 사이드바를 가로 스크롤 메뉴로 변경 */
  .command-detail-page,
  .commands-layout {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto;
    padding: 0 1rem;
    flex-direction: column;
    gap: 1rem;
  }

  .sidebar {
    position: static;
    top: auto;
    width: 100%;
    flex: 0 0 auto;
    margin: 0;
    padding: 0.9rem;
  }

  .sidebar h3 {
    margin-bottom: 0.65rem;
  }

  .sidebar ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0 0 0.35rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar li {
    flex: 0 0 auto;
  }

  .sidebar a {
    padding: 0.6rem 0.8rem;
    text-align: center;
    white-space: nowrap;
    font-size: 0.9rem;
  }

  .command-detail {
    width: 100%;
    min-width: 0;
    padding: 1.2rem;
  }

  .command-detail h2 {
    font-size: clamp(1.4rem, 6vw, 1.8rem);
    line-height: 1.35;
  }

  .command-section p {
    line-height: 1.7;
    overflow-wrap: anywhere;
  }

  pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre;
  }

  code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* 약관 및 일반 텍스트 페이지 */
  .tos-page,
  .main-container {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto;
    padding: 1rem;
  }

  .tos-header h2,
  .main-container h1 {
    font-size: clamp(1.45rem, 6vw, 2rem);
    line-height: 1.4;
  }

  .tos-content,
  .main-container .container {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
  }

  .tos-content p,
  .tos-content li,
  .main-container p,
  .main-container li {
    font-size: 0.95rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
  }

  /* 푸터 */
  .footer {
    padding: 1.5rem 1rem;
  }

  .footer .container,
  .footer-content {
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    text-align: center;
  }

  .footer .policies,
  .footer .support {
    width: 100%;
  }

  .footer ul {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
  }

  .footer li {
    margin: 0.35rem 0;
  }
}

@media (max-width: 480px) {
  .header .container {
    padding: 0 0.75rem;
  }

  .nav a,
  .nav ul li a {
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
  }

  .hero {
    padding: 0 0.85rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .commands-grid {
    grid-template-columns: 1fr;
  }

  .command-detail {
    padding: 1rem;
  }

  .alert-box {
    padding: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.6;
  }
}
