:root {
  --bg-deep: #0d0415;
  --bg-purple: #1a0a2e;
  --pink-hot: #ff006e;
  --cyan-electric: #00f5d4;
  --berry-red: #ff4757;
  --purple-glow: #9d4edd;
  --yellow-accent: #ffe66d;
}

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

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

.app-container {
  position: relative;
  min-height: 100vh;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 0, 110, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-purple) 50%, var(--bg-deep) 100%);
}

.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 3px
  );
  z-index: 1000;
  opacity: 0.3;
}

/* Header */
.header {
  padding: 3rem 1rem;
  text-align: center;
  position: relative;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
}

.berry-container {
  font-size: 4rem;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
  user-select: none;
}

.berry-container:hover {
  transform: scale(1.2);
}

.berry-container.spinning {
  animation: spin 0.5s ease-out;
}

.berry-container.rainbow {
  animation: rainbow-pulse 1s infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes rainbow-pulse {
  0%, 100% { filter: hue-rotate(0deg) drop-shadow(0 0 20px var(--pink-hot)); }
  50% { filter: hue-rotate(180deg) drop-shadow(0 0 30px var(--cyan-electric)); }
}

.main-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1.2rem, 4vw, 2rem);
  margin: 1.5rem 0;
  background: linear-gradient(90deg, var(--pink-hot), var(--cyan-electric), var(--pink-hot));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.glitch-text {
  position: relative;
}

.subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
}

/* Main Content */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  color: var(--cyan-electric);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px var(--cyan-electric);
}

.section-desc {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* Roulette Section */
.roulette-section {
  padding: 3rem 0;
  text-align: center;
}

.idea-card-container {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.idea-card {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.2) 0%, rgba(255, 0, 110, 0.1) 100%);
  border: 2px solid var(--purple-glow);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 
    0 0 30px rgba(157, 78, 221, 0.3),
    inset 0 0 30px rgba(157, 78, 221, 0.1);
  transition: all 0.3s ease;
}

.idea-card.new {
  animation: card-pop 0.5s ease;
  border-color: var(--cyan-electric);
  box-shadow: 
    0 0 40px rgba(0, 245, 212, 0.5),
    inset 0 0 30px rgba(0, 245, 212, 0.1);
}

@keyframes card-pop {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.idea-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.idea-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  color: var(--pink-hot);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.idea-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.5;
}

.fav-button {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--bg-purple);
  border: 2px solid var(--purple-glow);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: var(--yellow-accent);
  cursor: pointer;
  transition: all 0.3s ease;
}

.fav-button:hover, .fav-button.active {
  background: var(--pink-hot);
  border-color: var(--pink-hot);
  transform: scale(1.1);
}

.arcade-button {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(180deg, var(--pink-hot) 0%, #cc0058 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  position: relative;
  box-shadow: 
    0 6px 0 #990042,
    0 8px 20px rgba(255, 0, 110, 0.4);
  transition: all 0.1s ease;
  text-transform: uppercase;
}

.arcade-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 0 #990042,
    0 10px 30px rgba(255, 0, 110, 0.5);
}

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

.arcade-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Comparison Section */
.comparison-section {
  padding: 3rem 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.comparison-card {
  display: flex;
  align-items: stretch;
  background: rgba(26, 10, 46, 0.8);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(157, 78, 221, 0.3);
}

.old-side, .fresh-side {
  flex: 1;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.old-side {
  background: rgba(0, 0, 0, 0.3);
}

.fresh-side {
  background: linear-gradient(135deg, rgba(255, 0, 110, 0.2) 0%, rgba(0, 245, 212, 0.1) 100%);
}

.side-label {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  letter-spacing: 1px;
}

.old-side .side-label {
  color: rgba(255, 255, 255, 0.4);
}

.fresh-side .side-label {
  color: var(--cyan-electric);
}

.side-text {
  font-size: 0.95rem;
  font-weight: 500;
}

.old-side .side-text {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: line-through;
}

.fresh-side .side-text {
  color: white;
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--purple-glow);
  background: rgba(157, 78, 221, 0.1);
}

/* Demo Section */
.demo-section {
  padding: 3rem 0;
  text-align: center;
}

.terminal {
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto 2rem;
  border: 1px solid rgba(0, 245, 212, 0.3);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.1);
}

