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

:root {
  --navy:        #0a0f2e;
  --navy-light:  #111a45;
  --navy-mid:    #0d1235;
  --orange:      #ff6b00;
  --orange-dim:  rgba(255,107,0,0.15);
  --orange-glow: rgba(255,107,0,0.3);
  --white:       #e8eaf0;
  --dim:         rgba(232,234,240,0.55);
  --grid:        rgba(255,107,0,0.05);
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: 'Courier New', monospace;
  overflow: hidden;
}

body.site-active { overflow: auto; }

/* ══ LOADING ══════════════════════════════════════ */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--navy);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  z-index: 100;
  transition: opacity 0.8s ease;
}
#loading-screen.fade-out { opacity: 0; pointer-events: none; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.particles { position: absolute; inset: 0; pointer-events: none; }
.particle {
  position: absolute; width: 2px; height: 2px;
  background: var(--orange); border-radius: 50%;
  animation: float linear infinite; opacity: 0;
}
@keyframes float {
  0%   { transform: translateY(100vh); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-10vh) translateX(20px); opacity: 0; }
}

.top-anim, .bottom-anim {
  width: 100%; height: 100px; flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255,107,0,0.12) 0%, transparent 100%);
  position: relative; overflow: hidden;
}
.bottom-anim { background: linear-gradient(0deg, rgba(255,107,0,0.12) 0%, transparent 100%); }

