* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; width: 100%; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a1a2e; }
::-webkit-scrollbar-thumb { background: #2a3560; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a4580; }

.pixel-border {
  border: 2px solid #2a3560;
  box-shadow: inset 0 0 0 1px #16213e, 0 2px 8px rgba(0,0,0,0.3);
}

.pixel-border-accent {
  border: 2px solid #e94560;
  box-shadow: 0 0 12px rgba(233,69,96,0.2);
}

.glow-magenta { box-shadow: 0 0 20px rgba(233,69,96,0.15); }
.glow-blue { box-shadow: 0 0 20px rgba(15,52,96,0.3); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.3s ease-out; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(233,69,96,0.2); }
  50% { box-shadow: 0 0 20px rgba(233,69,96,0.4); }
}
.pulse-glow { animation: pulse-glow 2s infinite; }

.canvas-checkerboard {
  background-image:
    linear-gradient(45deg, #12192e 25%, transparent 25%),
    linear-gradient(-45deg, #12192e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #12192e 75%),
    linear-gradient(-45deg, transparent 75%, #12192e 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #2a3560;
  border-radius: 3px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #e94560;
  border-radius: 50%;
  cursor: pointer;
}

.sidebar-item:hover { background: rgba(233,69,96,0.1); }
.sidebar-item.active { background: rgba(233,69,96,0.15); border-right: 3px solid #e94560; }

.tab-btn { transition: all 0.2s; }
.tab-btn:hover { background: rgba(233,69,96,0.1); }
.tab-btn.active { background: rgba(233,69,96,0.15); color: #e94560; border-bottom: 2px solid #e94560; }

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  border-color: #e94560;
}

select, input[type="text"], input[type="number"], textarea {
  background: #1a1a2e;
  border: 1px solid #2a3560;
  color: #e8e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
select:focus, input[type="text"]:focus, input[type="number"]:focus, textarea:focus {
  border-color: #e94560;
}

.btn-primary {
  background: linear-gradient(135deg, #e94560, #c53050);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233,69,96,0.3); }

.btn-secondary {
  background: #263052;
  color: #e8e8f0;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  border: 1px solid #2a3560;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: #e94560; background: #2a3560; }

/* Dialogue chain animations */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.animate-slide-left { animation: slideInLeft 0.3s ease-out; }
.animate-slide-right { animation: slideInRight 0.3s ease-out; }

/* Expression slot hover */
.expression-slot:hover { 
  border-color: #e94560;
  transform: scale(1.05);
}