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

:root {
  --bg:          #111111;
  --surface:     #1c1c1e;
  --surface2:    #2c2c2e;
  --accent:      #00cfff;
  --accent-dark: #0099cc;
  --text:        #f0f0f0;
  --text-muted:  #8e8e93;
  --radius:      14px;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 20px;
  text-align: center;
}

footer {
  padding: 24px 20px;
  text-align: center;
  font-size: 0.8rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: left;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

/* ── Penguin CSS art ─────────────────────────────────────────── */
.oracle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.penguin {
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.penguin:hover {
  transform: scale(1.05);
}

.penguin:active {
  transform: scale(0.95);
}

.penguin-body {
  position: relative;
  width: 140px;
  height: 180px;
  background: #1a1a2e;
  border-radius: 50% 50% 44% 44%;
}

.penguin-belly {
  width: 96px;
  height: 120px;
  background: #e8e8e8;
  border-radius: 50% 50% 44% 44%;
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Wings ───────────────────────────────────────────────────── */
.penguin-wing {
  width: 18px;
  height: 60px;
  background: #1a1a2e;
  position: absolute;
  top: 58px;
  transform-origin: top center;
}

.penguin-wing-left {
  left: -4px;
  border-radius: 50% 30% 50% 60%;
  transform: rotate(5deg);
}

.penguin-wing-right {
  right: -4px;
  border-radius: 30% 50% 60% 50%;
  transform: rotate(-5deg);
}

@keyframes flap-left {
  0%   { transform: rotate(5deg); }
  30%  { transform: rotate(25deg); }
  60%  { transform: rotate(5deg); }
  100% { transform: rotate(5deg); }
}

@keyframes flap-right {
  0%   { transform: rotate(-5deg); }
  30%  { transform: rotate(-25deg); }
  60%  { transform: rotate(-5deg); }
  100% { transform: rotate(-5deg); }
}

.penguin-eye {
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 38px;
}

.penguin-eye::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #111;
  border-radius: 50%;
  top: 5px;
  left: 5px;
}

/* ── Eyebrows ────────────────────────────────────────────────── */
.penguin-brow {
  width: 18px;
  height: 6px;
  background: transparent;
  border-top: 3px solid #444;
  border-radius: 50%;
  position: absolute;
  top: 30px;
  transition: transform 0.15s ease;
}

.penguin-brow-left {
  left: 37px;
}

.penguin-brow-right {
  right: 37px;
}

/* Yes: brows raise up */
.penguin.anim-yes .penguin-brow {
  animation: brow-happy 0.6s ease;
}

@keyframes brow-happy {
  0%   { transform: translateY(0); }
  20%  { transform: translateY(-4px); }
  50%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

/* No: brows furrow inward */
.penguin.anim-no .penguin-brow-left {
  animation: brow-furrow-left 0.6s ease;
}

.penguin.anim-no .penguin-brow-right {
  animation: brow-furrow-right 0.6s ease;
}

@keyframes brow-furrow-left {
  0%   { transform: rotate(0deg) translateY(0); }
  20%  { transform: rotate(12deg) translateY(2px); }
  70%  { transform: rotate(12deg) translateY(2px); }
  100% { transform: rotate(0deg) translateY(0); }
}

@keyframes brow-furrow-right {
  0%   { transform: rotate(0deg) translateY(0); }
  20%  { transform: rotate(-12deg) translateY(2px); }
  70%  { transform: rotate(-12deg) translateY(2px); }
  100% { transform: rotate(0deg) translateY(0); }
}

/* Neutral: one brow up, one down (skeptical) */
.penguin.anim-neutral .penguin-brow-left {
  animation: brow-skeptic-left 0.7s ease;
}

.penguin.anim-neutral .penguin-brow-right {
  animation: brow-skeptic-right 0.7s ease;
}

@keyframes brow-skeptic-left {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-5px); }
  50%  { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@keyframes brow-skeptic-right {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(1px); }
  50%  { transform: translateY(1px); }
  100% { transform: translateY(0); }
}

/* Eye squint animations */
.penguin.anim-no .penguin-eye {
  animation: eye-squint 0.6s ease;
}

@keyframes eye-squint {
  0%   { transform: scaleY(1); }
  20%  { transform: scaleY(0.65); }
  70%  { transform: scaleY(0.65); }
  100% { transform: scaleY(1); }
}

.penguin.anim-neutral .penguin-eye {
  animation: eye-skeptic 0.7s ease;
}

@keyframes eye-skeptic {
  0%   { transform: scaleY(1); }
  30%  { transform: scaleY(0.75); }
  50%  { transform: scaleY(0.75); }
  100% { transform: scaleY(1); }
}

.penguin-eye-left {
  left: 36px;
}

.penguin-eye-right {
  right: 36px;
}

.penguin-beak {
  width: 22px;
  height: 14px;
  background: #f4a623;
  border-radius: 0 0 50% 50%;
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
}

.penguin-foot {
  width: 32px;
  height: 12px;
  background: #f4a623;
  border-radius: 50%;
  position: absolute;
  bottom: -6px;
}

.penguin-foot-left {
  left: 24px;
}

.penguin-foot-right {
  right: 24px;
}

/* ── Salto animation ─────────────────────────────────────────── */
.penguin.salto .penguin-body {
  animation: salto 0.8s ease;
}

@keyframes salto {
  0%   { transform: translateY(0) rotate(0deg); }
  20%  { transform: translateY(-60px) rotate(0deg); }
  50%  { transform: translateY(-80px) rotate(180deg); }
  80%  { transform: translateY(-60px) rotate(360deg); }
  100% { transform: translateY(0) rotate(360deg); }
}

/* ── Yes animation: happy nod ─────────────────────────────────── */
.penguin.anim-yes .penguin-body {
  animation: nod 0.6s ease;
}

@keyframes nod {
  0%   { transform: translateY(0); }
  15%  { transform: translateY(-18px); }
  30%  { transform: translateY(0); }
  45%  { transform: translateY(-14px); }
  60%  { transform: translateY(0); }
  75%  { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* ── No animation: head shake ────────────────────────────────── */
.penguin.anim-no .penguin-body {
  animation: shake 0.6s ease;
}

@keyframes shake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(-10px); }
  30%  { transform: translateX(10px); }
  45%  { transform: translateX(-8px); }
  60%  { transform: translateX(8px); }
  75%  { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

/* ── Neutral animation: arms up + slight lift (idk) ──────────── */
.penguin.anim-neutral .penguin-body {
  animation: shrug 0.7s ease;
}

@keyframes shrug {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-6px); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* ── Wing flap: yes & no ──────────────────────────────────────── */
.penguin.anim-yes .penguin-wing-left,
.penguin.anim-no .penguin-wing-left {
  animation: flap-left 0.6s ease;
}

.penguin.anim-yes .penguin-wing-right,
.penguin.anim-no .penguin-wing-right {
  animation: flap-right 0.6s ease;
}

/* ── Wing raise: neutral (idk) ───────────────────────────────── */
.penguin.anim-neutral .penguin-wing-left {
  animation: raise-left 0.7s ease;
}

.penguin.anim-neutral .penguin-wing-right {
  animation: raise-right 0.7s ease;
}

@keyframes raise-left {
  0%   { transform: rotate(5deg); }
  30%  { transform: rotate(40deg); }
  50%  { transform: rotate(40deg); }
  100% { transform: rotate(5deg); }
}

@keyframes raise-right {
  0%   { transform: rotate(-5deg); }
  30%  { transform: rotate(-40deg); }
  50%  { transform: rotate(-40deg); }
  100% { transform: rotate(-5deg); }
}

/* ── Answer ──────────────────────────────────────────────────── */
.answer {
  font-size: 1.4rem;
  font-weight: 700;
  min-height: 2em;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.answer.visible {
  opacity: 1;
}

/* ── Input & button ──────────────────────────────────────────── */
.question-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
  margin-bottom: 12px;
}

.question-input::placeholder {
  color: var(--text-muted);
}

.question-input:focus {
  border-color: var(--accent);
}

.ask-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-bottom: 16px;
}

.ask-btn:hover {
  background: var(--accent-dark);
}

.ask-btn:active {
  transform: scale(0.98);
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Info button & popup ──────────────────────────────────────── */
.info-wrapper {
  position: relative;
  align-self: flex-end;
  margin-bottom: -12px;
  z-index: 10;
}

.info-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.info-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

.info-popup {
  display: none;
  position: absolute;
  top: 44px;
  right: 0;
  width: 280px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.info-popup.visible {
  display: block;
}

.info-popup p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

/* Mobile: wider popup */
@media (max-width: 480px) {
  .info-popup {
    right: -20px;
    width: 260px;
  }
}
