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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #13131a;
  --bg-card: #1a1a24;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --accent: #6366f1;
  --accent-hover: #818cf8;

  --mood-inspired: #f97316;
  --mood-inspired-bg: rgba(249, 115, 22, 0.1);
  --mood-laugh: #eab308;
  --mood-laugh-bg: rgba(234, 179, 8, 0.1);
  --mood-amazed: #06b6d4;
  --mood-amazed-bg: rgba(6, 182, 212, 0.1);
  --mood-weirded: #8b5cf6;
  --mood-weirded-bg: rgba(139, 92, 246, 0.1);
  --mood-confused: #ec4899;
  --mood-confused-bg: rgba(236, 72, 153, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

.view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Sound Toggle */
.sound-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #2a2a3a;
  background: var(--bg-secondary);
  cursor: pointer;
  font-size: 1.25rem;
  z-index: 100;
  transition: border-color 0.2s;
}

.sound-toggle:hover {
  border-color: var(--accent);
}

.mute-x {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #ef4444;
  pointer-events: none;
}

/* Logo */
.logo {
  font-size: 4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.logo span {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.countdown {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  margin-top: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.countdown #countdown-timer {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  color: var(--accent);
  font-weight: 500;
}

.tagline {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* Mood Selection */
.mood-container {
  max-width: 500px;
  width: 100%;
}

.mood-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mood-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.mood-btn:hover {
  transform: translateX(4px);
}

.mood-btn.selected {
  border-color: currentColor;
}

.mood-btn.inspired { color: var(--mood-inspired); }
.mood-btn.inspired.selected { background: var(--mood-inspired-bg); }

.mood-btn.laugh { color: var(--mood-laugh); }
.mood-btn.laugh.selected { background: var(--mood-laugh-bg); }

.mood-btn.amazed { color: var(--mood-amazed); }
.mood-btn.amazed.selected { background: var(--mood-amazed-bg); }

.mood-btn.weirded_out { color: var(--mood-weirded); }
.mood-btn.weirded_out.selected { background: var(--mood-weirded-bg); }

.mood-btn.confused { color: var(--mood-confused); }
.mood-btn.confused.selected { background: var(--mood-confused-bg); }

.mood-icon {
  font-size: 1.5rem;
}

.mood-label {
  font-weight: 500;
}

.surprise-btn {
  display: none;
}

.surprise-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.surprise-btn .mood-icon {
  font-size: 1.5rem;
}

.surprise-btn .mood-label {
  font-weight: 500;
}

.hecho-btn {
  width: 100%;
  padding: 2.5rem;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: white;
  font-size: 3rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: lowercase;
}

.hecho-btn:disabled {
  background: #2a2a3a;
  color: #5a5a6a;
  cursor: not-allowed;
}

.hecho-btn:not(:disabled):hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}

/* Slot Machine */
.slot-machine {
  perspective: 1000px;
}

.slot-window {
  width: 100%;
  max-width: 600px;
  height: 300px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
  border: 2px solid #2a2a3a;
  position: relative;
}

.slot-window::before,
.slot-window::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 10;
  pointer-events: none;
}

.slot-window::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-card), transparent);
}

.slot-window::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.slot-reel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.slot-item {
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slot-item h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.slot-item p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.slot-mood {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.slot-mood-icon {
  font-size: 4rem;
}

.slot-mood-name {
  font-size: 1.5rem;
  font-weight: 600;
}

.slot-mood.inspired { color: var(--mood-inspired); }
.slot-mood.laugh { color: var(--mood-laugh); }
.slot-mood.amazed { color: var(--mood-amazed); }
.slot-mood.weirded_out { color: var(--mood-weirded); }
.slot-mood.confused { color: var(--mood-confused); }

.slot-fact {
  transform-origin: center center;
}

/* Fact Display */
.fact-container {
  max-width: 600px;
  width: 100%;
}

.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.back-btn:hover {
  color: var(--text-primary);
}

.fact-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid #2a2a3a;
}

.fact-mood-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.fact-mood-badge.inspired { background: var(--mood-inspired); }
.fact-mood-badge.laugh { background: var(--mood-laugh); color: #000; }
.fact-mood-badge.amazed { background: var(--mood-amazed); }
.fact-mood-badge.weirded_out { background: var(--mood-weirded); }
.fact-mood-badge.confused { background: var(--mood-confused); }

.fact-headline {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.fact-explanation {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.fact-source {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
}

.fact-source:hover {
  text-decoration: underline;
}

.fact-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.share-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.875rem 1rem;
  border: 1px solid #3a3a4a;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.share-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.flag-btn {
  padding: 0.875rem 1rem;
  border: 1px solid #3a3a4a;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.flag-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.another-btn {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: transparent;
  color: var(--accent);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.another-btn:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* Surprise reveal badge */
.surprise-reveal {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
  .logo {
    font-size: 3rem;
  }

  .mood-btn {
    padding: 0.58rem 1.25rem;
  }

  .surprise-btn {
    padding: 0.58rem 1.25rem;
  }

  .hecho-btn {
    padding: 1.7rem;
  }

  .sound-toggle {
    display: none;
  }

  .hecho-btn {
    padding: 2rem;
    font-size: 2.5rem;
  }

  .fact-headline {
    font-size: 1.5rem;
  }

  .fact-explanation {
    font-size: 1rem;
  }

  .share-btn {
    min-width: 100%;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.view:not(.hidden) {
  animation: fadeIn 0.3s ease-out;
}

#fact-view:not(.hidden) {
  animation: none;
}

/* Focus styles for accessibility */
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
