:root {
  --bg: #020912;
  --bg-2: #06121d;
  --panel: rgba(3, 14, 24, 0.82);
  --panel-strong: rgba(4, 18, 30, 0.94);
  --text: #f8fbff;
  --muted: #b7c2d0;
  --line: rgba(104, 219, 255, 0.24);
  --cyan: #24e3ff;
  --cyan-soft: rgba(36, 227, 255, 0.18);
  --gold: #f4bd45;
  --green: #78e96f;
  --orange: #ff793d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  background:
    radial-gradient(circle at 50% -8%, rgba(36, 227, 255, 0.13), transparent 360px),
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(180deg, #020711, var(--bg-2));
  background-size: auto, 48px 48px, 48px 48px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 42%, rgba(36, 227, 255, 0.08) 50%, transparent 58%);
  transform: translateX(-70%);
  animation: lightSweep 10s ease-in-out infinite;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(2, 7, 14, 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(18px);
}

.topbar {
  max-width: 1180px;
  height: 88px;
  margin: 0 auto;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 240px;
}

.brand-mark-box,
.footer-mark-box {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 0 22px rgba(36, 227, 255, 0.14);
}

.brand-mark-box {
  width: 58px;
  height: 58px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: none;
}

.brand strong {
  display: block;
  font-size: 24px;
  letter-spacing: 4px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  letter-spacing: 8px;
}

.nav-links {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 18px;
  height: 100%;
}

.nav-links a {
  position: relative;
  min-width: 94px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #e7edf5;
  font-size: 16px;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  background: linear-gradient(180deg, rgba(36,227,255,0.02), rgba(36,227,255,0.12));
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--cyan);
  box-shadow: 0 0 22px var(--cyan);
}

.nav-dot {
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 2px;
  transform: rotate(45deg);
}

.hero {
  position: relative;
  min-height: 475px;
  overflow: hidden;
  border-bottom: 1px solid rgba(36, 227, 255, 0.18);
  background:
    linear-gradient(90deg, rgba(2, 8, 15, 0.82) 0%, rgba(2, 8, 15, 0.52) 38%, rgba(2, 8, 15, 0.18) 72%, rgba(2, 8, 15, 0.56) 100%),
    linear-gradient(180deg, rgba(2,8,15,0.02), rgba(2,8,15,0.56)),
    url("hero-bg.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 62% 12%, rgba(36,227,255,0.17), transparent 280px);
}

.hero-inner,
.page-section,
.footer {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 475px;
  padding: 72px 42px 46px;
  display: flex;
  align-items: center;
  gap: 42px;
}

.hero-sub .hero-inner {
  min-height: 380px;
}

.hero-copy {
  max-width: 660px;
}

.hero-copy .kicker,
.center-title .kicker,
.ornament-panel .kicker,
.search-panel .kicker {
  color: var(--cyan);
}

.kicker {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  transform: rotate(45deg);
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1, h2, h3 {
  margin: 0;
  letter-spacing: 0;
  font-weight: 900;
}

.hero-copy h1 {
  font-size: clamp(42px, 5.5vw, 68px);
  line-height: 1.12;
  text-shadow: 0 0 22px rgba(255,255,255,0.16);
}

.hero-copy h1 span {
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(36,227,255,0.42);
}

.hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #f1f5fb;
  font-size: 20px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 36px;
}

.copy-button,
.gold-button,
.search-box button {
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.copy-button:hover,
.gold-button:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.copy-button {
  min-width: min(100%, 360px);
  min-height: 82px;
  padding: 12px 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  background: linear-gradient(180deg, rgba(36,227,255,0.16), rgba(36,227,255,0.04));
  color: var(--text);
  box-shadow: 0 0 32px rgba(36,227,255,0.22), inset 0 0 28px rgba(36,227,255,0.08);
}

.copy-button span {
  font-size: 26px;
  font-weight: 900;
}

.copy-button small {
  color: var(--cyan);
  font-family: inherit;
}

.gold-button {
  min-height: 82px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: rgba(244, 189, 69, 0.06);
  font-size: 18px;
  font-weight: 900;
}

.gold-button::after {
  content: ">";
  margin-left: 14px;
  font-size: 24px;
  line-height: 1;
}

.status-tower-card {
  margin-left: auto;
  width: min(100%, 300px);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(6, 12, 18, 0.86);
  box-shadow: var(--shadow), inset 0 0 26px rgba(255,255,255,0.04);
}

.status-tower-card > span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
}

.status-tower-card .online-text {
  display: block;
  margin: 14px 0 18px;
  color: var(--green);
  font-size: 34px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.status-tower-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.status-tower-card div {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.16);
}

.status-tower-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-tower-card dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 900;
}

