:root {
  --pink-primary: #FF69B4;
  --pink-dark: #DB7093;
  --pink-light: #FFB6C1;
  --purple-dark: #2D1B3D;
  --purple-mid: #4A2C5A;
  --blue-soft: #6A5ACD;
  --green-soft: #98FB98;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'VT323', monospace;
  background: linear-gradient(135deg, #1a0a1f 0%, #2D1B3D 50%, #1a1a2e 100%);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Title Screen */
.title-screen {
  background: radial-gradient(ellipse at center, #4A2C5A 0%, #2D1B3D 50%, #1a0a1f 100%);
}

.game-title {
  font-family: 'Press Start 2P', cursive;
  font-size: clamp(1.5rem, 6vw, 3rem);
  color: var(--pink-primary);
  text-shadow: 
    4px 4px 0 var(--purple-dark),
    -2px -2px 0 var(--pink-light),
    0 0 20px rgba(255, 105, 180, 0.5);
  animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.title-container {
  text-align: center;
}

/* Buttons */
.pixel-button {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, var(--pink-primary) 0%, var(--pink-dark) 100%);
  border: 4px solid var(--pink-light);
  border-radius: 0;
  color: white;
  cursor: pointer;
  text-shadow: 2px 2px 0 var(--purple-dark);
  box-shadow: 
    4px 4px 0 var(--purple-dark),
    inset 0 -4px 0 rgba(0,0,0,0.2);
  transition: all 0.1s ease;
  text-transform: uppercase;
}

.pixel-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--purple-dark);
}

.pixel-button:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.pixel-button.secondary {
  background: linear-gradient(180deg, var(--blue-soft) 0%, #4A3ACD 100%);
  border-color: #8A7AED;
}

.pixel-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Input */
.pixel-input {
  font-family: 'VT323', monospace;
  font-size: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 4px solid var(--pink-primary);
  color: white;
  text-align: center;
  width: 100%;
  max-width: 300px;
}

.pixel-input:focus {
  outline: none;
  border-color: var(--pink-light);
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

/* Character Selection */
.select-screen {
  background: radial-gradient(ellipse at center, #3D2B4D 0%, #2D1B3D 70%);
}

.day-counter {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--pink-light);
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--pink-primary);
}

.slime-select-card {
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid var(--pink-dark);
  border-radius: 0;
  transition: all 0.2s ease;
}

.slime-select-card:hover {
  transform: translateY(-4px);
  border-color: var(--pink-primary);
  background: rgba(255, 105, 180, 0.1);
  box-shadow: 0 8px 20px rgba(255, 105, 180, 0.3);
}

/* Game Screen */
.game-screen {
  background: linear-gradient(180deg, #1a0a1f 0%, #2D1B3D 100%);
}

/* Affection Panel */
.affection-panel {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--pink-dark);
  font-family: 'Press Start 2P', cursive;
}

/* Dialogue Box */
.dialogue-container {
  position: relative;
}

.dialogue-box {
  background: linear-gradient(180deg, rgba(45, 27, 61, 0.95) 0%, rgba(26, 10, 31, 0.98) 100%);
  border: 4px solid var(--pink-primary);
  border-radius: 0;
  min-height: 120px;
  position: relative;
  box-shadow: 
    0 0 30px rgba(255, 105, 180, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.speaker-name {
  position: absolute;
  top: -16px;
  left: 16px;
  background: var(--pink-primary);
  padding: 4px 12px;
  font-family: 'Press Start 2P', cursive;
  font-size: 0.6rem;
  color: white;
  text-shadow: 1px 1px 0 var(--purple-dark);
}

.dialogue-text {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #fff;
  padding-top: 8px;
}

.continue-indicator {
  position: absolute;
  bottom: 8px;
  right: 16px;
  color: var(--pink-light);
  animation: bounce 0.5s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Choice Buttons */
.choice-button {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  background: rgba(255, 105, 180, 0.1);
  border: 2px solid var(--pink-dark);
  color: white;
  transition: all 0.2s ease;
}

.choice-button:hover {
  background: rgba(255, 105, 180, 0.3);
  border-color: var(--pink-primary);
  padding-left: 1.5rem;
}

/* Slime Sprite */
.slime-sprite {
  filter: drop-shadow(0 0 20px rgba(255, 105, 180, 0.4));
}

.animate-idle {
  animation: idle 2s ease-in-out infinite;
}

.animate-jiggle {
  animation: jiggle 0.3s ease-in-out;
}

@keyframes idle {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50% { transform: scaleY(0.95) scaleX(1.03); }
}

@keyframes jiggle {
  0%, 100% { transform: scaleY(1) scaleX(1) rotate(0deg); }
  25% { transform: scaleY(0.9) scaleX(1.1) rotate(-5deg); }
  50% { transform: scaleY(1.1) scaleX(0.9) rotate(5deg); }
  75% { transform: scaleY(0.95) scaleX(1.05) rotate(-3deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Ending Screen */
.ending-screen {
  background: radial-gradient(ellipse at center, #4A2C5A 0%, #2D1B3D 50%, #1a0a1f 100%);
}

/* Footer */
.game-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.5rem;
}

.game-footer a {
  color: var(--pink-light);
  text-decoration: none;
}

.game-footer a:hover {
  color: var(--pink-primary);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .game-title {
    font-size: 1.5rem;
  }
  
  .pixel-button {
    font-size: 0.6rem;
    padding: 0.75rem 1.5rem;
  }
  
  .dialogue-text {
    font-size: 1rem;
  }
  
  .affection-panel {
    font-size: 0.5rem;
  }
  
  .slime-select-card {
    padding: 0.5rem;
  }
  
  .slime-select-card img {
    width: 48px;
    height: 48px;
  }
}

/* Scanline effect for extra retro vibes */
.app-container::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  z-index: 1000;
}