/**
 * Drawing Screen Canvas, Tiles, & Theme Overrides
 * Styles the Etch a Sketch screen bezel, tile grid, stylus tip indicator, and Neon Midnight theme.
 */

/* ==========================================================================
   Drawing Screen Area
   ========================================================================== */
.screen-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.screen-frame {
  background-image: 
    radial-gradient(circle at 10px 10px, #ffd700 1.5px, #b58d04 3px, #755b05 4.5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 10px) 10px, #ffd700 1.5px, #b58d04 3px, #755b05 4.5px, transparent 5.5px),
    radial-gradient(circle at 10px calc(100% - 10px), #ffd700 1.5px, #b58d04 3px, #755b05 4.5px, transparent 5.5px),
    radial-gradient(circle at calc(100% - 10px) calc(100% - 10px), #ffd700 1.5px, #b58d04 3px, #755b05 4.5px, transparent 5.5px);
  background-color: var(--screen-frame-bg);
  padding: 1.5rem;
  border-radius: 20px;
  box-shadow: 
    inset 0 4px 12px rgba(0, 0, 0, 0.8),
    0 2px 4px rgba(255, 255, 255, 0.1);
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  position: relative;
}

.screen {
  background-color: var(--screen-bg);
  background-image: 
    radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 0);
  background-size: 16px 16px;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: var(--screen-shadow-inset);
  display: grid;
  overflow: hidden;
  position: relative;
  cursor: crosshair;
  user-select: none;
  touch-action: none;
}

/* Individual Grid Tiles */
.tile {
  background-color: transparent;
  transition: background-color 0.05s linear;
  position: relative;
}

/* Stylus Drawing Tip */
.tile.stylus-tip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ff3b30;
  box-shadow: 0 0 10px #ff3b30, 0 0 20px #ff3b30;
  animation: pulse-stylus 0.8s infinite alternate;
  z-index: 10;
  pointer-events: none;
}

/* Stylus Dot for Neon Theme */
.screen.neon-midnight .tile.stylus-tip::after {
  background-color: #00f0ff;
  box-shadow: 0 0 10px #00f0ff, 0 0 20px #00f0ff;
}

@keyframes pulse-stylus {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
}

/* Neon Midnight Canvas Theme */
.screen.neon-midnight {
  --screen-bg: #111317;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 16px 16px;
  box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.95);
}

.screen.neon-midnight .tile[style*="background-color"] {
  filter: brightness(1.3) drop-shadow(0 0 3px rgba(255, 255, 255, 0.15));
}
