:root {
  --sky-top: #87ceeb;
  --sky-bottom: #b8e0f5;
  --water-deep: #1a6b8a;
  --water-mid: #2a8fb0;
  --water-light: #4db8d4;
  --water-foam: rgba(255, 255, 255, 0.35);
  --grass: #5a9e3e;
  --grass-dark: #3d7a2a;
  --gold: #f5c842;
  --gold-dark: #d4a82a;
  --coral: #ff6b5b;
  --coral-dark: #e04a3a;
  --text: #1a2e3b;
  --text-muted: #4a6572;
  --panel-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 8px 32px rgba(26, 46, 59, 0.15);
  --radius: 16px;
}

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

body {
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: #e8f4fc;
  overflow-x: hidden;
}

.site-nav {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(42, 143, 176, 0.2);
  transition: color 0.15s, background 0.15s;
}

.site-nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
}

.sky {
  position: fixed;
  inset: 0 0 55% 0;
  pointer-events: none;
  z-index: 0;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50px;
  opacity: 0.85;
  animation: drift linear infinite;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud-1 {
  width: 100px;
  height: 36px;
  top: 12%;
  left: -120px;
  animation-duration: 45s;
}

.cloud-1::before {
  width: 50px;
  height: 50px;
  top: -24px;
  left: 18px;
}

.cloud-1::after {
  width: 36px;
  height: 36px;
  top: -16px;
  left: 52px;
}

.cloud-2 {
  width: 130px;
  height: 42px;
  top: 22%;
  left: -160px;
  animation-duration: 60s;
  animation-delay: -20s;
}

.cloud-2::before {
  width: 60px;
  height: 60px;
  top: -30px;
  left: 22px;
}

.cloud-2::after {
  width: 44px;
  height: 44px;
  top: -20px;
  left: 68px;
}

.cloud-3 {
  width: 80px;
  height: 30px;
  top: 8%;
  left: -100px;
  animation-duration: 38s;
  animation-delay: -10s;
}

.cloud-3::before {
  width: 40px;
  height: 40px;
  top: -20px;
  left: 14px;
}

.cloud-3::after {
  width: 30px;
  height: 30px;
  top: -12px;
  left: 42px;
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 200px)); }
}

.header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.logo {
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  animation: bob 2.5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

.header h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}

.tagline {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.2rem;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.panel {
  background: var(--panel-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.panel + .panel {
  margin-top: 1.5rem;
}

.panel h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.hidden {
  display: none !important;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  min-height: 2rem;
}

.team-list-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.team-item {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #f8fbfd 0%, #eef6fa 100%);
  border-radius: 10px;
  border: 1px solid rgba(42, 143, 176, 0.2);
  animation: slideIn 0.25s ease-out;
}

.team-item.expanded {
  border-color: rgba(42, 143, 176, 0.45);
  box-shadow: 0 4px 14px rgba(42, 143, 176, 0.12);
}

.team-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.team-duck-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.team-duck-icon svg {
  display: block;
}

.team-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.team-name {
  flex: 1;
  font-weight: 500;
  word-break: break-word;
}

.remove-team-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}

.remove-team-btn:hover {
  color: var(--coral);
  background: rgba(255, 107, 91, 0.1);
}

.customize-team-btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border: 2px solid rgba(42, 143, 176, 0.25);
  border-radius: 8px;
  background: white;
  color: var(--water-deep);
  cursor: pointer;
}

.customize-team-btn:hover {
  border-color: var(--water-mid);
  background: #eef6fa;
}

.team-customize-panel {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(42, 143, 176, 0.2);
}

.customize-group {
  display: grid;
  gap: 0.4rem;
}

.customize-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.clothing-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.clothing-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(42, 143, 176, 0.25);
  border-radius: 999px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
}

.clothing-btn.active {
  background: #fff9e6;
  border-color: var(--gold);
  color: var(--text);
  font-weight: 600;
}

.customize-preview {
  display: flex;
  justify-content: center;
  padding: 0.35rem 0;
}

.customize-preview .rubber-duck-svg {
  width: 120px;
  height: 72px;
}

