/* Terminal theme variables */
:root {
  --terminal-green: #00ff41;
  --terminal-green-dim: #00cc33;
  --terminal-green-bright: #66ff66;
}

/* Scanline effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent 50%, rgba(0, 255, 65, 0.03) 50%),
    linear-gradient(90deg, transparent 50%, rgba(0, 255, 65, 0.03) 50%);
  background-size: 100% 4px, 4px 100%;
  pointer-events: none;
  z-index: 1000;
}

/* Cursor animation */
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.terminal-cursor::after {
  content: "_";
  animation: blink 1s infinite;
  color: var(--terminal-green-bright);
}

/* Typing animation */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.terminal-typing {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 2s steps(40, end);
}

/* Terminal glow effect */
.terminal-glow {
  text-shadow: 0 0 5px var(--terminal-green);
}

/* Clicker game styles */

/* Game color variables */
:root {
  --cookie-primary: var(--terminal-green-bright);
  --cookie-secondary: var(--terminal-green);
  --cookie-highlight: var(--terminal-green-dim);
  --gold-color: #ffd700;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
}

/* Clicker button styles */
.main-clicker {
  position: relative;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(210, 105, 30, 0.3),
    0 0 0 1px rgba(210, 105, 30, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.main-clicker:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 35px rgba(210, 105, 30, 0.4),
    0 0 0 1px rgba(210, 105, 30, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.main-clicker:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 5px 15px rgba(210, 105, 30, 0.3),
    0 0 0 1px rgba(210, 105, 30, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Pulse animation */
@keyframes cookiePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.main-clicker:focus {
  animation: cookiePulse 2s infinite;
  outline: none;
}

/* Click effects */
.click-effect {
  animation: clickFloat 1s ease-out forwards;
}

@keyframes clickFloat {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150px) scale(1.2);
  }
}

/* Stats panel */
.stats-panel {
  background: linear-gradient(
    135deg,
    rgba(31, 41, 55, 0.9),
    rgba(17, 24, 39, 0.9)
  );
  border: 1px solid rgba(75, 85, 99, 0.3);
  backdrop-filter: blur(10px);
}

.stat-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(75, 85, 99, 0.2);
  transition: all 0.2s ease;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-item:hover {
  background: rgba(75, 85, 99, 0.1);
  border-radius: 0.375rem;
  padding-left: 0.75rem;
}

/* Number animations */
@keyframes numberPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.number-update {
  animation: numberPop 0.3s ease;
}

/* Game controls */
.game-controls button {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.game-controls button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.game-controls button:hover::before {
  width: 100%;
  height: 100%;
}

.game-controls button:active {
  transform: scale(0.95);
}

/* Responsive design */
@media (max-width: 1024px) {
  .clicker-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .main-clicker {
    width: 200px;
    height: 200px;
  }

  .main-clicker svg {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 640px) {
  .main-clicker {
    width: 160px;
    height: 160px;
  }

  .main-clicker svg {
    width: 120px;
    height: 120px;
  }

  .stats-panel,
  .upgrades-shop,
  .achievements-panel {
    padding: 1rem;
  }
}

/* Loading spinner */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--gold-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* SVG hover effects */
.main-clicker svg circle {
  transition: all 0.2s ease;
}

.main-clicker:hover svg circle:first-child {
  fill: #e2761e;
}

/* Accessibility */
.main-clicker:focus {
  outline: 2px solid var(--gold-color);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .main-clicker {
    border: 2px solid #000;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .main-clicker,
  .click-effect {
    animation: none;
    transition: none;
  }

  .main-clicker:hover {
    transform: none;
  }
}

.terminal-glow-bright {
  text-shadow: 0 0 8px var(--terminal-green);
}

.terminal-glow-hover:hover {
  text-shadow: 0 0 10px var(--terminal-green-bright);
}

/* Terminal theme colors */
.text-terminal-green {
  color: var(--terminal-green);
}

.text-terminal-green-dim {
  color: var(--terminal-green-dim);
}

.text-terminal-green-bright {
  color: var(--terminal-green-bright);
}

.border-terminal-green {
  border-color: var(--terminal-green);
}

.bg-terminal-green-alpha {
  background-color: rgba(0, 255, 65, 0.05);
}

.bg-terminal-green-alpha-hover:hover {
  background-color: rgba(0, 255, 65, 0.1);
}
