:root {
  --bg: #2b2b2b;
  --panel: #3b3b3b;
  --panel-2: #242424;
  --line: #565656;
  --text: #ffffff;
  --muted: #cccccc;
  --soft: #858584;
  --accent: #a259ff;
  --accent-2: #7b61ff;
  --success: #00ac4f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Work Sans", "Noto Sans KR", "Noto Sans JP", "Noto Sans SC", "Noto Sans Devanagari", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: 0;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1050px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 18px 50px;
  background: rgba(43, 43, 43, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 14px;
  box-shadow: 0 0 0 6px rgba(162, 89, 255, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nav-links a,
.header-cta {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 20px;
  font-weight: 600;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.language-switcher {
  position: relative;
}

.language-orbit {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 700;
}

.orbit-ring {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(162, 89, 255, 0.86);
  border-radius: 50%;
  background: rgba(162, 89, 255, 0.12);
  box-shadow: 0 0 0 5px rgba(162, 89, 255, 0.1);
}

.orbit-ring b {
  font-family: "Space Mono", monospace;
  font-size: 14px;
}

#languageName {
  min-width: 72px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: 190px;
  display: none;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(36, 36, 36, 0.98);
  box-shadow: var(--shadow);
}

.language-menu.open {
  display: grid;
  gap: 4px;
}

.language-menu button {
  min-height: 44px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.language-menu button b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 12px;
}

.language-menu button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-menu button:hover,
.language-menu button.active {
  background: rgba(162, 89, 255, 0.16);
  color: #fff;
}

.language-menu button.active b {
  background: var(--accent);
}

.header-cta,
.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px rgba(162, 89, 255, 0.25);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.hero-section {
  padding: 80px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 510px);
  gap: 30px;
  align-items: start;
}

.hero-copy {
  min-height: 510px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(44px, 7vw, 67px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 0;
  color: #f2f2f2;
  font-size: 22px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  border-radius: 20px;
  font-weight: 700;
}

.secondary-button {
  border: 2px solid var(--accent);
  background: transparent;
  color: #fff;
}

.secondary-button:hover,
.primary-button:hover,
.header-cta:hover {
  transform: translateY(-1px);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.stats-row article {
  min-width: 0;
}

.stats-row strong {
  display: block;
  font-family: "Space Mono", monospace;
  font-size: 28px;
  line-height: 1.4;
}

.stats-row span {
  display: block;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.4;
}

.hero-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card > img {
  width: 100%;
  aspect-ratio: 1.33;
  object-fit: cover;
}

.hero-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  gap: 18px;
  align-items: center;
  padding: 22px;
}

.hero-card-body h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.hero-card-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mini-device {
  border: 1px solid rgba(162, 89, 255, 0.55);
  border-radius: 20px;
  padding: 12px;
  background: #1f1f1f;
}

.device-top,
.device-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
}

.device-top b,
.device-bar b {
  color: var(--accent);
}

.device-bar {
  display: block;
  text-align: center;
}

.device-bar small {
  display: block;
  color: var(--soft);
  margin-top: 3px;
}

.chest-preview {
  height: 82px;
  display: grid;
  place-items: center;
  margin: 12px 0;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(162, 89, 255, 0.16), rgba(162, 89, 255, 0.04));
}

.chest-preview span {
  width: 52px;
  height: 44px;
  border-radius: 8px 8px 12px 12px;
  background:
    linear-gradient(90deg, transparent 42%, #2b2b2b 42% 54%, transparent 54%),
    linear-gradient(180deg, #ffd166 0 50%, #f77f00 50%);
  box-shadow: 0 -10px 0 #a259ff, 0 16px 30px rgba(0, 0, 0, 0.3);
}

.section-band {
  padding: 80px 0;
}

.section-heading {
  margin-bottom: 48px;
}

.section-heading h2,
.social-grid h2,
.ranking-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 51px);
  line-height: 1.1;
  font-weight: 600;
}

.section-heading p,
.social-grid p,
.ranking-hero p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.feature-card {
  min-height: 260px;
  padding: 30px;
  border-radius: 20px;
  background: var(--panel);
}

.feature-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--soft);
  font-family: "Space Mono", monospace;
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 24px;
}

.feature-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.shop-band {
  background: var(--panel-2);
}

.shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: 48px;
  align-items: center;
}

.shop-copy h2 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 51px);
  line-height: 1.1;
  font-weight: 600;
}

.shop-copy p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 30px;
}

.shop-actions small {
  max-width: 410px;
  color: var(--soft);
  line-height: 1.5;
}

.shop-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.shop-flow {
  display: grid;
  gap: 12px;
}

.shop-flow article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.shop-flow article > span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(162, 89, 255, 0.16);
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-weight: 700;
}

.shop-flow h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.shop-flow p,
.shop-rate-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.shop-rate-card {
  padding: 22px;
  border: 1px solid rgba(162, 89, 255, 0.56);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(162, 89, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.shop-rate-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.shop-rate-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.social-band {
  background: var(--panel);
}

.social-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
}

.social-actions {
  display: grid;
  gap: 12px;
}

.social-actions small {
  color: var(--muted);
  line-height: 1.5;
}

.reward-mechanism-section {
  display: grid;
  gap: 34px;
  padding-bottom: 90px;
}

.reward-mechanism-visual {
  margin: 0;
}

.reward-mechanism-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(162, 89, 255, 0.38);
  border-radius: 20px;
  background: var(--panel-2);
  box-shadow: var(--shadow);
}