.terminal-header {
  background: #1a1a1a;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'JetBrains Mono', monospace;
}

.terminal-content {
  padding: 1.5rem;
  text-align: left;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  min-height: 200px;
  color: var(--cyan-electric);
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.typewriter {
  color: var(--cyan-electric);
}

.generate-button {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--cyan-electric) 0%, var(--purple-glow) 100%);
  border: none;
  border-radius: 50px;
  color: var(--bg-deep);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
}

.generate-button:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.5);
}

.generate-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Community Section */
.community-section {
  padding: 3rem 0;
  overflow: hidden;
}

.ticker-container {
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--purple-glow);
  border-bottom: 1px solid var(--purple-glow);
  padding: 1rem 0;
  overflow: hidden;
}

.ticker-content {
  display: flex;
  white-space: nowrap;
}

.ticker-item {
  display: inline-block;
  padding: 0 2rem;
  color: var(--yellow-accent);
  font-size: 0.9rem;
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  padding: 4rem 0;
  text-align: center;
}

.cta-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 2rem;
  color: white;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  padding: 1.5rem 3rem;
  background: linear-gradient(135deg, var(--berry-red) 0%, var(--pink-hot) 100%);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  box-shadow: 
    0 0 40px rgba(255, 71, 87, 0.4),
    0 0 80px rgba(255, 71, 87, 0.2);
  transition: all 0.3s ease;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 71, 87, 0.4), 0 0 80px rgba(255, 71, 87, 0.2); }
  50% { box-shadow: 0 0 60px rgba(255, 71, 87, 0.6), 0 0 100px rgba(255, 71, 87, 0.3); }
}

.cta-button:hover {
  transform: scale(1.05);
}

.meta-joke {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  font-style: italic;
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(157, 78, 221, 0.3);
  padding: 2rem 1rem;
  text-align: center;
}

.footer-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--pink-hot);
  margin-bottom: 1rem;
  animation: pulse-glow 3s infinite;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-link {
  color: var(--cyan-electric);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--pink-hot);
}

.footer-sep {
  color: rgba(255, 255, 255, 0.3);
}

.sonic-shoutout {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* Modal */
.modal-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: 2000;
  padding: 1rem;
}

.modal-content {
  background: linear-gradient(135deg, var(--bg-purple) 0%, var(--bg-deep) 100%);
  border: 2px solid var(--pink-hot);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(255, 0, 110, 0.5);
}

.easter-egg h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: var(--pink-hot);
  margin-bottom: 1rem;
}

.easter-egg p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.berry-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.falling-berry {
  position: absolute;
  top: -30px;
  font-size: 1.5rem;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(500px) rotate(360deg);
  }
}

.close-modal {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.8rem;
  padding: 0.75rem 2rem;
  background: var(--cyan-electric);
  border: none;
  border-radius: 8px;
  color: var(--bg-deep);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.close-modal:hover {
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 2rem 1rem;
  }
  
  .berry-container {
    font-size: 3rem;
  }
  
  .comparison-card {
    flex-direction: column;
  }
  
  .vs-divider {
    padding: 0.5rem;
  }
  
  .arcade-button {
    padding: 1rem 1.5rem;
    font-size: 0.7rem;
  }
  
  .cta-button {
    padding: 1rem 2rem;
    font-size: 0.8rem;
  }
}

/* Flicker animation for extra chaos */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  95% { opacity: 0.9; }
  96% { opacity: 1; }
}

.app-container {
  animation: flicker 8s infinite;
}