/* === Splash Screen === */
.splash-screen {
  gap: var(--space-xl);
}

.splash-title {
  font-size: var(--font-size-title);
  font-weight: 900;
  color: var(--text-light);
  text-shadow: 0 4px 0 rgba(0,0,0,0.15), 0 0 40px rgba(255,255,255,0.2);
  letter-spacing: -1px;
}

.splash-title .chroma {
  background: linear-gradient(135deg, #FF6B6B, #FFD93D, #51CF66, #339AF0, #CC5DE8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-subtitle {
  font-size: var(--font-size-lg);
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.splash-logo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: var(--space-md);
}

.splash-logo-cell {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  opacity: 0;
}

/* === Map Screen === */
.map-screen {
  padding: var(--space-lg);
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 4/3;
}

.zone-area {
  position: absolute;
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-bounce),
              box-shadow var(--duration-normal);
}

.zone-area:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.zone-area.locked {
  filter: grayscale(0.6);
  opacity: 0.6;
  cursor: default;
}

.zone-area.locked:hover {
  transform: none;
}

.zone-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--text-light);
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin-bottom: var(--space-sm);
}

.zone-stars {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.9);
}

.level-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.level-node {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  background: rgba(255,255,255,0.9);
  color: var(--text-dark);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-bounce);
  box-shadow: var(--shadow-sm);
}

.level-node:hover {
  transform: scale(1.15);
}

.level-node.completed {
  background: var(--accent-yellow);
  color: var(--text-dark);
}

.level-node.locked {
  background: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.5);
  cursor: default;
}

.level-node.locked:hover {
  transform: none;
}

.level-node.current {
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: var(--shadow-glow);
}

/* === Puzzle Screen === */
.puzzle-screen {
  justify-content: flex-start;
  padding-top: var(--space-md);
}

.puzzle-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: flex-end;
  width: 100%;
  max-width: 600px;
  padding-bottom: 0;
}

/* === Studio Screen === */
.studio-screen {
  justify-content: flex-start;
  padding: var(--space-md);
}

.studio-layout {
  display: flex;
  gap: var(--space-lg);
  flex: 1;
  width: 100%;
  max-width: 1000px;
  align-items: flex-start;
}

.studio-canvas-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-sidebar {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.studio-tools {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.studio-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
}

.studio-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Studio responsive: stack on small screens */
@media (max-width: 768px) {
  .studio-layout {
    flex-direction: column;
    align-items: center;
  }

  .studio-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .studio-tools {
    justify-content: center;
  }
}

/* === Gallery Screen === */
.gallery-screen {
  padding: var(--space-lg);
  justify-content: flex-start;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-md);
  width: 100%;
  max-width: 800px;
  margin-top: var(--space-lg);
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-bounce);
  background: white;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.gallery-item canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.gallery-empty {
  text-align: center;
  color: rgba(255,255,255,0.7);
  padding: var(--space-xxl);
}

/* === Completion Modal === */
.completion-modal {
  text-align: center;
}

.completion-modal .stars {
  margin: var(--space-lg) 0;
}

.completion-modal .star {
  font-size: 48px;
}

.completion-modal .message {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-lg);
}

/* === Settings Screen === */
.settings-screen .card {
  width: 100%;
  max-width: 400px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--cell-border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-weight: 600;
}

/* === Toggle Switch === */
.toggle {
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: var(--cell-border);
  position: relative;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.toggle.on {
  background: var(--success);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-fast) var(--ease-bounce);
}

.toggle.on::after {
  transform: translateX(24px);
}

/* === Volume Slider === */
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 8px;
  border-radius: 4px;
  background: var(--cell-border);
  outline: none;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--space-primary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