.add-team-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.add-team-row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(42, 143, 176, 0.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.add-team-row input:focus {
  border-color: var(--water-mid);
  box-shadow: 0 0 0 3px rgba(42, 143, 176, 0.15);
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.hint-compact {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.duration-section {
  margin-bottom: 1.25rem;
}

.import-section {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f3f9fc 0%, #e8f4fa 100%);
  border: 1px solid rgba(42, 143, 176, 0.2);
}

.import-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.import-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.import-tab {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border: 2px solid rgba(42, 143, 176, 0.2);
  border-radius: 999px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
}

.import-tab.active {
  background: var(--water-mid);
  border-color: var(--water-deep);
  color: white;
}

.import-panel {
  display: none;
}

.import-panel.active {
  display: block;
}

.import-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.import-row-single {
  grid-template-columns: 1fr;
}

.import-row input,
.import-section textarea {
  padding: 0.7rem 0.85rem;
  border: 2px solid rgba(42, 143, 176, 0.25);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.import-section textarea {
  width: 100%;
  margin-top: 0.6rem;
  resize: vertical;
  min-height: 88px;
}

.import-row input:focus,
.import-section textarea:focus {
  border-color: var(--water-mid);
  box-shadow: 0 0 0 3px rgba(42, 143, 176, 0.15);
}

.import-note {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.duration-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.duration-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.duration-btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border: 2px solid rgba(42, 143, 176, 0.25);
  border-radius: 10px;
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.12s;
}

.duration-btn:hover {
  border-color: var(--water-mid);
  color: var(--water-deep);
}

.duration-btn.active {
  background: linear-gradient(135deg, var(--water-mid) 0%, var(--water-deep) 100%);
  border-color: var(--water-deep);
  color: white;
  box-shadow: 0 3px 10px rgba(26, 107, 138, 0.3);
}

.duration-btn:active {
  transform: scale(0.97);
}

.btn {
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(255, 107, 91, 0.4);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(255, 107, 91, 0.5);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--water-mid) 0%, var(--water-deep) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(26, 107, 138, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid rgba(74, 101, 114, 0.25);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--water-mid);
  color: var(--water-deep);
}

.race-header {
  margin-bottom: 1rem;
}

.race-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.race-timer {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--water-deep);
  background: linear-gradient(135deg, #eef6fa 0%, #dceef5 100%);
  padding: 0.35rem 0.85rem;
  border-radius: 10px;
  border: 2px solid rgba(42, 143, 176, 0.25);
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.race-timer.urgent {
  color: var(--coral-dark);
  border-color: var(--coral);
  background: linear-gradient(135deg, #fff0ee 0%, #ffe4e1 100%);
  animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.race-status {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.race-track-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 4px solid #2d6a1e;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.race-scene {
  position: relative;
  overflow: hidden;
  background: #7ec8e8;
}

.scene-sky {
  position: relative;
  height: 72px;
  background: linear-gradient(180deg, #6ec6f5 0%, #9edaf7 100%);
}

.scene-sun {
  position: absolute;
  top: 10px;
  left: 16px;
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 35% 35%, #fff9c4, #ffeb3b 60%, #ffc107);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 235, 59, 0.6);
}

.scene-cloud-a,
.scene-cloud-b {
  position: absolute;
  background: #fff;
  border-radius: 40px;
  opacity: 0.92;
}

.scene-cloud-a {
  width: 80px;
  height: 28px;
  top: 18px;
  right: 18%;
  animation: sceneCloudDrift 28s linear infinite;
}

.scene-cloud-a::before,
.scene-cloud-a::after,
.scene-cloud-b::before,
.scene-cloud-b::after {
  content: '';
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.scene-cloud-a::before { width: 36px; height: 36px; top: -18px; left: 12px; }
.scene-cloud-a::after { width: 28px; height: 28px; top: -12px; left: 38px; }

.scene-cloud-b {
  width: 60px;
  height: 22px;
  top: 36px;
  right: 42%;
  animation: sceneCloudDrift 36s linear infinite reverse;
}

.scene-cloud-b::before { width: 28px; height: 28px; top: -14px; left: 8px; }
.scene-cloud-b::after { width: 22px; height: 22px; top: -10px; left: 28px; }

@keyframes sceneCloudDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}

.scene-hills {
  height: 28px;
  background: linear-gradient(180deg, #7bc96f 0%, #5cb85c 100%);
  position: relative;
}

.scene-hills::before {
  content: '';
  position: absolute;
  inset: -8px 0 auto 0;
  height: 20px;
  background:
    radial-gradient(ellipse 80px 24px at 15% 100%, #6ab04c 0%, transparent 70%),
    radial-gradient(ellipse 100px 28px at 50% 100%, #6ab04c 0%, transparent 70%),
    radial-gradient(ellipse 70px 22px at 85% 100%, #6ab04c 0%, transparent 70%);
}

.scene-grass {
  height: 36px;
  background: linear-gradient(180deg, #5cb85c 0%, #4caf50 100%);
  position: relative;
}

.scene-bush {
  position: absolute;
  bottom: 4px;
  width: 32px;
  height: 22px;
  background: #388e3c;
  border-radius: 50% 50% 40% 40%;
  transform: translateX(-50%);
}

.scene-bush::before,
.scene-bush::after {
  content: '';
  position: absolute;
  background: #2e7d32;
  border-radius: 50%;
}

.scene-bush::before { width: 20px; height: 18px; left: -8px; top: 2px; }
.scene-bush::after { width: 18px; height: 16px; right: -6px; top: 4px; }

.scene-bank {
  height: 14px;
  background: linear-gradient(180deg, #a0783c 0%, #8B6914 50%, #6d4c2c 100%);
  border-top: 2px solid #5d4037;
}

.water-course {
  position: relative;
  background: linear-gradient(180deg, #4aa3d8 0%, #3d8fc4 40%, #3580b5 100%);
  overflow: visible;
}

.water-ripples {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 30px,
    rgba(255, 255, 255, 0.12) 30px,
    rgba(255, 255, 255, 0.12) 60px
  );
  animation: waterFlow 2.5s linear infinite;
  pointer-events: none;
}

@keyframes waterFlow {
  from { transform: translateX(0); }
  to { transform: translateX(60px); }
}

.finish-gate {
  position: absolute;
  right: 6px;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 8;
  pointer-events: none;
}

.finish-gate-post {
  position: absolute;
  left: 50%;
  width: 6px;
  height: 14px;
  margin-left: -3px;
  background: linear-gradient(90deg, #888 0%, #ccc 50%, #888 100%);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.finish-gate-post--top {
  top: 0;
}

.finish-gate-post--bottom {
  bottom: 0;
}

.finish-tape-sheet {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 4px;
  margin-left: -2px;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.finish-tape-panel {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: repeating-linear-gradient(
    -45deg,
    #fff 0px,
    #fff 6px,
    #e53935 6px,
    #e53935 12px
  );
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}

.finish-tape-panel--left {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.15);
  transform-origin: bottom center;
}

.finish-tape-panel--right {
  transform-origin: top center;
}

.tape-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: #1a1a1a;
  white-space: nowrap;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.8);
}

.finish-gate:not(.broken) .finish-tape-sheet {
  animation: tapeFlutter 1.8s ease-in-out infinite;
}

@keyframes tapeFlutter {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

.finish-gate.broken .finish-tape-panel--left {
  animation: tapeBreakLeft 0.7s ease-out forwards;
}

.finish-gate.broken .finish-tape-panel--right {
  animation: tapeBreakRight 0.7s ease-out forwards;
}

@keyframes tapeBreakLeft {
  0% { transform: rotate(0) translateX(0); opacity: 1; }
  100% { transform: rotate(-35deg) translateX(-28px); opacity: 0.6; }
}

@keyframes tapeBreakRight {
  0% { transform: rotate(0) translateX(0); opacity: 1; }
  100% { transform: rotate(35deg) translateX(28px); opacity: 0.6; }
}

.obstacle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 7;
  overflow: visible;
}

.obstacle {
  position: absolute;
  z-index: 7;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  will-change: left, top;
}

.obstacle.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.obstacle.rising .driftwood-svg,
.obstacle.rising .lilypad-svg,
.obstacle.falling .driftwood-svg,
.obstacle.falling .lilypad-svg {
  animation: none;
}

.lane {
  position: relative;
  height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lane:last-child {
  border-bottom: none;
}

.duck {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: left;
}

.duck-sprite {
  width: 72px;
  height: 44px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
  transform-origin: center bottom;
}

.rubber-duck-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.duck-name-tag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.duck.paddling .duck-sprite {
  animation: duckSwim 0.45s ease-in-out infinite alternate;
}

@keyframes duckSwim {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-4px) rotate(3deg); }
}

.duck.finished .duck-sprite {
  animation: duckCelebrate 0.55s ease-in-out infinite alternate;
}

@keyframes duckCelebrate {
  0% { transform: scale(1) rotate(-4deg); }
  100% { transform: scale(1.06) rotate(4deg); }
}

.duck-splash {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: splashPop 0.55s ease-out forwards;
}

.duck-splash::before,
.duck-splash::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.duck-splash::before { left: -8px; top: -4px; }
.duck-splash::after { right: -8px; top: -3px; }

@keyframes splashPop {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(2) translateY(-10px); }
}

.duck.surge .duck-sprite {
  filter: drop-shadow(0 0 6px rgba(255, 255, 200, 0.8)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
  animation: duckSurge 0.22s ease-in-out infinite alternate;
}

@keyframes duckSurge {
  0% { transform: translateY(-2px) rotate(-4deg) scale(1.04); }
  100% { transform: translateY(-6px) rotate(5deg) scale(1.07); }
}

.duck.stunned .duck-sprite {
  animation: duckStun 0.35s ease-in-out infinite;
  filter: saturate(0.6) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}

@keyframes duckStun {
  0%, 100% { transform: rotate(-12deg) translateX(-3px); }
  50% { transform: rotate(12deg) translateX(3px); }
}

.duck.bumped .duck-sprite {
  animation: duckBump 0.4s ease-out;
}

@keyframes duckBump {
  0% { transform: translateX(0); }
  35% { transform: translateX(-14px) rotate(-18deg); }
  100% { transform: translateX(0); }
}

.driftwood-svg {
  width: 52px;
  height: 26px;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.obstacle.driftwood.hit .driftwood-svg {
  animation: driftwoodHit 0.55s ease-out forwards;
}

@keyframes driftwoodHit {
  0% { transform: rotate(0); opacity: 1; }
  100% { transform: rotate(70deg) translateX(-16px); opacity: 0.35; }
}

.lilypad-svg {
  width: 44px;
  height: 36px;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

@keyframes lilypadBob {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

.lilypad-frog-art.jumping {
  animation: frogJump 0.75s ease-out forwards;
  transform-origin: center bottom;
}

@keyframes frogJump {
  0% { transform: translate(0, 0); opacity: 1; }
  25% { transform: translate(-6px, -22px) rotate(-15deg); opacity: 1; }
  100% { transform: translate(-24px, -44px) rotate(25deg); opacity: 0; }
}

.hit-burst {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  white-space: nowrap;
  animation: hitBurst 0.9s ease-out forwards;
  pointer-events: none;
  z-index: 6;
}

@keyframes hitBurst {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.live-positions {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(26, 107, 138, 0.08);
  border-radius: 10px;
  border: 1px dashed rgba(42, 143, 176, 0.3);
}

.live-positions-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.live-positions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.position-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem;
  background: white;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(42, 143, 176, 0.2);
  transition: transform 0.25s ease, background 0.25s ease;
}

.position-chip.leader {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border-color: var(--gold);
  font-weight: 600;
}

.position-chip.finished {
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border-color: var(--gold);
  font-weight: 600;
  opacity: 0.92;
}

.position-chip.moved-up {
  animation: chipRise 0.5s ease-out;
}

.position-chip.moved-down {
  animation: chipFall 0.5s ease-out;
}

@keyframes chipRise {
  0% { transform: translateY(6px); background: #e8f8e8; }
  100% { transform: translateY(0); }
}

@keyframes chipFall {
  0% { transform: translateY(-6px); background: #ffe8e8; }
  100% { transform: translateY(0); }
}

.position-rank {
  font-family: 'Fredoka', sans-serif;
  font-size: 0.7rem;
  color: var(--water-deep);
  min-width: 1rem;
  text-align: center;
}

.live-standings {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.standing-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border: 2px solid var(--gold);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.standing-chip .pick-num {
  background: var(--gold-dark);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.results-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.results-header p {
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.draft-order {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.draft-order li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f8fbfd 0%, #eef6fa 100%);
  border-radius: 12px;
  border-left: 5px solid var(--water-mid);
  animation: slideIn 0.4s ease-out backwards;
}

.draft-order li:nth-child(1) {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, #fffbea 0%, #fff3c4 100%);
}

.draft-order li:nth-child(2) {
  border-left-color: #c0c0c0;
}

.draft-order li:nth-child(3) {
  border-left-color: #cd7f32;
}

.pick-badge {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: center;
  color: var(--water-deep);
}

.draft-order li:nth-child(1) .pick-badge {
  color: var(--gold-dark);
  font-size: 1.6rem;
}

.draft-team-info {
  flex: 1;
}

.draft-team-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.draft-team-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.empty-teams {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    text-align: center;
    padding-top: 1.5rem;
  }

  .add-team-row {
    flex-direction: column;
  }

  .sleeper-import-row,
  .import-row {
    grid-template-columns: 1fr;
  }

  .sleeper-import-row .btn,
  .import-row .btn {
    width: 100%;
  }

  .setup-actions {
    flex-direction: column;
  }

  .setup-actions .btn {
    width: 100%;
  }

  .lane {
    height: 48px;
  }

  .duck-sprite {
    width: 58px;
    height: 36px;
  }

  .duck-name-tag {
    font-size: 0.55rem;
    max-width: 72px;
  }

  .scene-sky {
    height: 56px;
  }

  .scene-sun {
    width: 36px;
    height: 36px;
  }
}
