:root {
  --ink: #1c2430;
  --cream: #fff2cf;
  --orange: #ff8b2b;
  --green: #2f9e44;
  --sky: #78d7ff;
  --grass: #36b24a;
  --mud: #855327;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, .65), transparent 34rem),
    linear-gradient(135deg, #16375a, #1f6f5c 48%, #f0b34a);
}

button {
  border: 0;
  border-radius: 999px;
  padding: .8rem 1.25rem;
  font-weight: 900;
  cursor: pointer;
  color: #20140a;
  background: var(--cream);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .25);
  transition: transform .12s ease, box-shadow .12s ease;
}

button:hover { transform: translateY(-2px); }
button:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.hero-card, .game-card {
  border: 4px solid rgba(255, 255, 255, .55);
  border-radius: 28px;
  background: rgba(255, 242, 207, .92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.eyebrow { margin: 0; color: #bd4b13; text-transform: uppercase; font-weight: 900; letter-spacing: .12em; }
h1 { margin: .1rem 0; font-size: clamp(2rem, 6vw, 4.8rem); line-height: .9; text-shadow: 3px 3px 0 #ffc94d; }
.intro { max-width: 62ch; margin: .5rem 0 0; font-size: 1.05rem; }
.primary { background: var(--orange); color: white; font-size: 1.05rem; min-width: 145px; }

.game-card { padding: 1rem; }
.hud {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  margin-bottom: .75rem;
}
.hud div {
  border-radius: 16px;
  padding: .55rem;
  background: #1c2430;
  color: white;
  text-align: center;
}
.hud span { display: block; opacity: .7; font-size: .75rem; text-transform: uppercase; }
.hud strong { font-size: 1.35rem; }

.field {
  position: relative;
  height: min(62vh, 620px);
  min-height: 430px;
  overflow: hidden;
  border: 6px solid #45220e;
  border-radius: 22px;
  cursor: crosshair;
  background:
    linear-gradient(transparent 0 63%, rgba(255,255,255,.22) 63% 64%, transparent 64%),
    linear-gradient(var(--sky) 0 64%, var(--grass) 64% 83%, var(--mud) 83%);
}

.sun { position: absolute; top: 28px; right: 56px; width: 76px; height: 76px; border-radius: 50%; background: #ffe066; box-shadow: 0 0 0 14px rgba(255,224,102,.25); }
.cloud { position: absolute; width: 120px; height: 42px; border-radius: 42px; background: white; opacity: .92; }
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: white; }
.cloud::before { width: 54px; height: 54px; left: 18px; top: -22px; }
.cloud::after { width: 68px; height: 68px; right: 14px; top: -34px; }
.cloud-one { left: 9%; top: 13%; animation: drift 24s linear infinite; }
.cloud-two { left: 52%; top: 21%; transform: scale(.7); animation: drift 30s linear infinite reverse; }

.reed { position: absolute; bottom: 15%; width: 18px; height: 130px; background: #18662a; border-radius: 18px 18px 0 0; transform-origin: bottom; }
.reed::after { content: ""; position: absolute; top: -24px; left: -10px; width: 38px; height: 38px; border-radius: 50%; background: #b06c24; }
.reed-a { left: 7%; transform: rotate(-8deg); }
.reed-b { right: 12%; transform: rotate(7deg) scale(.9); }

.duck {
  position: absolute;
  width: 78px;
  height: 56px;
  transform-origin: center;
  filter: drop-shadow(0 7px 2px rgba(0,0,0,.22));
  animation: flap .25s steps(2) infinite;
}
.duck::before { content: ""; position: absolute; left: 15px; top: 15px; width: 46px; height: 30px; border-radius: 50% 55% 45% 50%; background: var(--duck-body, #7f4ab8); }
.duck::after { content: ""; position: absolute; right: 2px; top: 10px; width: 24px; height: 22px; border-radius: 50%; background: #246b3b; box-shadow: 13px 5px 0 -7px #ffd43b; }
.wing { position: absolute; left: 25px; top: 2px; width: 32px; height: 20px; border-radius: 50%; background: #f08c00; transform-origin: left bottom; animation: wing .25s infinite alternate; }
.duck.fall { animation: tumble .6s linear forwards; pointer-events: none; }
.pop { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.8); border: 4px dashed #ffec99; animation: pop .4s ease-out forwards; pointer-events: none; }

.dog { position: absolute; left: 50%; bottom: 12%; width: 112px; height: 92px; transform: translateX(-50%); transition: transform .45s ease; }
.dog-body { position: absolute; bottom: 0; left: 18px; width: 76px; height: 44px; border-radius: 40px 40px 20px 20px; background: #9a5b2f; }
.dog-head { position: absolute; left: 36px; top: 2px; width: 52px; height: 50px; border-radius: 50%; background: #7b4426; z-index: 2; }
.dog-head::before { content: ""; position: absolute; left: 30px; top: 20px; width: 24px; height: 14px; border-radius: 999px; background: #ead2b0; }
.dog-head::after { content: "• •"; position: absolute; left: 14px; top: 8px; color: #111; letter-spacing: 10px; font-weight: 900; }
.dog-ear { position: absolute; left: 24px; top: 16px; width: 24px; height: 42px; border-radius: 40px; background: #51301e; z-index: 3; }
.dog-tail { position: absolute; left: 6px; top: 39px; width: 42px; height: 10px; border-radius: 10px; background: #7b4426; transform: rotate(28deg); transform-origin: right; animation: wag .4s infinite alternate; }
.dog.celebrate { transform: translateX(-50%) translateY(-35px); }

.message {
  position: absolute;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, 88%);
  border: 4px solid #1c2430;
  border-radius: 22px;
  padding: 1rem;
  background: rgba(255, 242, 207, .94);
  text-align: center;
  font-size: clamp(1.3rem, 4vw, 2.1rem);
  font-weight: 900;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  z-index: 10;
}
.message.hidden { display: none; }

.controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .8rem; }
.controls p { margin: 0; font-weight: 700; }
kbd { background: #1c2430; color: white; border-radius: 6px; padding: .1rem .35rem; }

@keyframes drift { to { transform: translateX(120px); } }
@keyframes flap { 50% { margin-top: -4px; } }
@keyframes wing { to { transform: rotate(-48deg); } }
@keyframes pop { to { transform: scale(2); opacity: 0; } }
@keyframes wag { to { transform: rotate(-12deg); } }
@keyframes tumble { to { transform: translateY(360px) rotate(520deg); opacity: .2; } }

@media (max-width: 760px) {
  .hero-card { align-items: stretch; flex-direction: column; }
  .hud { grid-template-columns: repeat(2, 1fr); }
  .field { min-height: 500px; }
}
