/* LuminaFeed — Cozy pixel-art positivity */
@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,800&display=swap');

:root {
  --bg-1: #fff4e0;
  --bg-2: #ffe4b8;
  --bg-3: #ffd6a0;
  --cream: #fffaf0;
  --ink: #2d1b3d;
  --ink-soft: #4a3556;
  --sun: #ffb347;
  --sun-deep: #ff8c42;
  --rose: #ff6b9d;
  --leaf: #7fb069;
  --leaf-deep: #4a8b3a;
  --sky: #87ceeb;
  --sky-deep: #4a90b8;
  --berry: #c44569;
  --shadow: rgba(45, 27, 61, 0.15);
  --pixel: 4px;
}

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

html, body {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  background: var(--bg-1);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg-1) 50%, var(--bg-3) 100%);
  background-attachment: fixed;
  position: relative;
}

/* Pixel grid overlay for cozy texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(45,27,61,0.02) 3px, rgba(45,27,61,0.02) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(45,27,61,0.02) 3px, rgba(45,27,61,0.02) 4px);
  pointer-events: none;
  z-index: 1;
}

.pixel-font {
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 0.05em;
}

.mono-font {
  font-family: 'VT323', monospace;
  font-size: 1.2em;
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: var(--pixel) solid var(--ink);
  background: var(--cream);
  box-shadow: 0 var(--pixel) 0 var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: var(--sun);
  border: 3px solid var(--ink);
  position: relative;
  box-shadow: 4px 4px 0 var(--ink);
  display: grid;
  place-items: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--ink);
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: -8px;
  background:
    radial-gradient(circle at 50% 50%, transparent 60%, var(--sun-deep) 60%, var(--sun-deep) 65%, transparent 65%);
  pointer-events: none;
  opacity: 0.4;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0.5; }
}

.logo-text {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.logo-text span { color: var(--sun-deep); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.nav-links a:hover {
  border-color: var(--ink);
  background: var(--sun);
}

/* Main containers */
.container {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: var(--ink);
  color: var(--cream);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--shadow);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--shadow);
}

.btn-sun { background: var(--sun-deep); color: var(--ink); }
.btn-rose { background: var(--rose); color: var(--cream); }
.btn-leaf { background: var(--leaf-deep); color: var(--cream); }
.btn-sky { background: var(--sky-deep); color: var(--cream); }

/* Footer */
.site-footer {
  position: relative;
  z-index: 5;
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
  border-top: var(--pixel) solid var(--ink);
  background: var(--cream);
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.site-footer .pixel-heart {
  color: var(--rose);
  font-size: 1.5rem;
  display: inline-block;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Ad slots — ready for Google AdSense */
.ad-slot {
  margin: 2rem auto;
  padding: 0.5rem;
  background: var(--cream);
  border: 2px dashed var(--ink-soft);
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  color: var(--ink-soft);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 728px;
}

.ad-slot-sidebar {
  min-height: 250px;
  max-width: 300px;
}

/* Decorative pixel clouds */
.pixel-cloud {
  position: absolute;
  width: 80px;
  height: 32px;
  background:
    linear-gradient(var(--cream), var(--cream)) 0 8px / 80px 16px no-repeat,
    linear-gradient(var(--cream), var(--cream)) 16px 0 / 48px 32px no-repeat;
  opacity: 0.7;
  z-index: 2;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(40px); }
}

/* Responsive */
@media (max-width: 700px) {
  .site-header { padding: 1rem; flex-direction: column; gap: 1rem; }
  .container { padding: 2rem 1rem; }
  .nav-links { gap: 0.75rem; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 1.1rem; }
}

/* Game page shared styles */
.game-page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.game-page-header h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--sun);
}

.game-page-header p {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 2rem;
  padding: 0.4rem 0.8rem;
  border: 2px solid var(--ink);
  background: var(--cream);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: all 0.1s;
}

.back-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--shadow);
  background: var(--sun);
}

.game-frame {
  background: var(--cream);
  border: var(--pixel) solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 1.5rem;
  margin: 0 auto;
  max-width: 800px;
}

.game-instructions {
  background: var(--cream);
  border: 3px solid var(--ink);
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: 6px 6px 0 var(--shadow);
}

.game-instructions h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--sun-deep);
}

.game-instructions p, .game-instructions li {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.game-instructions ul { padding-left: 1.5rem; margin: 0.5rem 0; }

canvas {
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background: var(--bg-1);
  border: 3px solid var(--ink);
  max-width: 100%;
  height: auto;
  touch-action: manipulation;
}

/* Long-form game content section */
.game-about {
  background: var(--cream);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 2.25rem;
  max-width: 760px;
  margin: 2.5rem auto 0;
}
.game-about h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: var(--sun-deep);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.game-about h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  color: var(--ink);
  margin: 1.5rem 0 0.75rem;
  line-height: 1.5;
}
.game-about p, .game-about li {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.game-about ul { padding-left: 1.4rem; margin-bottom: 0.9rem; }
.game-about a { color: var(--sun-deep); }
