:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-card: #162035;
  --bg-card-hover: #1c2944;
  
  --accent-cyan: #00f0ff;
  --accent-purple: #9d4edd;
  --accent-pink: #ff2a85;
  --accent-yellow: #ffd60a;
  --accent-green: #00f59b;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-main: 'Outfit', 'M PLUS Rounded 1c', sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* 背景装飾 */
.cyber-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}

.bg-glow-1 {
  top: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
}

.bg-glow-2 {
  bottom: 0;
  right: -100px;
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
}

/* ヘッダー */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.logo-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-full);
}

/* ヘッダー右側アクション */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 言語切替スイッチ */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 8px;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), #00b4d8);
  color: #0b0f19;
  box-shadow: 0 2px 8px rgba(0, 240, 255, 0.4);
}

.lang-divider {
  color: var(--text-sub);
  font-size: 11px;
}

.device-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* メイン領域 */
.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ヒーローセクション */
.hero-section {
  text-align: center;
  margin-bottom: 44px;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  background: rgba(157, 78, 221, 0.15);
  color: #c77dff;
  border: 1px solid rgba(157, 78, 221, 0.3);
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
}

.neon-text {
  color: #fff;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 35px rgba(0, 240, 255, 0.2);
}

.hero-subtitle {
  font-size: clamp(13px, 1.8vw, 15px);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* セクションタイトル */
.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-weight: 800;
}

.section-desc {
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 5px;
}

/* ゲームグリッド (PC: 3〜2列, スマホ: 1列) */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
}

/* ゲームカード */
.game-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 14px 35px rgba(0, 240, 255, 0.18);
  background: var(--bg-card-hover);
}

/* 公開中カードの特別強調 */
.featured-playable-card {
  border-color: rgba(0, 245, 155, 0.4);
  box-shadow: 0 10px 30px rgba(0, 245, 155, 0.12), 0 0 20px rgba(0, 240, 255, 0.08);
}

.featured-playable-card:hover {
  border-color: #00f59b;
  box-shadow: 0 16px 40px rgba(0, 245, 155, 0.25);
}

/* バッジスタイル */
.card-status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: linear-gradient(135deg, var(--accent-cyan), #0077b6);
  color: #0b0f19;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  z-index: 10;
  box-shadow: 0 3px 12px rgba(0, 240, 255, 0.35);
}

.badge-playable {
  background: linear-gradient(135deg, #00f59b, #10b981);
  color: #064e3b;
  box-shadow: 0 3px 14px rgba(0, 245, 155, 0.45);
  animation: pulse-badge 2.5s infinite;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.badge-pink {
  background: linear-gradient(135deg, var(--accent-pink), #c2185b);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 42, 133, 0.35);
}

.badge-green {
  background: linear-gradient(135deg, var(--accent-green), #00796b);
  color: #0b0f19;
  box-shadow: 0 3px 12px rgba(0, 245, 155, 0.35);
}

.badge-yellow {
  background: linear-gradient(135deg, var(--accent-yellow), #f57f17);
  color: #0b0f19;
  box-shadow: 0 3px 12px rgba(255, 214, 10, 0.35);
}

.badge-purple {
  background: linear-gradient(135deg, #c77dff, var(--accent-purple));
  color: #fff;
  box-shadow: 0 3px 12px rgba(157, 78, 221, 0.35);
}

/* カードビジュアル */
.card-visual {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.visual-corgi {
  background: radial-gradient(circle at center, #1b382b 0%, #0c1a14 70%);
}

.visual-2 { background: radial-gradient(circle at center, #3d142e 0%, #1a0914 70%); }
.visual-3 { background: radial-gradient(circle at center, #10382b 0%, #081a14 70%); }
.visual-4 { background: radial-gradient(circle at center, #383011 0%, #1a1708 70%); }
.visual-5 { background: radial-gradient(circle at center, #2e143d 0%, #14091a 70%); }

.card-icon {
  font-size: 54px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.game-card:hover .card-icon {
  transform: scale(1.15) rotate(5deg);
}

.slot-tag {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* カード本文 */
.card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.status-text {
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 700;
  white-space: nowrap;
}

.text-playable {
  color: var(--accent-green);
  font-weight: 800;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.card-desc code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
}

/* カードフッター */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  gap: 10px;
}

.folder-name {
  font-size: 11px;
  color: var(--text-sub);
  font-family: monospace;
}

.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.enter-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateX(2px);
}

.enter-btn-primary {
  background: linear-gradient(135deg, var(--accent-green), #059669);
  color: #064e3b;
  font-weight: 800;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 245, 155, 0.35);
}

.enter-btn-primary:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #042f2e;
  box-shadow: 0 6px 20px rgba(0, 245, 155, 0.5);
  transform: translateX(2px);
}

/* ガイドセクション */
.device-guide-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 36px;
}

.guide-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 22px;
  border-radius: var(--radius-md);
  text-align: left;
}

.guide-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.guide-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.guide-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* フッター */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 22px;
  background: rgba(11, 15, 25, 0.95);
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-sub);
}

.footer-tags {
  display: flex;
  gap: 8px;
}

.footer-tags span {
  font-size: 11px;
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

.sp-only {
  display: none;
}

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }
  
  .header-actions {
    gap: 6px;
  }

  .main-content {
    padding: 24px 16px 40px;
  }

  .sp-only {
    display: inline;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .enter-btn {
    padding: 10px 20px;
  }

  .device-status {
    padding: 4px 10px;
    font-size: 11px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
