:root {
  --ink: #1f2937;
  --muted: #5f6b7a;
  --paper: #fffaf0;
  --card: #ffffff;
  --accent: #1f7a8c;
  --accent-dark: #155c6a;
  --sun: #f6c453;
  --shadow: 0 24px 70px rgba(31, 41, 55, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(246, 196, 83, 0.55), transparent 32rem),
    linear-gradient(135deg, #e7f6f8 0%, var(--paper) 55%, #f8d7b5 100%);
}

.joke-app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.stage {
  width: min(720px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.95;
}

.intro {
  max-width: 500px;
  margin: 18px auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.joke-card {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 34px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  position: relative;
}

.joke-card::before {
  content: "DAD";
  position: absolute;
  top: -16px;
  left: 22px;
  padding: 6px 12px;
  background: var(--sun);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

#jokeText {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

button {
  min-height: 48px;
  padding: 0 22px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--ink);
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--ink);
}

button:focus-visible {
  outline: 4px solid rgba(31, 122, 140, 0.35);
  outline-offset: 4px;
}

.secondary {
  background: #ffffff;
  color: var(--ink);
}

.secondary:hover {
  background: #f6c453;
}

.saved-joke {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--accent-dark);
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .joke-card {
    min-height: 220px;
    padding: 28px 20px;
  }

  button {
    width: 100%;
  }
}