.scan-line {
  position: absolute; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.top-anim .scan-line    { animation: scan-top    2.5s ease-in-out infinite; }
.bottom-anim .scan-line { animation: scan-bottom 2.5s ease-in-out infinite; }
@keyframes scan-top    { 0%{top:0;opacity:0} 50%{opacity:1} 100%{top:100%;opacity:0} }
@keyframes scan-bottom { 0%{bottom:0;opacity:0} 50%{opacity:1} 100%{bottom:100%;opacity:0} }

.center-content {
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
  flex: 1; justify-content: center;
}

/* ロゴ */
.logo-wrap {
  text-align: center;
  margin-bottom: 4px;
}
.logo-main {
  font-size: clamp(2.8rem, 9vw, 6.2rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1;
}
.logo-multi {
  color: var(--white);
  text-shadow: 0 0 40px rgba(232,234,240,0.25), 0 0 80px rgba(232,234,240,0.1);
}
.logo-box {
  color: var(--orange);
  text-shadow: 0 0 40px var(--orange-glow), 0 0 100px rgba(255,107,0,0.2);
}
.logo-sub {
  font-size: clamp(0.6rem, 1.4vw, 0.8rem);
  letter-spacing: 0.45em;
  color: var(--dim);
  margin-top: 10px;
  opacity: 0;
  transition: opacity 1s ease;
}
.logo-sub.visible { opacity: 1; }

/* スマホ: 2行縦積みで収める */
@media (max-width: 600px) {
  .logo-multi, .logo-box { display: block; }
  .logo-main {
    font-size: clamp(2.4rem, 13.5vw, 3.6rem);
    letter-spacing: 0.28em;
    line-height: 1.05;
  }
  .logo-sub {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    margin-top: 8px;
  }
}

/* プログレスバー */
.progress-wrap {
  width: min(480px, 90vw);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -4px;
}
.progress-bar-track {
  flex: 1; height: 2px;
  background: rgba(255,107,0,0.12);
  border-radius: 1px; overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ffaa44);
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px var(--orange-glow);
}
.progress-num {
  font-size: 0.68rem;
  color: var(--orange);
  opacity: 0.65;
  min-width: 36px;
  text-align: right;
  letter-spacing: 0.05em;
}

/* hex背景ストリーム */
.hex-streams {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
}
.hex-col {
  position: absolute; top: -100%;
  font-family: 'Courier New', monospace;
  font-size: 9px; line-height: 1.9;
  color: var(--orange);
  white-space: pre;
  animation: hex-fall linear infinite;
}
@keyframes hex-fall {
  from { transform: translateY(0); }
  to   { transform: translateY(200%); }
}

.boot-log {
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  color: var(--orange);
  opacity: 0.85; text-align: left;
  width: min(480px, 90vw);
  min-height: 180px;
  max-height: 260px;
  overflow: hidden;
  line-height: 2;
}

.boot-line {
  min-height: 1.4em;
  white-space: pre;
}
.boot-warn { color: #ffaa00; }
.boot-ok   { color: #4CAF50; }

.cursor {
  display: inline-block;
  opacity: 1;
  animation: blink 0.7s step-end infinite;
  color: var(--orange);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.connecting-text {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.5em;
  color: var(--white);
  min-height: 30px;
  text-shadow: 0 0 20px var(--orange-glow);
}

.enter-btn {
  position: relative;
  background: transparent;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: 'Courier New', monospace;
  font-size: 0.95rem; letter-spacing: 0.25em;
  padding: 14px 44px; cursor: pointer;
  opacity: 0; transition: all 0.3s;
  clip-path: polygon(10px 0%,100% 0%,calc(100% - 10px) 100%,0% 100%);
}
.enter-btn.visible { opacity: 1; animation: appear 0.6s ease forwards; }
.enter-btn:hover   { background: var(--orange-glow); box-shadow: 0 0 24px var(--orange-glow); }
@keyframes appear  { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

.pulse-ring {
  position: absolute; inset: -10px;
  border: 1px solid var(--orange);
  clip-path: polygon(10px 0%,100% 0%,calc(100% - 10px) 100%,0% 100%);
  animation: pulse 2.2s ease-out infinite; opacity: 0;
}
.pulse-ring.delay { animation-delay: 1.1s; }
@keyframes pulse { 0%{opacity:0.5;transform:scale(1)} 100%{opacity:0;transform:scale(1.18)} }

/* ══ TICKER ═══════════════════════════════════════ */
.ticker-bar {
  position: fixed; top: 0; width: 100%;
  background: var(--orange); color: var(--navy);
  display: flex; align-items: center;
  height: 32px; z-index: 200; overflow: hidden;
}
.ticker-label {
  padding: 0 16px; font-size: 0.7rem;
  font-weight: 700; letter-spacing: 0.15em;
  white-space: nowrap; border-right: 2px solid var(--navy);
}
.ticker-track { flex: 1; overflow: hidden; }
.ticker-content {
  display: inline-block;
  font-size: 0.75rem; letter-spacing: 0.05em;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
@keyframes ticker { from{transform:translateX(100vw)} to{transform:translateX(-100%)} }

/* ══ HEADER ═══════════════════════════════════════ */
.site-header {
  position: fixed; top: 32px; width: 100%;
  background: rgba(10,15,46,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--orange-dim);
  z-index: 150;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; gap: 32px;
}
.logo { font-size: 1.15rem; letter-spacing: 0.2em; font-weight: 700; }
.logo-accent { color: var(--orange); }
.nav-menu { display: flex; gap: 28px; flex: 1; }
.nav-menu a {
  color: var(--dim); text-decoration: none;
  font-size: 0.82rem; letter-spacing: 0.08em;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--orange); }
.login-btn {
  background: transparent; border: 1px solid var(--orange);
  color: var(--orange); font-family: 'Courier New', monospace;
  font-size: 0.78rem; padding: 7px 20px; cursor: pointer;
  letter-spacing: 0.1em; transition: all 0.2s;
}
.login-btn:hover { background: var(--orange-dim); }

/* ══ HERO ═════════════════════════════════════════ */
.hero {
  min-height: 100vh; padding-top: 160px;
  display: flex; align-items: center;
  justify-content: center; gap: 80px;
  position: relative; overflow: hidden;
  padding-left: 80px; padding-right: 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,107,0,0.08) 0%, transparent 60%);
}
.hero-content { max-width: 560px; z-index: 1; }
.hero-tag {
  font-size: 0.7rem; letter-spacing: 0.3em;
  color: var(--orange); margin-bottom: 20px;
  opacity: 0.8;
}
.hero-title {
  font-size: 3rem; line-height: 1.3;
  font-weight: 700; margin-bottom: 20px;
  font-family: sans-serif;
}
.accent { color: var(--orange); }
.hero-sub {
  color: var(--dim); line-height: 1.8;
  font-size: 0.95rem; margin-bottom: 36px;
  font-family: sans-serif;
}
.hero-btns { display: flex; gap: 16px; }

.btn-primary {
  background: var(--orange); color: var(--navy);
  border: none; font-family: 'Courier New', monospace;
  font-size: 0.85rem; padding: 13px 28px;
  cursor: pointer; letter-spacing: 0.1em;
  font-weight: 700; transition: all 0.2s;
  clip-path: polygon(8px 0%,100% 0%,calc(100% - 8px) 100%,0% 100%);
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-2px); }
.btn-primary.large { font-size: 1rem; padding: 16px 40px; }

.btn-ghost {
  background: transparent; color: var(--white);
  border: 1px solid rgba(232,234,240,0.3);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem; padding: 13px 28px;
  cursor: pointer; letter-spacing: 0.1em;
  transition: all 0.2s;
  clip-path: polygon(8px 0%,100% 0%,calc(100% - 8px) 100%,0% 100%);
}
.btn-ghost:hover { border-color: var(--white); background: rgba(232,234,240,0.05); }

.hero-visual {
  position: relative; width: 280px; height: 280px;
  flex-shrink: 0; z-index: 1;
}
.orb {
  position: absolute; inset: 40px;
  background: radial-gradient(circle, rgba(255,107,0,0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.12); opacity: 1; }
}
.orb-ring {
  position: absolute; inset: 0;
  border: 1px solid var(--orange-dim);
  border-radius: 50%;
  animation: orbit 6s linear infinite;
}
.orb-ring.delay2 { inset: 20px; animation-duration: 9s; animation-direction: reverse; }
@keyframes orbit { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* ══ SECTIONS ═════════════════════════════════════ */
.section {
  padding: 100px 32px;
  max-width: 1100px; margin: 0 auto;
  text-align: center;
}
.dark-section {
  background: var(--navy-mid);
  max-width: 100%; padding: 100px 32px;
}
.section-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.section-tag {
  font-size: 1rem; letter-spacing: 0.3em;
  color: var(--orange); opacity: 0.9;
  margin-bottom: 16px; font-weight: 700;
}
.section-title {
  font-size: 1.8rem; font-weight: 700;
  font-family: sans-serif; margin-bottom: 56px;
  letter-spacing: 0.02em;
}

/* ══ ENTRY CARDS ══════════════════════════════════ */
.entry-grid {
  display: flex; justify-content: center;
  gap: 24px; flex-wrap: wrap;
}
.entry-card {
  flex: 1; min-width: 240px; max-width: 300px;
  background: var(--navy-light);
  border: 1px solid var(--orange-dim);
  padding: 36px 28px; text-align: left;
  cursor: pointer; transition: all 0.3s;
  position: relative; overflow: hidden;
  clip-path: polygon(14px 0%,100% 0%,calc(100% - 14px) 100%,0% 100%);
}
.entry-card:hover {
  border-color: var(--orange);
  box-shadow: 0 0 30px var(--orange-dim);
  transform: translateY(-6px);
}
.card-line {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s;
}
.entry-card:hover .card-line { transform: scaleX(1); }
.entry-card.featured { border-color: var(--orange); }
.entry-card.featured .card-line { transform: scaleX(1); }
.featured-badge {
  position: absolute; top: 12px; right: -1px;
  background: var(--orange); color: var(--navy);
  font-size: 0.6rem; padding: 3px 10px;
  letter-spacing: 0.1em; font-weight: 700;
}
.entry-icon { font-size: 2rem; margin-bottom: 16px; }
.entry-card h3 {
  color: var(--orange); font-size: 1rem;
  letter-spacing: 0.05em; margin-bottom: 10px;
}
.entry-card p { color: var(--dim); font-size: 0.8rem; line-height: 1.7; font-family: sans-serif; }
.card-arrow {
  margin-top: 20px; color: var(--orange);
  font-size: 1.1rem; transition: transform 0.2s;
}
.entry-card:hover .card-arrow { transform: translateX(6px); }

/* ══ COMMUNITY ════════════════════════════════════ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.comm-item {
  background: var(--navy); border: 1px solid var(--orange-dim);
  padding: 28px 20px; text-align: center;
  transition: all 0.3s; position: relative;
  clip-path: polygon(10px 0%,100% 0%,calc(100% - 10px) 100%,0% 100%);
}
.comm-item:hover { border-color: var(--orange); transform: translateY(-4px); }
.comm-item.locked { opacity: 0.5; cursor: not-allowed; }
.comm-item.soon { opacity: 0.6; }
.comm-icon { font-size: 1.8rem; margin-bottom: 12px; }
.comm-item h4 { font-size: 0.88rem; color: var(--white); margin-bottom: 6px; letter-spacing: 0.05em; }
.comm-item p  { font-size: 0.74rem; color: var(--dim); line-height: 1.5; font-family: sans-serif; }
.lock-badge {
  display: inline-block; margin-top: 10px;
  background: rgba(255,107,0,0.2); color: var(--orange);
  font-size: 0.62rem; padding: 3px 8px; letter-spacing: 0.1em;
}
.soon-badge { background: rgba(232,234,240,0.1); color: var(--dim); }

/* ══ RANK TRACK ═══════════════════════════════════ */
.rank-track {
  display: flex; align-items: center;
  justify-content: center; gap: 0;
  flex-wrap: wrap;
}
.rank-item { text-align: center; min-width: 120px; }
.rank-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--navy-light);
  border: 2px solid var(--orange-dim);
  margin: 0 auto 12px;
}
.rank-dot.orange { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 12px var(--orange-glow); }
.rank-dot.bright { background: var(--orange); border-color: #ffaa55; box-shadow: 0 0 20px var(--orange-glow); width: 20px; height: 20px; }
.rank-dot.gold   { background: #ffd700; border-color: #ffd700; box-shadow: 0 0 20px rgba(255,215,0,0.4); width: 20px; height: 20px; }
.rank-line { flex: 1; min-width: 40px; max-width: 80px; height: 1px; background: var(--orange-dim); }
.rank-label { font-size: 0.85rem; color: var(--white); margin-bottom: 6px; }
.rank-desc  { font-size: 0.7rem; color: var(--dim); font-family: sans-serif; }

/* ══ NEWS ═════════════════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.news-card {
  background: var(--navy); border: 1px solid var(--orange-dim);
  padding: 24px; text-align: left;
  transition: all 0.3s;
  clip-path: polygon(10px 0%,100% 0%,calc(100% - 10px) 100%,0% 100%);
}
.news-card:hover { border-color: var(--orange); transform: translateY(-3px); }
.news-date { font-size: 0.95rem; color: var(--orange); margin-bottom: 10px; font-weight: 700; }
.news-card h4 { font-size: 0.9rem; color: var(--white); margin-bottom: 8px; }
.news-card p  { font-size: 0.78rem; color: var(--dim); line-height: 1.6; font-family: sans-serif; }

/* ══ CTA ══════════════════════════════════════════ */
.cta-section { position: relative; overflow: hidden; }
.cta-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 500px; height: 300px;
  background: radial-gradient(ellipse, rgba(255,107,0,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-sub {
  color: var(--dim); font-size: 0.9rem;
  line-height: 1.8; margin-bottom: 36px;
  font-family: sans-serif;
}

/* ══ FOOTER ═══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--orange-dim);
  padding: 32px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 0.75rem; color: var(--dim); font-family: sans-serif; }

/* ══ NEWS BANNER ══════════════════════════════════ */
.news-banner {
  background: rgba(255,107,0,0.12);
  border-top: 1px solid var(--orange-dim);
  border-bottom: 1px solid var(--orange-dim);
  padding: 10px 32px;
  display: flex; align-items: center; gap: 14px;
  transition: all 0.3s;
}
.news-banner.hidden-banner {
  display: none;
}
.news-banner-badge {
  background: var(--orange); color: var(--navy);
  font-size: 0.68rem; font-weight: 700;
  padding: 3px 10px; letter-spacing: 0.15em;
  white-space: nowrap; flex-shrink: 0;
}
.news-banner-text {
  font-size: 0.85rem; color: var(--white);
  line-height: 1.4; font-family: sans-serif;
  flex: 1;
}
.news-banner-link {
  color: var(--orange); text-decoration: none;
  font-size: 0.82rem; white-space: nowrap;
  letter-spacing: 0.05em; flex-shrink: 0;
  transition: opacity 0.2s;
}
.news-banner-link:hover { opacity: 0.7; }
.news-banner-close {
  background: transparent; border: none;
  color: var(--dim); cursor: pointer;
  font-size: 0.9rem; padding: 4px 8px;
  flex-shrink: 0; transition: color 0.2s;
}
.news-banner-close:hover { color: var(--white); }

/* ══ HAMBURGER ════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: transparent; border: none;
  cursor: pointer; padding: 6px; margin-left: auto;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--orange); transition: all 0.3s;
  border-radius: 1px;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ══ HIDDEN ═══════════════════════════════════════ */
.hidden { display: none; }

/* ══ MOBILE ═══════════════════════════════════════ */
@media (max-width: 768px) {

  /* ヘッダー */
  .hamburger { display: flex; }
  .login-btn { display: none; }
  .header-inner { padding: 12px 20px; gap: 16px; }

  .nav-menu {
    display: none;
    flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,15,46,0.98);
    border-bottom: 1px solid var(--orange-dim);
    backdrop-filter: blur(12px);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a {
    padding: 16px 24px; font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,107,0,0.08);
  }

  /* ニュースバナー */
  .news-banner { flex-wrap: wrap; padding: 8px 16px; gap: 6px; }
  .news-banner-text { font-size: 0.76rem; width: 100%; }
  .news-banner-link { font-size: 0.76rem; }

  /* ヒーロー */
  .hero {
    flex-direction: column;
    padding: 130px 24px 60px;
    gap: 32px; text-align: center;
  }
  .hero-visual { display: none; }
  .hero-title { font-size: 2rem; }
  .hero-sub { font-size: 0.9rem; }
  .hero-btns { justify-content: center; flex-wrap: wrap; }
  .hero-bg {
    background: radial-gradient(ellipse at 50% 40%, rgba(255,107,0,0.1) 0%, transparent 65%);
  }

  /* セクション */
  .section { padding: 60px 20px; }
  .dark-section { padding: 60px 20px; }
  .section-title { font-size: 1.35rem; margin-bottom: 32px; }
  .section-tag { font-size: 0.8rem; }

  /* エントリカード: 縦1列 */
  .entry-grid { flex-direction: column; align-items: stretch; }
  .entry-card { max-width: 100%; min-width: auto; }

  /* コミュニティ: 2列 */
  .community-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .comm-item { padding: 20px 14px; }
  .comm-icon { font-size: 1.5rem; }

  /* ランクトラック: 縦積み */
  .rank-track { flex-direction: column; align-items: flex-start; padding: 0 20px; gap: 0; }
  .rank-item {
    display: flex; align-items: center;
    gap: 16px; text-align: left;
    min-width: auto; width: 100%; padding: 10px 0;
  }
  .rank-dot { margin: 0; flex-shrink: 0; }
  .rank-line { width: 2px; height: 28px; min-width: 2px; max-width: 2px; margin: 0 7px; }
  .rank-label { margin-bottom: 2px; }

  /* ニュース: 1列 */
  .news-grid { grid-template-columns: 1fr; }

  /* CTA */
  .cta-sub { font-size: 0.85rem; padding: 0 8px; }
  .btn-primary.large { font-size: 0.9rem; padding: 14px 28px; }

  /* フッター */
  .footer-inner { flex-direction: column; text-align: center; }
}
