@charset "UTF-8";

/* ==========================================================================
   Pixel Play - 2D Pixel Forest Dynamic Interaction
   Retro Pixel Art Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Sans+SC:wght@400;600;700;900&display=swap');

:root {
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  --bg-dark: #0f111a;
  --panel-bg: rgba(22, 27, 46, 0.88);
  --panel-border: #3b4261;
  --panel-border-glow: #6366f1;
  
  --accent-sakura: #f472b6;
  --accent-maple: #ef4444;
  --accent-bush: #10b981;
  --accent-breeze: #38bdf8;
  --accent-storm: #a855f7;
  --accent-amber: #f59e0b;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  
  --pixel-shadow: 0 4px 0 #000000, 0 8px 16px rgba(0,0,0,0.5);
  --pixel-btn-border: 2px solid #000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: var(--font-body);
  color: var(--text-main);
}

/* App Container */
#app-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Canvas Viewport */
#canvas-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: crosshair;
}

#pixel-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Vignette & Ambient scanlines (Subtle retro feel) */
.scanlines-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.18) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
  opacity: 0.65;
  z-index: 10;
}

.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 65%, rgba(10, 10, 20, 0.65) 100%);
  z-index: 11;
}

/* Lightning Overlay Flash */
#lightning-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transition: opacity 0.05s ease-out;
}

/* Top Header Bar */
.top-nav {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  pointer-events: none;
}

.brand-badge {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.brand-title {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: #38bdf8;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #000;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: #fb7185;
  background: rgba(251, 113, 133, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Telemetry / Weather Status Display */
.weather-status-box {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 18px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  font-size: 12px;
}

.status-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-val {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: #38bdf8;
}

.status-val.storm-active {
  color: #ec4899;
  animation: pulse-alert 1.2s infinite alternate;
}

@keyframes pulse-alert {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #ec4899); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 8px #ef4444); }
}

/* Floating Interactive Control Dock */
.control-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 25;
  pointer-events: auto;
  max-width: 95vw;
}

/* Weather Selector Pill */
.weather-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 40px;
  box-shadow: var(--pixel-shadow);
  backdrop-filter: blur(12px);
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.mode-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.45);
}

.mode-btn.active.mode-breeze {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.5);
}

.mode-btn.active.mode-storm {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.6);
  animation: pulse-purple 2s infinite ease-in-out;
}

@keyframes pulse-purple {
  0%, 100% { box-shadow: 0 0 12px rgba(147, 51, 234, 0.5); }
  50% { box-shadow: 0 0 24px rgba(236, 72, 153, 0.8); }
}

.mode-btn.active.mode-autumn {
  background: linear-gradient(135deg, #d97706, #ea580c);
  box-shadow: 0 2px 12px rgba(234, 88, 12, 0.55);
}

.mode-btn.active.mode-night {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.5);
}

/* Secondary Interactive Actions & Sliders */
.secondary-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: #334155;
  border-color: #64748b;
  transform: translateY(-1px);
}

.action-btn:active {
  transform: translateY(1px);
}

.slider-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 4px;
}

.slider-group input[type="range"] {
  width: 90px;
  accent-color: #38bdf8;
  cursor: pointer;
}

/* Floating Hints Overlay */
.interaction-hint {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(6px);
  animation: float-hint 3s infinite ease-in-out;
  transition: opacity 0.5s ease;
}

@keyframes float-hint {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}

.interaction-hint kbd {
  background: #334155;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-pixel);
  font-size: 9px;
}

/* Custom Cursor Wind Vortex Ripple */
.wind-cursor {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 2px dashed rgba(56, 189, 248, 0.6);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 100;
  transition: width 0.15s ease, height 0.15s ease, border-color 0.2s ease;
}

.wind-cursor.active {
  width: 52px;
  height: 52px;
  border-color: #ec4899;
  animation: spin-cursor 0.6s linear infinite;
}

@keyframes spin-cursor {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .weather-status-box {
    display: none;
  }
  .control-dock {
    bottom: 12px;
    width: 96%;
  }
  .weather-switcher {
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
  }
  .mode-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }
  .secondary-panel {
    display: none;
  }
}
