/* =============================================
   Playground Page Styles
   Moodboard with TV and Draggable Stickers
   ============================================= */

.playground {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  /* Moodboard background with grid */
  background:
    /* Grid lines */
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    /* Subtle color gradients */
    radial-gradient(circle at 20% 30%, rgba(255, 230, 0, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
    linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
  background-size:
    40px 40px,
    40px 40px,
    100% 100%,
    100% 100%,
    100% 100%;
}

/* =============================================
   Moodboard - Container for Stickers
   ============================================= */
.moodboard {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.moodboard .sticker {
  pointer-events: auto;
}

/* =============================================
   Stickers - Draggable Elements
   ============================================= */
.sticker {
  position: absolute;
  cursor: grab;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  user-select: none;
}

.sticker:active {
  cursor: grabbing;
  z-index: 9;
}

.sticker:hover {
  z-index: 7;
}

/* Sticky Notes - Landscape orientation */
.sticker--note {
  width: 200px;
  min-height: 100px;
  padding: 15px;
  background: #ffe066;
  box-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 -2px 3px rgba(0, 0, 0, 0.1);
  /* Comic Sans or similar handwriting font */
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;
  font-size: 0.85rem;
  color: #333;
  line-height: 1.4;
}

.sticker--note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
}

.sticker--note p {
  margin: 0;
}

.sticker--note-pink {
  background: #ffb3d9;
}

.sticker--note-blue {
  background: #b3d9ff;
}

.sticker--note-green {
  background: #b3ffb3;
}

.sticker--note:hover {
  transform: scale(1.05);
  box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.4);
}

/* Image Stickers - No background for transparent images */
.sticker--image {
  width: 200px;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.sticker--image img {
  width: 100%;
  display: block;
  /* Drop shadow instead of box for transparent images */
  filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.4));
}

.sticker--image:hover {
  transform: scale(1.1);
}

.sticker--image:hover img {
  filter: drop-shadow(5px 5px 10px rgba(0, 0, 0, 0.5));
}

/* Dragging state */
.sticker.dragging {
  opacity: 0.8;
  transform: scale(1.1) rotate(0deg) !important;
}

/* =============================================
   TV Container
   ============================================= */
.tv-container {
  position: relative;
  width: 500px;
  max-width: 90vw;
  z-index: 10;
  cursor: pointer;
}

.tv-video {
  position: absolute;
  top: 12%;
  left: 12%;
  width: 76%;
  height: 60%;
  object-fit: cover;
  border-radius: 4px;
  z-index: 1;
}

.tv-frame {
  position: relative;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.tv-channel {
  position: absolute;
  top: 8%;
  right: 15%;
  font-family: 'VT323', monospace, var(--font-display);
  font-size: 1.2rem;
  color: #0f0;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 10px;
  z-index: 3;
  text-shadow: 0 0 5px #0f0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tv-channel.visible {
  opacity: 1;
}

/* TV Hover Effect */
.tv-container:hover .tv-video {
  filter: brightness(1.1);
}

/* Static effect on channel change */
.tv-video.changing {
  filter: brightness(2) contrast(2);
}

/* =============================================
   Googly Eyes
   ============================================= */
.googly-eyes {
  position: absolute;
  bottom: 15%;
  left: 10%;
  display: flex;
  gap: 10px;
  z-index: 8;
}

.eye {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid #333;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 -5px 10px rgba(0, 0, 0, 0.1),
    2px 4px 10px rgba(0, 0, 0, 0.3);
}

.pupil {
  width: 24px;
  height: 24px;
  background: #111;
  border-radius: 50%;
  position: absolute;
  transition: transform 0.05s ease-out;
  /* Shine effect */
  box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.3);
}

.pupil::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  top: 4px;
  left: 4px;
}

/* =============================================
   Scratch Card
   ============================================= */
.scratch-card {
  position: absolute;
  width: 180px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
  z-index: 8;
  cursor: crosshair;
}

.scratch-card__hidden {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  text-align: center;
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.scratch-card__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scratch-card__label {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: #666;
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scratch-card.revealed .scratch-card__label {
  opacity: 0;
}

/* =============================================
   Instructions
   ============================================= */
.playground-instructions {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  z-index: 100;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .tv-container {
    width: 350px;
  }

  .sticker--note {
    width: 160px;
    min-height: 80px;
    font-size: 0.75rem;
    padding: 12px;
  }

  .sticker--image {
    width: 140px;
  }

  .playground-instructions {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tv-container {
    width: 280px;
  }

  .sticker--note {
    width: 140px;
    min-height: 70px;
    font-size: 0.7rem;
  }

  .sticker--image {
    width: 100px;
  }
}
