/* ============================================================
   variants/05-pixel-tech-2/css/components.css
   Arcade Cabinet UI: pixel art buttons, game UI elements,
   high score displays, screen glow, coin slot effects
   ============================================================ */

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: var(--space-md) var(--space-xl);
  min-height: var(--touch-target);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* Arcade cabinet button - no rounded corners */
.btn,
.btn::before,
.btn::after {
  border-radius: 0;
}

/* Primary button - neon green with arcade glow */
.btn-primary {
  background: var(--color-neon-green);
  color: var(--color-black);
  border-color: var(--color-neon-green);
  box-shadow:
    0 0 15px rgb(0, 255, 65, 0.4),
    inset 0 0 20px rgb(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: var(--color-neon-green);
  box-shadow:
    0 0 30px rgb(0, 255, 65, 0.6),
    0 0 60px rgb(0, 255, 65, 0.3),
    inset 0 0 20px rgb(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Pressed state - inset like arcade button */
.btn-primary:active {
  transform: translateY(1px);
  box-shadow:
    0 0 10px rgb(0, 255, 65, 0.3),
    inset 0 2px 4px rgb(0, 0, 0, 0.3);
}

/* Secondary button - outline with purple accent */
.btn-secondary {
  background: transparent;
  color: var(--color-neon-green);
  border-color: var(--color-neon-green);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(0, 255, 65, 0.1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-secondary:hover {
  background: rgb(0, 255, 65, 0.1);
  box-shadow:
    0 0 20px rgb(0, 255, 65, 0.2),
    inset 0 0 15px rgb(0, 255, 65, 0.05);
  transform: translateY(-2px);
}

.btn-secondary:hover::before {
  opacity: 1;
}

.btn-secondary:active {
  transform: translateY(1px);
  background: rgb(0, 255, 65, 0.15);
}

/* Small button */
.btn-small {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  min-height: 36px;
}

/* Large button */
.btn-large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: 1rem;
  min-height: 56px;
  letter-spacing: 0.2em;
}

/* Button press animation */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  height: 2px;
  background: rgb(255, 255, 255, 0.3);
}

/* ─── Arcade Cabinet Display ─── */
.arcade-display {
  font-family: var(--font-headline);
  font-size: 3rem;
  color: var(--color-neon-green);
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-black);
  border: 3px solid var(--color-neon-green);
  position: relative;
  text-shadow: 0 0 20px rgb(0, 255, 65, 0.8);
  animation: display-glow 1.5s ease-in-out infinite alternate;
}

@keyframes display-glow {
  from {
    box-shadow:
      0 0 10px rgb(0, 255, 65, 0.3),
      inset 0 0 20px rgb(0, 255, 65, 0.1);
  }

  to {
    box-shadow:
      0 0 30px rgb(0, 255, 65, 0.5),
      inset 0 0 40px rgb(0, 255, 65, 0.15);
  }
}

/* Score counter animation */
.score-counter {
  display: inline-block;
  font-family: var(--font-headline);
  color: var(--color-neon-green);
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgb(0, 255, 65, 0.6);
}

/* ─── Pixel Loading Animation ─── */
.pixel-loader {
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: var(--space-lg) auto;
}

.pixel-loader span {
  background: var(--color-neon-green);
  animation: pixel-pulse 0.8s infinite;
}

.pixel-loader span:nth-child(1) {
  animation-delay: 0s;
}

.pixel-loader span:nth-child(2) {
  animation-delay: 0.08s;
}

.pixel-loader span:nth-child(3) {
  animation-delay: 0.16s;
}

.pixel-loader span:nth-child(4) {
  animation-delay: 0.08s;
}

.pixel-loader span:nth-child(5) {
  animation-delay: 0.16s;
}

.pixel-loader span:nth-child(6) {
  animation-delay: 0.24s;
}

.pixel-loader span:nth-child(7) {
  animation-delay: 0.16s;
}

.pixel-loader span:nth-child(8) {
  animation-delay: 0.24s;
}

.pixel-loader span:nth-child(9) {
  animation-delay: 0.32s;
}

@keyframes pixel-pulse {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.7);
  }

  50% {
    opacity: 1;
    transform: scale(1);
    background: var(--color-neon-green);
    box-shadow: 0 0 8px var(--color-neon-green);
  }
}

/* ─── Joystick Motif ─── */
.joystick-btn {
  position: relative;
  width: 60px;
  height: 60px;
  background: var(--color-dark-gray);
  border: 2px solid var(--color-neon-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.joystick-btn::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--color-neon-green);
  border-radius: 50%;
  transition: all var(--transition-fast);
  box-shadow: 0 0 10px var(--color-neon-green);
}

