@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Courier+Prime:wght@400;700&display=swap');

:root {
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --purple-900: #581c87;
  --purple-800: #6b21a8;
  --purple-700: #7c3aed;
  --retro-pink: #ff006e;
  --retro-green: #8ac926;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Courier Prime', monospace;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0f0f23, #1a1a2e, #16213e, #0f3460);
  background-size: 400% 400%;
  animation: gradient-shift 8s ease-in-out infinite;
  min-height: 100vh;
  color: #67e8f9;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.font-orbitron {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  letter-spacing: 2px;
}

.font-mono {
  font-family: 'Courier Prime', monospace;
}

.pixel-glow {
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    2px 2px 0px rgba(0,0,0,0.8);
  filter: drop-shadow(0 0 8px currentColor);
}

.pixel-border {
  border-style: solid;
  border-image: linear-gradient(45deg, #00ffff, #ffd700, #ff006e, #00ffff) 2;
  position: relative;
}

.pixel-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00ffff, #ffd700, #ff006e, #00ffff);
  border-radius: inherit;
  z-index: -1;
  opacity: 0.3;
}

.pixel-card {
  background: linear-gradient(135deg, 
    rgba(15, 15, 35, 0.95), 
    rgba(26, 26, 46, 0.95), 
    rgba(22, 33, 62, 0.95)
  );
  border: 3px solid #00ffff;
  border-radius: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 
    0 0 20px rgba(0, 255, 255, 0.3),
    inset 0 0 20px rgba(255, 215, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.pixel-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, rgba(0, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255, 215, 0, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 0, 110, 0.2), transparent);
  background-repeat: repeat;
  background-size: 100px 100px;
  pointer-events: none;
  z-index: 0;
  animation: pixel-stars 10s linear infinite;
}

@keyframes pixel-stars {
  0% { background-position: 0px 0px, 0px 0px, 0px 0px; }
  100% { background-position: 100px 100px, -100px 100px, 50px -100px; }
}

.pixel-card > * {
  position: relative;
  z-index: 2;
}

.pixel-card-mini {
  background: linear-gradient(135deg, 
    rgba(107, 33, 168, 0.8), 
    rgba(30, 27, 75, 0.8)
  );
  border: 2px solid #067d8f;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pixel-card-mini:hover {
  border-color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
  transform: scale(1.05) translateZ(0);
}

.pixel-art {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: contrast(1.1) saturate(1.2);
}

/* Retro button effects */
button {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.3),
    0 0 15px rgba(0, 255, 255, 0.4);
}

button:not(:disabled):active {
  transform: translateY(0px);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    0 0 10px rgba(0, 255, 255, 0.3);
}

/* Pixel perfect scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #0f0f23, #1a1a2e);
  border: 1px solid #00ffff;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00ffff, #ffd700);
  border-radius: 6px;
  border: 1px solid #067d8f;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffd700, #ff006e);
}

/* Enhanced focus styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(0, 255, 255, 0.5),
    0 0 15px rgba(255, 215, 0, 0.4);
  border-color: #ffd700;
}

/* Retro color utilities */
.text-gold-400 { color: var(--gold-400); }
.text-gold-500 { color: var(--gold-500); }
.text-gold-600 { color: var(--gold-600); }
.text-cyan-300 { color: var(--cyan-300); }
.text-cyan-400 { color: var(--cyan-400); }
.text-cyan-500 { color: var(--cyan-500); }
.text-cyan-600 { color: var(--cyan-600); }

.bg-gold-400 { background-color: var(--gold-400); }
.bg-gold-500 { background-color: var(--gold-500); }
.bg-gold-600 { background-color: var(--gold-600); }
.bg-cyan-600 { background-color: var(--cyan-600); }
.bg-cyan-700 { background-color: var(--cyan-600); }

.border-gold-500 { border-color: var(--gold-500); }
.border-cyan-500 { border-color: var(--cyan-500); }
.border-cyan-600 { border-color: var(--cyan-600); }

/* Responsive pixel grid */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .pixel-card {
    padding: 1rem;
    border-width: 2px;
  }

  .font-orbitron {
    letter-spacing: 1px;
  }

  .grid-cols-8 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-cols-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-cols-8 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-cols-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  h1 {
    font-size: 2rem !important;
  }
}

/* Retro loading animation */
@keyframes retro-spin {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(1); }
  75% { transform: rotate(270deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

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

/* Modal animations with pixel effects */
@keyframes pixel-appear {
  0% { 
    opacity: 0; 
    transform: scale(0.8) rotate(-2deg);
    filter: blur(2px);
  }
  100% { 
    opacity: 1; 
    transform: scale(1) rotate(0deg);
    filter: blur(0px);
  }
}

.pixel-modal {
  animation: pixel-appear 0.4s ease-out;
}

/* Favorite star animation */
@keyframes star-pulse {
  0%, 100% { 
    transform: scale(1) rotate(0deg); 
    filter: drop-shadow(0 0 5px currentColor);
  }
  50% { 
    transform: scale(1.3) rotate(180deg); 
    filter: drop-shadow(0 0 10px currentColor);
  }
}

.star-favorite {
  animation: star-pulse 1s ease-in-out;
}

/* Enhanced hover effects for cards */
.card-hover-effect {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}

.card-hover-effect:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(0, 255, 255, 0.6),
    inset 0 0 20px rgba(255, 215, 0, 0.2);
}

.card-hover-effect::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, #00ffff, #ffd700, #ff006e, #00ffff);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-hover-effect:hover::before {
  opacity: 1;
  animation: border-pulse 2s ease-in-out infinite;
}

@keyframes border-pulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Glitch effect for special elements */
@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-1px, 1px); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(1px, 1px); }
  80% { transform: translate(1px, -1px); }
}

.glitch-effect:hover {
  animation: glitch 0.3s ease-in-out;
}

/* Retro progress bar */
.pixel-progress {
  background: linear-gradient(90deg, #00ffff, #ffd700);
  height: 8px;
  border: 2px solid #067d8f;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.pixel-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.3) 2px,
    rgba(255,255,255,0.3) 4px
  );
  animation: progress-scan 1s linear infinite;
}

@keyframes progress-scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}