/* ===== リセット・ベース ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary:    #0f0f0f;
  --bg-player:     #1a1a1a;
  --bg-card:       #222222;
  --bg-topbar:     #111111;
  --accent:        #ff6600;
  --accent-cyan:   #00ccff;
  --accent-yellow: #ffdd00;
  --text-primary:  #f0f0f0;
  --text-muted:    #888888;
  --border:        #333333;
  --seekbar-bg:    #444444;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', 'Yu Gothic', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== 弾幕レイヤー ===== */
#danmaku-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.danmaku-comment {
  position: absolute;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: bold;
  text-shadow: 0 0 6px currentColor;
  animation: danmaku-flow linear forwards;
  opacity: 0.45;
  user-select: none;
}

@keyframes danmaku-flow {
  from { transform: translateX(110vw); }
  to   { transform: translateX(-110vw); }
}

/* ===== ヘッダー ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 2rem;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.logo-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.logo-nico {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.logo-anniv {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-yellow);
  letter-spacing: -0.04em;
}

.logo-anniv sup {
  font-size: 0.7em;
  vertical-align: super;
}

.header-nav {
  display: flex;
  gap: 1.2rem;
}

.nav-item {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s;
  color: var(--text-muted);
}

.nav-item.active {
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
}

.nav-item.disabled {
  opacity: 0.4;
  cursor: default;
}

/* ===== メイン ===== */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ===== プレイヤーコンテナ ===== */
.player-container {
  background: var(--bg-player);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 102, 0, 0.08);
}

/* 上部バー */
.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
}

.player-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.ctrl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.ctrl-dot.active {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

/* スクリーン */
.player-screen {
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,102,0,0.06) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 100%, rgba(0,204,255,0.04) 0%, transparent 65%);
}

.kinen-badge {
  display: inline-block;
  background: rgba(255,102,0,0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.85rem;
  padding: 0.3rem 1rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.main-title {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255,102,0,0.5);
}

.sub-title {
  display: block;
  font-size: clamp(1.2rem, 4vw, 2rem);
  color: var(--accent-cyan);
  letter-spacing: 0.2em;
  text-shadow: 0 0 12px rgba(0,204,255,0.4);
  margin-top: 0.3rem;
}

.message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 1.5rem auto;
  max-width: 420px;
  line-height: 1.9;
}

/* ローディングバー */
.loading-bar {
  width: 240px;
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  margin: 1.5rem auto 0.6rem;
  overflow: hidden;
}

.loading-bar-inner {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent-yellow));
  border-radius: 99px;
  animation: loading-pulse 2s ease-in-out infinite alternate;
}

@keyframes loading-pulse {
  from { width: 15%; opacity: 0.7; }
  to   { width: 70%; opacity: 1; }
}

.loading-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* 下部バー */
.player-bottombar {
  padding: 0.5rem 1rem;
  background: var(--bg-topbar);
  border-top: 1px solid var(--border);
}

.seekbar {
  width: 100%;
  height: 3px;
  background: var(--seekbar-bg);
  border-radius: 99px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.seekbar-progress {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  animation: seekbar-grow 8s linear infinite;
}

@keyframes seekbar-grow {
  from { width: 0%; }
  to   { width: 100%; }
}

.player-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== 情報カード ===== */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.info-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.card-value {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent-cyan);
}

/* ===== SNSフォロー ===== */
.follow-section {
  text-align: center;
  padding: 1rem 0;
}

.follow-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.follow-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.follow-btn {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}

.follow-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.follow-btn.twitter {
  background: #1a1a1a;
  color: #f0f0f0;
  border: 1px solid #555;
}

.follow-btn.niconico {
  background: var(--accent);
  color: #fff;
}

/* ===== フッター ===== */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.footer-sub {
  font-size: 0.7rem;
  color: #555;
}

/* ===== レスポンシブ ===== */
@media (max-width: 600px) {
  .info-cards {
    grid-template-columns: 1fr;
  }

  .player-screen {
    padding: 2.5rem 1rem;
  }

  .site-header {
    padding: 0.6rem 1rem;
    gap: 1rem;
  }

  .header-nav {
    gap: 0.6rem;
  }
}
