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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0f0f1a;
  color: #e0e0e0;
  padding: 2rem;
  overflow: hidden;
}

/* subtle animated gradient bg */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(90, 40, 180, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(40, 120, 180, 0.12) 0%, transparent 50%);
  z-index: -1;
  animation: drift 20s ease-in-out infinite alternate;
}

@keyframes drift {
  0% { transform: scale(1) translateX(0); }
  100% { transform: scale(1.1) translateX(-30px); }
}

.container {
  max-width: 620px;
  width: 100%;
  text-align: center;
}

.heading {
  font-family: 'Courier New', 'Fira Code', monospace;
  font-size: 1.1rem;
  color: #7c7cff;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.heading span.prompt {
  color: #50fa7b;
}

.subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 2.5rem;
  font-family: 'Courier New', 'Fira Code', monospace;
}

.lang-toggle {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.lang-btn:hover {
  border-color: #555;
  color: #ccc;
}

.lang-btn.active {
  border-color: #7c7cff;
  color: #7c7cff;
  background: rgba(124, 124, 255, 0.08);
}

.joke-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: opacity 0.3s, transform 0.3s;
}

.joke-card.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

.joke-setup {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  color: #d0d0d0;
}

.joke-punchline {
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffcc57;
  line-height: 1.5;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s;
}

.joke-punchline.hidden {
  opacity: 0;
  pointer-events: none;
}

.joke-punchline-hint {
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.5rem;
  transition: opacity 0.3s;
}

.joke-punchline-hint.hidden {
  opacity: 0;
}

.next-btn {
  background: linear-gradient(135deg, #7c7cff 0%, #5a5aee 100%);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 124, 255, 0.3);
}

.next-btn:active {
  transform: translateY(0);
}

.counter {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: #444;
  font-family: 'Courier New', monospace;
}

@media (max-width: 500px) {
  .joke-setup { font-size: 1.05rem; }
  .joke-punchline { font-size: 1.15rem; }
  .joke-card { padding: 1.8rem 1.2rem; }
}