.joystick-btn:hover::before {
  transform: scale(1.2);
  box-shadow: 0 0 20px var(--color-neon-green);
}

/* ─── High Score Label ─── */
.high-score {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--color-electric-purple);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-electric-purple);
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.high-score::before {
  content: '★ ';
}

.high-score::after {
  content: ' ★';
}

/* ─── Coin Slot Indicator ─── */
.coin-slot {
  position: relative;
  padding-left: var(--space-xl);
}

.coin-slot::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 24px;
  border: 2px solid var(--color-neon-green);
  border-radius: 2px;
  background: var(--color-black);
}

.coin-slot::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--color-neon-green);
  border-radius: 50%;
  animation: coin-insert 2s ease-in-out infinite;
}

@keyframes coin-insert {
  0%,
  100% {
    top: 50%;
    opacity: 1;
  }

  50% {
    top: 30%;
    opacity: 0.5;
  }
}

/* ─── Screen Glow Effect ─── */
.screen-glow {
  position: relative;
}

.screen-glow::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(45deg, var(--color-neon-green), var(--color-electric-purple));
  z-index: -1;
  filter: blur(10px);
  opacity: 0.4;
}

/* ─── Hover Lift Effect ─── */
.hover-lift {
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 30px rgb(0, 0, 0, 0.5),
    0 0 20px rgb(0, 255, 65, 0.1);
}

/* ─── Pitch Bullets ─── */
.pitch-bullets {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.pitch-bullets li {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--color-silver);
  padding: var(--space-md) 0 var(--space-md) var(--space-2xl);
  position: relative;
  border-bottom: 1px solid var(--color-dark-gray);
}

/* Checkbox style with arcade flair */
.pitch-bullets li::before {
  content: '□';
  position: absolute;
  left: 0;
  color: var(--color-neon-green);
  font-family: var(--font-ui);
  font-size: 1.2rem;
}

.pitch-bullets li:nth-child(odd)::before {
  content: '■';
  color: var(--color-neon-green);
  text-shadow: 0 0 8px var(--color-neon-green);
}

/* ─── Features More Link ─── */
.features-more {
  text-align: center;
  margin-top: var(--space-2xl);
}

.features-more a {
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--color-neon-green);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--color-neon-green);
  display: inline-block;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.features-more a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgb(0, 255, 65, 0.3), transparent);
  transition: left var(--transition-base);
}

.features-more a:hover {
  background: var(--color-neon-green);
  color: var(--color-black);
  box-shadow: 0 0 20px rgb(0, 255, 65, 0.4);
}

.features-more a:hover::before {
  left: 100%;
}

/* ─── Pixel Reveal Animation ─── */
.pixel-reveal {
  animation: pixel-reveal 0.5s ease-out forwards;
}

@keyframes pixel-reveal {
  0% {
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    opacity: 0;
  }

  50% {
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
    opacity: 0.5;
  }

  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
}

/* ─── Link Arrow ─── */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-ui);
  color: var(--color-neon-green);
  transition: all var(--transition-fast);
}

.link-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.link-arrow:hover {
  color: var(--color-electric-purple);
  text-shadow: 0 0 8px var(--color-electric-purple);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ─── Animated Border ─── */
@keyframes border-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.animated-border {
  position: relative;
}

.animated-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    90deg,
    var(--color-neon-green),
    var(--color-electric-purple),
    var(--color-neon-green)
  );
  background-size: 200% 100%;
  z-index: -1;
  animation: border-flow 2s linear infinite;
}

/* ─── Glitch Text Effect ─── */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  color: var(--color-neon-green);
  animation: glitch-1 3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
  color: var(--color-electric-purple);
  animation: glitch-2 4s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0%,
  90% {
    transform: translate(0);
  }

  92% {
    transform: translate(-3px, 1px);
  }

  94% {
    transform: translate(3px, -1px);
  }

  96% {
    transform: translate(-2px, 2px);
  }

  98% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  85% {
    transform: translate(0);
  }

  87% {
    transform: translate(3px, 1px);
  }

  89% {
    transform: translate(-3px, -1px);
  }

  91% {
    transform: translate(2px, 2px);
  }

  93% {
    transform: translate(-2px, -2px);
  }
}

/* Disable animations when reduced motion */
@media (prefers-reduced-motion: reduce) {
  .glitch::before,
  .glitch::after {
    animation: none;
  }

  .arcade-glow,
  .blink,
  .scan {
    animation: none;
  }
}

/* ─── Icon Animations ─── */
.feature-icon svg,
.client-card-icon svg {
  transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon svg,
.client-card:hover .client-card-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px var(--color-neon-green));
}
