:root {
  --bg-1: #f8edd8;
  --bg-2: #e9d9bd;
  --panel: rgba(255, 248, 234, 0.48);
  --panel-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 18px 48px rgba(136, 112, 67, 0.26);
  --radius: 12px;
  --font-body: "IBM Plex Mono", "Menlo", "Courier New", monospace;
  --holo: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.32);
  --dog-img: url("assets/doge.png"), radial-gradient(circle at 40% 40%, #fff7e4 0%, #f2e1c2 55%, #c9b087 85%);
  --grass-img: url("assets/grass.png"), radial-gradient(ellipse at 50% 80%, #8aad63 0%, #6a8b46 60%, transparent 72%);
  --button-icon: url("assets/doge.png"), radial-gradient(circle at 50% 50%, #f7e3b5 0%, #d9b978 70%, #b48847 100%);
  --accent-1: #c89b5a;
  --accent-2: #9d7d43;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: radial-gradient(120% 120% at 50% 10%, #fff7e6 0%, #f4e4c6 35%, #e6d2ad 65%, #d7bf95 100%);
  color: #5a462f;
  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, #d6aa62, #f4ce86);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65), 0 6px 14px rgba(0, 0, 0, 0.18);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 248, 234, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
  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, #d6aa62, #b0813f);
  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: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 238, 210, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  color: #6b4b2b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}

button:hover,
.toggle:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 239, 215, 0.98));
  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);
}

.doge-btn {
  padding-left: 44px;
}

.doge-btn::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  background-image: var(--button-icon);
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

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

.toggle input {
  accent-color: #c89b5a;
  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: #7a6241;
}

.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, #c89b5a, #e8c17f);
  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, #c89b5a, #e8c17f);
  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: #7d694a;
  opacity: 0.8;
}

.yard {
  position: relative;
  background: rgba(255, 244, 225, 0.32);
  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, 239, 213, 0.6), rgba(255, 239, 213, 0)) 0 0/320px 320px repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
}

#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(170, 132, 61, 0.48)) saturate(1.1);
}

.trail {
  position: absolute;
  width: 22px;
  height: 14px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.82), rgba(243, 195, 120, 0.45));
  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(182, 137, 64, 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(182, 137, 64, 0.18);
  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, #d6aa62, #f0c980);
  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;
  }
}