.page-section {
  padding: 36px 42px;
}

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

.glow-stat {
  min-height: 112px;
  padding: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--cyan);
  background: linear-gradient(180deg, rgba(36,227,255,0.11), rgba(5,16,26,0.8));
  box-shadow: inset 0 0 28px rgba(36,227,255,0.08), 0 0 28px rgba(36,227,255,0.12);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}

.glow-stat span {
  color: #eaf4fb;
  font-size: 15px;
}

.glow-stat strong {
  color: var(--cyan);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.glow-stat.gold strong {
  color: var(--gold);
  font-size: clamp(22px, 3vw, 34px);
}

.center-title {
  margin-bottom: 28px;
  text-align: center;
}

.center-title h2,
.ornament-panel h2,
.status-big-card h2,
.rule-row h2,
.news-card h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.center-title p {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 17px;
}

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

.course-card,
.ornament-panel,
.status-big-card,
.news-card,
.rule-row,
.rule-message,
.search-panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 21, 34, 0.86), rgba(2, 10, 18, 0.94));
  box-shadow: var(--shadow);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.course-card {
  overflow: hidden;
  text-align: center;
  transition: transform 180ms ease, border-color 180ms ease;
}

.course-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
}

.course-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.course-icon {
  width: 68px;
  height: 58px;
  margin: -29px auto 14px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  background: rgba(3, 18, 30, 0.92);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
}

.course-card h3 {
  font-size: 30px;
}

.course-card strong {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: 18px;
}

.course-card p {
  margin: 20px auto 26px;
  max-width: 260px;
  color: var(--muted);
  line-height: 1.7;
}

.course-card.orange {
  border-color: rgba(255, 121, 61, 0.7);
}

.course-card.orange .course-icon,
.course-card.orange strong {
  border-color: var(--orange);
  color: var(--orange);
}

.ranking-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  align-items: start;
}

.search-panel {
  align-self: start;
  margin-top: 18px;
  padding: 18px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 8px;
  margin-bottom: 14px;
}

.search-box input {
  min-height: 42px;
  min-width: 0;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  outline: none;
  background: rgba(2, 8, 14, 0.76);
  color: var(--text);
  font-size: 14px;
}

.search-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(36,227,255,0.12);
}

.search-box button {
  min-height: 42px;
  border: 1px solid var(--cyan);
  background: rgba(36,227,255,0.08);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
}

.player-result {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(1, 9, 16, 0.52);
}

.player-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.player-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.avatar,
.leaderboard img,
.player-head img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.avatar {
  width: 64px;
  height: 64px;
  border: 2px solid var(--line);
  background: #06101a;
}

.stats,
.oj-list,
.oj-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.stats span,
.oj-list span,
.difficulty {
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.ornament-panel {
  padding: 26px;
}

.oj-card-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.oj-preview-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 5px;
  background: rgba(0, 8, 15, 0.72);
}

.oj-preview-card img {
  width: 100%;
  height: 132px;
  display: block;
  object-fit: cover;
}

.oj-preview-body {
  padding: 16px;
}

.oj-rank {
  color: var(--cyan);
  font-size: 30px;
  font-weight: 900;
}

