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

:root {
  --black: #0A0A0F;
  --dark: #111118;
  --surface: #18181F;
  --surface2: #202028;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(232,255,0,0.4);
  --neon: #E8FF00;
  --neon-dim: rgba(232,255,0,0.15);
  --white: #FFFFFF;
  --muted: #6B6B7A;
  --text2: #AAAAB8;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Noto Sans KR', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── TOP BAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-bottom: 0.5px solid var(--border);
  background: var(--black);
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-intro {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: none;
}
.topbar-intro:hover { color: var(--neon); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0.5px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
}
.sns-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.sns-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0.5px solid var(--neon);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--neon);
  background: var(--neon-dim);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
}
.share-btn:hover { background: rgba(232,255,0,0.25); }
.share-btn svg { width: 14px; height: 14px; }

/* ── HERO ── */
.hero {
  padding: 56px 40px 56px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--neon);
  font-weight: 500;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 10vw, 120px);
  line-height: 0.92;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 28px;
}
.hero-title span { color: var(--neon); }

.hero-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--text2);
  max-width: 480px;
  line-height: 1.8;
  margin: 0 auto;
}

/* ── VIEW TOGGLE (챌린지 / 댄스팀) ── */
.view-toggle-section {
  padding: 0 40px;
  max-width: 1100px;
  margin: 0 auto 36px;
  text-align: center;
}

.view-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 0.5px solid var(--border);
}

.view-toggle-btn {
  padding: 10px 28px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
}
.view-toggle-btn:hover { color: var(--white); }
.view-toggle-btn.active {
  background: var(--neon);
  color: var(--black);
}

/* ── CATEGORY PILLS ── */
.category-section {
  padding: 0 40px;
  max-width: 1100px;
  margin: 0 auto 48px;
  text-align: center;
}

.category-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 400;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.pill {
  padding: 9px 20px;
  border-radius: 999px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Noto Sans KR', sans-serif;
  white-space: nowrap;
  line-height: 1;
}
.pill:hover {
  border-color: rgba(255,255,255,0.2);
  color: var(--white);
  background: var(--surface2);
}
.pill.active {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--black);
  font-weight: 700;
}

/* ── TEAM GRID ── */
.teams-section {
  padding: 0 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.region-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 32px;
  padding-top: 40px;
  justify-content: center;
  text-align: center;
}

.region-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--white);
  letter-spacing: 0.05em;
  word-break: keep-all;
}
.region-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
}

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

.team-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.team-card:focus-visible {
  outline: none;
  border-color: var(--neon);
}
.team-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.team-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}

.team-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
}
.team-img-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.4;
}

.team-body {
  padding: 16px;
}

.team-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.team-region-tag {
  font-size: 11px;
  color: var(--neon);
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  opacity: 0.8;
}

.team-genre {
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 14px;
}

.sns-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sns-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 0.5px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text2);
  text-decoration: none;
  transition: all 0.18s;
  font-weight: 400;
}
.sns-link svg { width: 12px; height: 12px; flex-shrink: 0; }
.sns-link:hover {
  border-color: var(--neon);
  color: var(--neon);
}

/* ── EMPTY STATE ── */
.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}
.empty-state svg {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  opacity: 0.3;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ── FOOTER ── */
.footer {
  border-top: 0.5px solid var(--border);
  padding: 28px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--neon);
  color: var(--black);
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Noto Sans KR', sans-serif;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── INTRO MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  height: fit-content;
  margin: auto 0;
  position: relative;
}
.modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
  z-index: 210;
}
.modal-close:hover { background: rgba(0,0,0,0.8); }

.modal h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: var(--neon);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.modal p {
  font-size: 14px;
  color: var(--text2);
  font-weight: 300;
  line-height: 1.9;
  margin-bottom: 12px;
}

/* ── 댄스팀 프로필 모달 ── */
.team-modal {
  padding: 0;
  max-width: 440px;
  overflow: hidden;
}

.team-modal-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--surface2);
}
.team-modal-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
}
.team-modal-img-placeholder svg {
  width: 36px;
  height: 36px;
  opacity: 0.4;
}

.team-modal-body {
  padding: 28px 28px 32px;
}

.team-modal-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: var(--white);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.team-modal-body .team-region-tag { margin-bottom: 6px; }
.team-modal-body .team-genre { margin-bottom: 18px; }

.team-modal-sns {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 0.5px solid var(--border);
}

.team-modal-section {
  margin-bottom: 22px;
}
.team-modal-section:last-child { margin-bottom: 0; }

.team-modal-section-title {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--neon);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 10px;
}

.team-modal-schedule-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.team-modal-schedule-list li {
  font-size: 13px;
  color: var(--text2);
  font-weight: 300;
  padding-left: 14px;
  position: relative;
  line-height: 1.6;
}
.team-modal-schedule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--neon);
}

.team-modal-notice-text {
  font-size: 13px;
  color: var(--text2);
  font-weight: 300;
  line-height: 1.8;
  background: var(--surface2);
  border-radius: 8px;
  padding: 12px 14px;
}

.team-modal-empty {
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .topbar {
    padding: 12px 20px;
    flex-direction: column;
    gap: 10px;
  }
  .topbar-intro {
    text-align: center;
    width: 100%;
  }
  .topbar-right {
    width: 100%;
    justify-content: center;
  }
  .sns-btn-label { display: none; }
  .sns-btn, .share-btn {
    padding: 8px;
    width: 34px;
    height: 34px;
    justify-content: center;
  }
  .sns-btn svg, .share-btn svg { width: 16px; height: 16px; }

  .hero { padding: 40px 20px 40px; }
  .category-section,
  .teams-section { padding-left: 20px; padding-right: 20px; }
  .hero-title { font-size: 64px; }
  .pill { padding: 8px 16px; font-size: 12px; }

  .hero-desc {
    font-size: 13px;
    font-weight: 300;
    color: var(--text2);
    max-width: 480px;
    line-height: 1.8;
    margin: 0 auto;
  }
  .region-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 30px;
    color: var(--white);
    letter-spacing: 0.05em;
    word-break: keep-all;
    font-weight: 500;
  }

}
