:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101316;
  color: #f4f0e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(38, 91, 86, 0.45), transparent 42%),
    linear-gradient(45deg, rgba(142, 62, 52, 0.36), transparent 45%),
    #101316;
}

button,
select,
input {
  font: inherit;
}

.app {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 14px;
}

.topbar,
.battlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 8vw, 72px);
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
}

p,
label {
  color: #b8c8c1;
}

button {
  border: 0;
  border-radius: 8px;
  background: #f0c15a;
  color: #14100a;
  padding: 12px 16px;
  font-weight: 800;
}

button:disabled {
  opacity: 0.45;
}

.starter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.breed-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(23, 32, 36, 0.88);
  padding: 10px;
}

.breed-card img,
.dog-image {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #172024;
}

.breed-card p {
  min-height: 42px;
  font-size: 13px;
}

.arena {
  display: grid;
  gap: 16px;
}

.dog-panel {
  display: grid;
  grid-template-columns: minmax(180px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}

.stats,
.inventory {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.bars {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.bar-caption {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #b8c8c1;
  margin-bottom: 4px;
}

.bar-track {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
}

.bar.health .bar-fill {
  background: linear-gradient(90deg, #4f9e63, #7fce8d);
}

.bar.age .bar-fill {
  background: linear-gradient(90deg, #f0c15a, #8e3e34);
}

#heal {
  margin-bottom: 10px;
}

.item button {
  padding: 6px 10px;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 8px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head button {
  padding: 6px 10px;
}

.stat,
.item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.zones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
}

select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #172024;
  color: #f4f0e8;
  padding: 11px;
}

#timer {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #8e3e34;
  color: #fff8ed;
  font-size: 22px;
}

.log {
  min-height: 150px;
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: #d4ddd9;
}

.login-widget {
  margin-top: 16px;
}

@media (max-width: 780px) {
  .starter,
  .dog-panel,
  .battlebar,
  .zones {
    grid-template-columns: 1fr;
  }

  .topbar,
  .battlebar {
    align-items: stretch;
    flex-direction: column;
  }
}