.oj-preview-card h3 {
  margin-top: 4px;
  font-size: 24px;
}

.oj-stats {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 12px;
}

.oj-stats span {
  min-width: 90px;
  color: #f6f8fc;
  font-size: 20px;
  font-weight: 900;
}

.oj-stats small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.side-stack {
  display: grid;
  gap: 22px;
}

.leaderboard {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.leaderboard article {
  display: grid;
  grid-template-columns: 52px 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.rank-badge {
  color: var(--gold);
  font-size: 24px;
  font-weight: 900;
}

.leaderboard img {
  width: 48px;
  height: 48px;
}

.leaderboard span:last-child {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
}

.notice {
  padding: 18px;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.14);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.status-big-card {
  min-height: 210px;
  padding: 32px;
  display: grid;
  place-items: center;
  text-align: center;
}

.status-big-card > span {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
}

.status-big-card h2 {
  color: var(--green);
  font-size: clamp(44px, 7vw, 70px);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.online-panel {
  text-align: center;
}

.head-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 24px;
}

.player-head {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.player-head img {
  width: 78px;
  height: 78px;
  border: 1px solid var(--line);
  background: #06101a;
  box-shadow: 0 0 20px rgba(36,227,255,0.08);
}

.player-head figcaption {
  color: #e8edf5;
  font-size: 15px;
  font-weight: 800;
}

.rule-list {
  display: grid;
  gap: 18px;
}

.rule-row {
  min-height: 122px;
  padding: 18px 34px;
  display: grid;
  grid-template-columns: 118px 100px minmax(0, 1fr);
  align-items: center;
  gap: 26px;
}

.rule-number {
  color: var(--cyan);
  font-size: 64px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(36,227,255,0.5);
}

.rule-icon {
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(36,227,255,0.48);
}

.rule-row p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.rule-message {
  padding: 28px;
  text-align: center;
  color: var(--gold);
  border-color: rgba(244,189,69,0.6);
}

.rule-message strong {
  font-size: 22px;
}

.news-list {
  display: grid;
  gap: 28px;
}

.news-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.news-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--cyan);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  color: var(--cyan);
  font-size: 15px;
  font-weight: 800;
}

.news-meta b {
  color: var(--green);
}

.news-body h2 {
  margin-top: 28px;
}

.news-body p {
  max-width: 560px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}

.news-body a {
  color: var(--gold);
  font-weight: 900;
}

.footer {
  padding: 34px 42px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: none;
}

.footer-mark-box {
  width: 60px;
  height: 60px;
}

.footer-brand strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  letter-spacing: 3px;
}

.footer-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 800;
}

.footer-meta {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 13px;
}

@keyframes lightSweep {
  0%, 45% { transform: translateX(-70%); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: translateX(70%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .topbar {
    height: auto;
    padding: 16px 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-links a {
    min-height: 42px;
  }

  .hero-inner,
  .ranking-hero-grid,
  .stat-band,
  .course-grid,
  .ranking-layout,
  .status-grid,
  .news-card,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 56px 24px 38px;
    align-items: flex-start;
    flex-direction: column;
  }

  .status-tower-card {
    margin-left: 0;
  }

  .page-section {
    padding: 30px 24px;
  }

  .rule-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .rule-icon {
    display: none;
  }
}

@media (max-width: 620px) {
  .brand strong {
    font-size: 20px;
  }

  .brand small {
    letter-spacing: 5px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 12vw, 56px);
  }

  .hero-copy p {
    font-size: 17px;
  }

  .copy-button,
  .gold-button {
    width: 100%;
  }

  .oj-card-grid,
  .search-box,
  .player-card {
    grid-template-columns: 1fr;
  }

  .leaderboard article {
    grid-template-columns: 46px 44px minmax(0, 1fr);
  }

  .leaderboard article span:last-child {
    grid-column: 3;
  }

  .rule-row {
    grid-template-columns: 1fr;
  }

  .rule-number {
    font-size: 44px;
  }
}
