:root {
  --bg-1: #c8f2b4;
  --bg-2: #9fd98b;
  --panel: rgba(255, 255, 255, 0.3);
  --panel-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 18px 48px rgba(47, 93, 54, 0.28);
  --radius: 12px;
  --font-body: "IBM Plex Mono", "Menlo", "Courier New", monospace;
  --holo: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.3);
  --dog-img: url("assets/dog.png");
  --grass-img: url("assets/grass.png");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(120% 120% at 50% 10%, #e4ffd9 0%, #d3f6c9 35%, #a8e18f 75%, #9ad37c 100%);
  color: #1e3a24;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0) 40%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05) 1px, rgba(255, 255, 255, 0.02) 1px, rgba(255, 255, 255, 0.02) 3px);
  pointer-events: none;
  mix-blend-mode: screen;
}

.gridlines {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px;
  opacity: 0.6;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

header {
  position: relative;
  z-index: 10;
  margin: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px) saturate(140%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo .dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(145deg, #2f7c3f, #7ed957);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 6px 14px rgba(0, 0, 0, 0.18);
}

.tagline {
  color: #26552f;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  padding: 0 16px 16px;
  height: calc(100vh - 96px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px) saturate(140%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 420px;
}

.panel h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel h2::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, #5ccb5f, #2f8a40);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

button,
.toggle {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  color: #24502d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

button:hover,
.toggle:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

button:active,
.toggle:active {
  transform: translateY(0);
}

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.toggle input {
  accent-color: #2f8a40;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.slider {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.slider label {
  font-size: 13px;
  letter-spacing: 0.03em;
  color: #274d30;
}

.slider output {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.58);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  min-width: 44px;
  text-align: center;
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.5);
  height: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(145deg, #4d9f5a, #8fe28e);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(145deg, #4d9f5a, #8fe28e);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.panel small {
  color: #2f6137;
  opacity: 0.8;
}

.yard {
  position: relative;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(10px) saturate(130%);
  overflow: hidden;
  min-height: 520px;
}

#field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: radial-gradient(100% 100% at 10% 20%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) 0 0/320px 320px repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}

#grass-layer,
#dogs-layer,
#trail-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grass {
  position: absolute;
  background-image: var(--grass-img, radial-gradient(ellipse at 50% 80%, #4b9b48 0%, #2f7c39 55%, transparent 65%));
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.12));
  opacity: 0.85;
}

.dog {
  position: absolute;
  width: 80px;
  height: 80px;
  transform-origin: center;
  background-image: var(--dog-img, radial-gradient(circle at 40% 40%, #fff 0%, #f7f7f7 50%, #c7d9c0 80%));
  background-size: contain;
  background-repeat: no-repeat;
  image-rendering: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
  transition: filter 150ms ease;
}

.dog::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  background: radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.08), transparent 45%);
  mix-blend-mode: multiply;
  opacity: 0.6;
}

.dog.highlight {
  filter: drop-shadow(0 14px 22px rgba(34, 102, 55, 0.55)) saturate(1.2);
}

.trail {
  position: absolute;
  width: 22px;
  height: 14px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(122, 217, 116, 0.4));
  pointer-events: none;
  filter: blur(0.4px);
  opacity: 0.65;
}

.cursor-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 2px solid rgba(46, 119, 55, 0.7);
  background: rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.28), 0 0 0 10px rgba(46, 119, 55, 0.15);
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.status-pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2f8a40, #6cd96d);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  main {
    grid-template-columns: 1fr;
    height: auto;
  }

  .yard {
    min-height: 440px;
    height: 60vh;
  }
}
