/* ═══════════════════════════════════════════════════════════════
   NEN CLASH - Portfolio Game Page Styles
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a12;
  --bg-card: #11111a;
  --bg-hover: #1a1a28;
  --accent-gold: #d4af37;
  --accent-gold-dim: #8a7324;
  --accent-cyan: #3dd9d9;
  --accent-pink: #ff6b9d;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --danger: #ff4444;
  --success: #44ff88;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background particles canvas ── */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--accent-gold);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-badge .live-dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #fff 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-dim);
  margin-bottom: 2rem;
  max-width: 600px;
}

/* ── Play Button ── */
.btn-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, var(--accent-gold), #f0d878);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(212, 175, 55, 0.3);
}

.btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.5);
}

.btn-play svg {
  width: 24px; height: 24px;
}

/* ── Game Embed ── */
.game-section {
  position: relative;
  padding: 4rem 1rem;
  display: none;
  z-index: 1;
}

.game-section.active {
  display: block;
}

.game-container {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 55, 0.2);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.1);
}

.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.game-toolbar .title {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.9rem;
}

.game-toolbar .controls {
  display: flex;
  gap: 0.5rem;
}

.toolbar-btn {
  background: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold);
  border-color: var(--accent-gold-dim);
}

.game-frame {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border: none;
  display: block;
}

.game-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}

.game-placeholder h3 {
  color: var(--accent-gold);
  font-size: 1.3rem;
}

.game-placeholder p {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 500px;
}

/* ── Features Section ── */
.features {
  position: relative;
  padding: 5rem 1rem;
  z-index: 1;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 3rem;
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(212, 175, 55, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ── Characters Section ── */
.characters {
  position: relative;
  padding: 5rem 1rem;
  z-index: 1;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.char-card:hover {
  border-color: var(--accent-gold-dim);
  transform: scale(1.03);
}

.char-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.char-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.char-card .nen-type {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
}

/* ── Controls Section ── */
.controls-section {
  position: relative;
  padding: 5rem 1rem;
  z-index: 1;
}

.controls-table {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
  overflow: hidden;
}

.controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.controls-row:last-child { border-bottom: none; }

.controls-row .action {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.key-group {
  display: flex;
  gap: 0.4rem;
}

kbd {
  background: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--accent-gold);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  position: relative;
  z-index: 1;
}

footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { min-height: auto; padding-top: 4rem; padding-bottom: 3rem; }
  .game-container { border-radius: 10px; }
  .features-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: repeat(2, 1fr); }
}
