* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a0a0f; overflow: hidden; font-family: 'Share Tech Mono', monospace; }
canvas { display: block; }

#overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
#overlay.visible { opacity: 1; pointer-events: all; }

.panel {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 48px 56px;
  text-align: center;
  min-width: 380px;
  position: relative; overflow: hidden;
}
.panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #00ffd5, transparent);
}
.panel h1 {
  font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 700;
  letter-spacing: 6px; text-transform: uppercase; color: #00ffd5; margin-bottom: 8px;
}
.panel h2 {
  font-family: 'Orbitron', monospace; font-size: 36px; font-weight: 900;
  color: #fff; margin-bottom: 6px; line-height: 1;
}
.panel p {
  color: rgba(255,255,255,0.4); font-size: 13px; letter-spacing: 1px;
  margin-bottom: 36px; line-height: 1.6;
}
.btn {
  display: inline-block; padding: 14px 40px;
  background: transparent; border: 1px solid #00ffd5; color: #00ffd5;
  font-family: 'Orbitron', monospace; font-size: 12px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase; cursor: pointer;
  transition: all 0.2s ease; position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: #00ffd5; transform: translateX(-100%); transition: transform 0.2s ease; z-index: -1;
}
.btn:hover::before { transform: translateX(0); }
.btn:hover { color: #0a0a0f; }
.btn-danger { border-color: #ff4466; color: #ff4466; }
.btn-danger::before { background: #ff4466; }
.btn-danger:hover { color: #0a0a0f; }

.stat-row { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; }
.stat { text-align: center; }
.stat-value { font-family: 'Orbitron', monospace; font-size: 28px; font-weight: 900; color: #fff; display: block; }
.stat-label { font-size: 10px; letter-spacing: 2px; color: rgba(255,255,255,0.3); text-transform: uppercase; }

#title-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: #080810; z-index: 200; opacity: 1; pointer-events: all;
  transition: opacity 0.6s ease;
}
#title-screen.hidden { opacity: 0; pointer-events: none; }

.title-bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,255,213,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0,255,213,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 20s linear infinite;
}
@keyframes gridDrift { from { background-position: 0 0; } to { background-position: 48px 48px; } }

.title-glow-orb { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.orb1 { width: 500px; height: 500px; background: rgba(0,255,213,0.06); top: -100px; left: -100px; }
.orb2 { width: 400px; height: 400px; background: rgba(100,0,255,0.06); bottom: -80px; right: -80px; }

.title-content {
  position: relative; z-index: 2; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.title-eyebrow {
  font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 8px;
  color: rgba(0,255,213,0.6); text-transform: uppercase; margin-bottom: 18px;
  animation: fadeSlideDown 0.8s ease both;
}
.title-logo {
  font-family: 'Orbitron', monospace; font-weight: 900;
  font-size: clamp(52px, 9vw, 96px); color: #fff; line-height: 1;
  letter-spacing: -2px; margin-bottom: 6px; animation: fadeSlideDown 0.8s 0.1s ease both; position: relative;
}
.title-logo .word-pixel { color: #fff; }
.title-logo .word-shoot { color: #00ffd5; text-shadow: 0 0 40px rgba(0,255,213,0.5), 0 0 80px rgba(0,255,213,0.2); }

.title-scanline {
  width: clamp(300px, 60vw, 600px); height: 2px;
  background: linear-gradient(90deg, transparent, #00ffd5, transparent);
  margin: 20px auto; animation: fadeSlideDown 0.8s 0.2s ease both;
}
.title-tagline {
  font-family: 'Share Tech Mono', monospace; font-size: 13px; letter-spacing: 3px;
  color: rgba(255,255,255,0.35); text-transform: uppercase; margin-bottom: 52px;
  animation: fadeSlideDown 0.8s 0.3s ease both;
}
.title-pixel-preview { display: flex; gap: 4px; margin-bottom: 52px; animation: fadeSlideDown 0.8s 0.35s ease both; }
.preview-cell { width: 12px; height: 12px; border-radius: 2px; animation: cellPulse 2s ease-in-out infinite; }
.preview-cell:nth-child(1) { background:#E63946; animation-delay:0s; }
.preview-cell:nth-child(2) { background:#457B9D; animation-delay:0.15s; }
.preview-cell:nth-child(3) { background:#F4A261; animation-delay:0.3s; }
.preview-cell:nth-child(4) { background:#2A9D8F; animation-delay:0.45s; }
.preview-cell:nth-child(5) { background:#9B5DE5; animation-delay:0.6s; }
.preview-cell:nth-child(6) { background:#F15BB5; animation-delay:0.75s; }
.preview-cell:nth-child(7) { background:#00BBF9; animation-delay:0.9s; }
.preview-cell:nth-child(8) { background:#FF6B6B; animation-delay:1.05s; }
@keyframes cellPulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.3); } }

.title-play-btn {
  display: inline-block; padding: 18px 64px;
  background: transparent; border: 1px solid #00ffd5; color: #00ffd5;
  font-family: 'Orbitron', monospace; font-size: 13px; font-weight: 700;
  letter-spacing: 6px; text-transform: uppercase; cursor: pointer;
  position: relative; overflow: hidden; animation: fadeSlideDown 0.8s 0.5s ease both; transition: color 0.25s ease;
}
.title-play-btn::before {
  content: ''; position: absolute; inset: 0;
  background: #00ffd5; transform: translateX(-100%); transition: transform 0.25s ease; z-index: -1;
}
.title-play-btn:hover::before { transform: translateX(0); }
.title-play-btn:hover { color: #080810; }
.title-play-btn::after { content: ''; position: absolute; inset: -2px; border: 1px solid rgba(0,255,213,0.2); pointer-events: none; }

.title-hint {
  margin-top: 20px; font-family: 'Share Tech Mono', monospace; font-size: 10px;
  letter-spacing: 2px; color: rgba(255,255,255,0.15); animation: fadeSlideDown 0.8s 0.65s ease both;
}
.title-howto {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 40px; animation: fadeSlideDown 0.8s 0.7s ease both;
}
.howto-item { text-align: center; }
.howto-icon { font-family: 'Orbitron', monospace; font-size: 18px; color: rgba(0,255,213,0.5); display: block; margin-bottom: 6px; }
.howto-text { font-family: 'Share Tech Mono', monospace; font-size: 10px; letter-spacing: 1px; color: rgba(255,255,255,0.2); text-transform: uppercase; line-height: 1.5; }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }

.softlock-badge {
  display: inline-block; padding: 4px 12px;
  background: rgba(255,180,0,0.15); border: 1px solid rgba(255,180,0,0.4);
  color: #ffb400; font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 16px; border-radius: 2px;
}
