/* =====================
   Base Styles
===================== */
body {
  font-size: 16px;
  margin: 0;
  padding: 40px 20px;
  background: #0d0d0d;
  font-family: 'Courier New', monospace;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background: #0d0d0d url('assets/images/celestial-poof-dreams.webp') no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
}

/* =====================
   Heading Styles
===================== */
h1 {
  font-size: 2rem;
  color: #0ff;
  text-shadow: 0 0 10px #0ff;
}

/* === Hero Section (PW-960) === */
.hero-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-row h1 {
  margin: 0;
}

.celestial-ripple {
  display: inline-block;
  position: relative;
  color: #97f1ff;
  font-weight: bold;
}
.celestial-ripple::after {
  content: '';
  position: absolute;
  left: 0; top: 100%;
  width: 100%;
  height: 12px;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 70%,
     rgba(151, 241, 255, 0.82) 0%,
     rgba(151,241,255,0.47) 60%,
     transparent 100%
  );
  animation: rippleMove 2.7s infinite linear;
  opacity: 1;
  filter: blur(1.5px);
  transition: opacity 0.3s;
}
@keyframes rippleMove {
 0% { background-position-x: 0; }
 100% { background-position-x: 150px; }
}

.subtitle em {
  font-size: italic;
  font-style: 1.1rem;
  font-family: 'Share Tech Mono', monospace;
  color: #e0e0e0;
}
/* === End Hero Section — Celestial Poof Dreams (PW-960) === */

/* =====================
   Grid Layout
===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  gap: 20px;
  justify-content: center;
  margin: 30px 0;
  overflow: visible;      /* allow floating captions */
  position: relative;     /* context for absolute children */
  z-index: 1;
}

/* =====================
   Caption Wrapper (Floating Caption)
===================== */
.caption-wrapper {
  position: relative;     /* create positioning context */
  display: inline-block;
}

/* =====================
   Tile Styles
===================== */
.tile {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.2s ease;
  background: #222;
  border: 2px solid #ff00cc;
  padding: 20px;
  font-size: 2rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 10px #ff00cc88, 0 0 20px #00ffe7aa;
}

/* =====================
   Tile Hover Effect
===================== */
.tile:hover {
  transform: scale(1.2);
  background-color: #0ff;
  color: #000;
  animation: pulse 0.6s ease-in-out;
  box-shadow: 0 0 30px #00fff5, 0 0 50px #ff00cc;
}

/* =====================
   Tile Focus Styles
===================== */
.tile:focus {
  outline: 2px dashed #ff00cc;
  outline-offset: 4px;
}

/* =====================
   Pixel Scene Container
===================== */
.pixel-scene {
  margin-top: 20px;
  image-rendering: pixelated;
  border: 4px solid #ff69b4;
  padding: 6px;
  background: #222;
  box-shadow: 0 0 15px #00ffe7, 0 0 30px #ff00cc;
}

/* =====================
   Pixel Scene Image
===================== */
.pixel-scene img {
  max-width: 300px;
  height: auto;
  image-rendering: pixelated;
}

/* =====================
   Responsive: Small Mobile
===================== */
@media (max-width: 500px) {
  .grid {
    grid-template-columns: repeat(2, 80px);
  }

  .tile {
    font-size: 1.5rem;
    padding: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* =====================
   Responsive: Tablet
===================== */
@media (max-width: 768px) and (min-width: 501px) {
  .grid {
    grid-template-columns: repeat(2, 100px);
  }
}

/* =====================
   Animations: Pulse
===================== */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* =====================
   🎧 Audio Tile Styles (Jiggle)
===================== */
@keyframes jiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(5deg); }
  75%      { transform: rotate(-5deg); }
}

.jiggle,
#play-music:hover {
  animation: jiggle 0.3s infinite;
}

/* =====================
   💻 DevLog Panel Styles
===================== */
.devlog-panel {
  background: var(--tile-bg, #1e1e2f);
  color: var(--tile-text, #fefefe);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.devlog-panel ul {
  padding-left: 1rem;
  list-style: square;
}

.devlog-panel p {
  margin: 1rem;
  font-style: italic;
  line-height: 1.5;
}

/* =====================
   💻 Floating Caption Styles
===================== */
.caption {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'VT323', 'Share Tech Mono',monospace;
  font-size: 1.1rem;
  color: #fff;
  -webkit-text-stroke: 1px #000;
  text-shadow:
   0 0 4px #00ffe7, 
   0 0 8px #00ffe7;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.caption-wrapper:hover .caption {
  opacity: 1;
}

/* =====================
   Utilities
===================== */
*, *::before, *::after {
  box-sizing: border-box;
}

.hidden {
  display: none;
}