.reward-mechanism-visual figcaption {
  max-width: 820px;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.reward-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.reward-rule-card {
  min-height: 260px;
  padding: 24px;
  border-radius: 20px;
  background: var(--panel);
}

.reward-rule-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: rgba(162, 89, 255, 0.14);
  color: var(--accent);
  font-family: "Space Mono", monospace;
  font-weight: 700;
}

.reward-rule-card h2 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.2;
}

.reward-rule-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.reward-note-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border: 1px solid rgba(162, 89, 255, 0.42);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(162, 89, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.reward-note-band h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
}

.reward-note-band p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-hero {
  padding: 80px 0 44px;
}

.ranking-section {
  padding-bottom: 90px;
}

.legal-section {
  padding-bottom: 90px;
}

.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.legal-updated strong {
  color: #fff;
  font-family: "Space Mono", monospace;
  font-size: 14px;
}

.legal-content {
  display: grid;
  gap: 18px;
}

.legal-article {
  padding: 28px;
  border-radius: 20px;
  background: var(--panel);
}

.legal-article h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.legal-article p,
.legal-article li {
  color: var(--muted);
  line-height: 1.7;
}

.legal-article p {
  margin-bottom: 12px;
}

.legal-article p:last-child {
  margin-bottom: 0;
}

.legal-article ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.tab-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.tab-strip button {
  min-height: 60px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--soft);
  font-size: 20px;
  font-weight: 600;
}

.tab-strip button.active {
  border-color: var(--soft);
  color: #fff;
}

.ranking-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.ranking-summary article {
  padding: 22px;
  border-radius: 20px;
  background: var(--panel);
}

.ranking-summary span {
  display: block;
  color: var(--muted);
}

.ranking-summary strong {
  display: block;
  margin-top: 6px;
  font-family: "Space Mono", monospace;
  font-size: 28px;
}

.ranking-table {
  display: grid;
  gap: 20px;
}

.empty-state {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.table-row {
  display: grid;
  grid-template-columns: 430px repeat(3, minmax(120px, 1fr));
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 12px 20px;
  border-radius: 20px;
  background: var(--panel);
}

.table-row.header {
  min-height: 46px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--soft);
}

.rank-user {
  display: grid;
  grid-template-columns: 30px 60px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--soft);
  font-family: "Space Mono", monospace;
  font-size: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--avatar-a), var(--avatar-b));
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 700;
}

.rank-cell {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Space Mono", monospace;
}

.rank-cell.positive {
  color: var(--success);
}

.footer {
  border-top: 2px solid var(--bg);
  background: var(--panel);
  padding: 40px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 190px 190px 190px;
  gap: 40px;
}

.footer p,
.footer a {
  color: var(--muted);
}

.footer h2 {
  margin-bottom: 18px;
  font-family: "Space Mono", monospace;
  font-size: 20px;
}

.footer a {
  display: block;
  margin-bottom: 12px;
}

.footer .brand {
  color: #fff;
  margin-bottom: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  width: min(420px, calc(100% - 32px));
  min-height: 56px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: #fff;
  color: #2b2b2b;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.toast.show {
  display: flex;
}

@media (max-width: 980px) {
  .site-header {
    padding: 14px 24px;
  }

  .header-cta {
    display: none;
  }

  .hero-grid,
  .shop-grid,
  .social-grid,
  .reward-note-band {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }

  .hero-card-body {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .reward-rule-grid,
  .ranking-summary,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(96px, 0.4fr));
  }

  .table-row .rank-cell:nth-child(4) {
    display: none;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 30px, 520px);
  }

  .site-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .language-switcher,
  .language-orbit {
    justify-content: space-between;
    width: 100%;
  }

  .language-menu {
    left: 0;
    right: auto;
    width: 100%;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links a {
    padding: 0 10px;
    font-size: 14px;
  }

  .hero-section,
  .section-band,
  .ranking-hero {
    padding: 48px 0;
  }

  .reward-mechanism-section {
    padding-bottom: 58px;
  }

  .reward-mechanism-visual img {
    border-radius: 16px;
  }

  .legal-section {
    padding-bottom: 58px;
  }

  .legal-article {
    padding: 22px;
  }

  .hero-actions {
    display: grid;
  }

  .shop-actions,
  .shop-actions .primary-button {
    width: 100%;
  }

  .shop-flow article {
    grid-template-columns: 1fr;
  }

  .stats-row,
  .tab-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tab-strip button {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
  }

  .table-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .table-row.header {
    display: none;
  }

  .rank-user {
    grid-template-columns: 30px 46px minmax(0, 1fr);
    gap: 12px;
  }

  .avatar {
    width: 46px;
    height: 46px;
    font-size: 13px;
  }

  .rank-cell {
    white-space: normal;
    color: var(--muted);
  }
}
