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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: linear-gradient(135deg, #0a0015 0%, #1a0a2e 30%, #16082a 70%, #0d0618 100%);
  min-height: 100vh;
  color: #e0d6f2;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255, 0, 128, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 200, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(180deg, rgba(120, 0, 255, 0.2) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}

.title {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ff00ff, #00ffff, #ff6b6b);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
  text-shadow: 0 0 40px rgba(255, 0, 255, 0.3);
}

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

.tagline {
  font-size: 1.1rem;
  color: #a78bfa;
  margin-top: 0.5rem;
}

.pulse-emoji-inline, .pulse-emoji {
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

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

.main-content {
  display: flex;
  flex: 1;
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.visualization-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.depth-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.depth-label {
  font-size: 0.9rem;
  color: #a78bfa;
  letter-spacing: 0.1em;
}

.depth-value {
  font-size: 3rem;
  font-weight: 700;
  color: #ff00ff;
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.max-depth {
  font-size: 0.8rem;
  color: #6b7280;
}

.visualization-container {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
}

.visualization-container:active {
  cursor: grabbing;
}

.windows-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
}

.nested-window {
  position: absolute;
  width: 85%;
  height: 85%;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.nested-window.innermost {
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 0, 255, 0.3); }
  50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 40px rgba(255, 0, 255, 0.5); }
}

.window-chrome {
  height: 28px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-buttons {
  display: flex;
  gap: 6px;
}

.window-buttons span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28ca41; }

.window-title {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.5);
}

.window-content {
  width: 100%;
  height: calc(100% - 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.innermost-content {
  text-align: center;
}

.innermost-content .pulse-emoji {
  font-size: 3rem;
}

.controls {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 1rem 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-deeper {
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-deeper:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.btn-wake {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: white;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.btn-wake:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(6, 182, 212, 0.6);
}

.btn-sound {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 50px;
  padding: 1rem;
}

.btn-sound.active {
  background: rgba(255, 0, 255, 0.3);
}

.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.quote-container {
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid #d946ef;
  max-width: 400px;
  text-align: center;
}

.quote {
  font-size: 0.9rem;
  font-style: italic;
  color: #c4b5fd;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
}

.stats-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.stat-label {
  color: #a78bfa;
}

.stat-value {
  color: #f0abfc;
  font-weight: 500;
}

.shimmer {
  background: linear-gradient(90deg, #f0abfc, #c084fc, #f0abfc);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.live-counter .stat-value {
  animation: countPulse 1s ease-in-out infinite;
}

@keyframes countPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.achievements-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.achievement.unlocked {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.achievement.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.achievement-emoji {
  font-size: 1.5rem;
}

.achievement-info {
  display: flex;
  flex-direction: column;
}

.achievement-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.achievement-desc {
  font-size: 0.7rem;
  color: #9ca3af;
}

.timeline-section {
  padding: 2rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-title {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #a78bfa;
  font-size: 1.1rem;
}

.timeline-container {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
}

.timeline-track {
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
  transition: all 0.5s ease;
  flex: 1;
  min-width: 100px;
}

.timeline-step.active .step-emoji {
  transform: scale(1.3);
  filter: drop-shadow(0 0 10px rgba(255, 0, 255, 0.5));
}

.timeline-step.active .step-text {
  color: #f0abfc;
}

.step-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step-text {
  font-size: 0.75rem;
  color: #6b7280;
  max-width: 120px;
  transition: color 0.3s ease;
}

.easter-egg-section {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vibe-label {
  display: block;
  margin-bottom: 0.75rem;
  color: #a78bfa;
  font-size: 0.9rem;
}

.vibe-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  color: white;
  width: 100%;
  max-width: 400px;
  transition: all 0.3s ease;
}

.vibe-input:focus {
  outline: none;
  border-color: #d946ef;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
}

.vibe-input::placeholder {
  color: #6b7280;
}

.generated-idea {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 0, 255, 0.1);
  border-radius: 8px;
  font-size: 0.85rem;
  color: #f0abfc;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.3);
}

.app-footer a {
  color: #d946ef;
  text-decoration: none;
}

.app-footer a:hover {
  text-decoration: underline;
}

.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1000;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -20px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.drag-hint {
  text-align: center;
}

@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
    padding: 1rem;
  }
  
  .sidebar {
    width: 100%;
    order: 2;
  }
  
  .visualization-section {
    order: 1;
  }
  
  .visualization-container {
    max-width: 350px;
  }
  
  .timeline-container {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
  }
  
  .timeline-step {
    min-width: 80px;
  }
  
  .step-text {
    font-size: 0.65rem;
    max-width: 80px;
  }
  
  .controls {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
  }
  
  .btn-sound {
    width: 60px;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.3rem;
  }
  
  .tagline {
    font-size: 0.9rem;
  }
  
  .depth-value {
    font-size: 2rem;
  }
  
  .visualization-container {
    max-width: 280px;
  }
  
  .step-emoji {
    font-size: 1.5rem;
  }
}