:root {
  --bg-dark: #0a0a0f;
  --bg-darker: #050508;
  --neon-green: #00ff88;
  --electric-blue: #00d4ff;
  --hot-pink: #ff0080;
  --gold: #ffd700;
  --purple: #8b5cf6;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  min-height: 100vh;
  position: relative;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(0, 212, 255, 0.1) 0%, transparent 40%),
    var(--bg-dark);
}

.app-container.ultra-mode {
  animation: ultraPulse 0.5s ease-in-out infinite alternate;
}

@keyframes ultraPulse {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(30deg); }
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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;
  opacity: 0.3;
}

.money-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.money-particle {
  position: absolute;
  top: -50px;
  font-size: 2rem;
  animation: fall linear forwards;
  opacity: 0.8;
}

@keyframes fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

.floating-texts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.floating-phrase {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--neon-green);
  text-shadow: 0 0 20px var(--neon-green);
  animation: floatUp 3s ease-out forwards;
  opacity: 0;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-100px) scale(1.2); }
}

.achievements-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--gold);
  animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 2.5s forwards;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100px); }
}

.audit-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.audit-modal {
  background: linear-gradient(180deg, #1a0a0a, #0a0a0f);
  border: 2px solid var(--hot-pink);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  animation: shake 0.5s ease-in-out;
  box-shadow: 0 0 60px rgba(255, 0, 128, 0.4);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.audit-header {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--hot-pink);
  margin-bottom: 20px;
  animation: blink 0.5s ease-in-out infinite;
}

@keyframes blink {
  50% { opacity: 0.5; }
}

.audit-modal p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.audit-small {
  font-size: 0.875rem;
  opacity: 0.7;
}

.audit-dismiss {
  margin-top: 20px;
  padding: 12px 30px;
  background: var(--hot-pink);
  border: none;
  border-radius: 10px;
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audit-dismiss:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 0, 128, 0.5);
}

.header {
  text-align: center;
  padding: 40px 20px 20px;
  position: relative;
  z-index: 20;
}

.main-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--neon-green), var(--electric-blue), var(--hot-pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
  text-shadow: none;
  position: relative;
}

.glitch-active {
  animation: glitchEffect 0.1s ease-in-out;
}

@keyframes glitchEffect {
  0% { transform: translate(0); filter: hue-rotate(0deg); }
  25% { transform: translate(-2px, 2px); filter: hue-rotate(90deg); }
  50% { transform: translate(2px, -2px); filter: hue-rotate(180deg); }
  75% { transform: translate(-2px, -2px); filter: hue-rotate(270deg); }
  100% { transform: translate(0); filter: hue-rotate(360deg); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.subtitle {
  font-family: 'JetBrains Mono', monospace;
  color: var(--purple);
  font-size: 1rem;
  margin-top: 8px;
  opacity: 0.8;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: all 0.3s ease;
}

.status-dot.active {
  background: var(--neon-green);
  box-shadow: 0 0 20px var(--neon-green);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 20;
}

.counter-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.counter-section:hover {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 0 40px rgba(0, 255, 136, 0.1);
}

.money-display {
  margin-bottom: 30px;
}

.money-display.counting .money-value {
  animation: countGlow 0.1s ease-in-out infinite alternate;
}

@keyframes countGlow {
  from { text-shadow: 0 0 30px var(--neon-green); }
  to { text-shadow: 0 0 60px var(--neon-green), 0 0 100px var(--neon-green); }
}

.currency-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.money-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  color: var(--neon-green);
  text-shadow: 0 0 30px var(--neon-green);
  display: block;
  word-break: break-all;
}

.alt-currencies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.alt-currency {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 15px 10px;
}

.alt-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--electric-blue);
  margin-bottom: 5px;
}

.alt-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.75rem, 2vw, 1rem);
  font-weight: 700;
  color: var(--text-primary);
}

.high-score {
  font-size: 0.875rem;
  color: var(--gold);
  opacity: 0.8;
}

.control-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 30px 20px;
  margin-bottom: 30px;
}

.glitch-button {
  width: 100%;
  padding: 20px 40px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #ff0040, #ff0080);
  border: none;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 30px;
}

.glitch-button:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px rgba(255, 0, 128, 0.5);
}

.glitch-button.active {
  background: linear-gradient(135deg, #00cc66, #00ff88);
  animation: activeButton 0.5s ease-in-out infinite alternate;
}

@keyframes activeButton {
  from { box-shadow: 0 0 30px rgba(0, 255, 136, 0.5); }
  to { box-shadow: 0 0 60px rgba(0, 255, 136, 0.8); }
}

.button-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glitch-button:hover .button-glow {
  opacity: 1;
}

.button-text {
  position: relative;
  z-index: 1;
}

.slider-container {
  margin-bottom: 30px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.intensity-value {
  color: var(--electric-blue);
  font-weight: 700;
}

.intensity-slider {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.intensity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: var(--electric-blue);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 20px var(--electric-blue);
  transition: all 0.2s ease;
}

.intensity-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.toggle-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.toggle-switch {
  width: 50px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.toggle-switch.active {
  background: var(--neon-green);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch.active .toggle-knob {
  left: 25px;
}

.stats-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 30px 20px;
}

.stats-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--purple);
  text-align: center;
  margin-bottom: 25px;
  letter-spacing: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.stat-item {
  text-align: center;
  padding: 20px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
}

.stat-value {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--neon-green);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.retirement-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retirement-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--hot-pink));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.retirement-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--hot-pink);
  text-align: right;
}

.footer {
  text-align: center;
  padding: 40px 20px;
  position: relative;
  z-index: 20;
}

.disclaimer {
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.6;
  max-width: 500px;
  margin: 0 auto 15px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  font-size: 0.875rem;
}

.footer-links a {
  color: var(--electric-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green);
}

.footer-divider {
  color: var(--text-secondary);
  opacity: 0.3;
}

@media (max-width: 600px) {
  .header {
    padding: 30px 15px 15px;
  }
  
  .main-content {
    padding: 15px;
  }
  
  .counter-section,
  .control-panel,
  .stats-panel {
    padding: 25px 15px;
  }
  
  .alt-currencies {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .alt-currency {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
  }
  
  .alt-label {
    margin-bottom: 0;
  }
  
  .toggles-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .achievements-container {
    left: 20px;
    right: 20px;
    top: 10px;
  }
  
  .achievement {
    font-size: 0.875rem;
    padding: 10px 15px;
  }
}