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

:root {
  --bg: #fdf6ec;
  --panel: #ffffff;
  --accent: #e07a5f;
  --accent-dark: #c25b40;
  --text: #3d3d3d;
  --muted: #8a8a8a;
  --border: #eadfce;
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

html, body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

header.site-header .logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav.site-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav.site-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

nav.site-nav a:hover {
  background: var(--accent);
  color: #fff;
}

nav.site-nav a.active {
  background: var(--accent-dark);
  color: #fff;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 16px 60px;
  text-align: center;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
  max-width: 640px;
  width: 100%;
}

h1 {
  font-size: 1.9rem;
  margin-bottom: 12px;
  color: var(--accent-dark);
}

h2 {
  font-size: 1.3rem;
  margin: 18px 0 10px;
  color: var(--accent-dark);
}

p {
  line-height: 1.55;
  margin-bottom: 12px;
  color: var(--text);
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn.secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}

.btn.secondary:hover {
  background: var(--accent);
  color: #fff;
}

footer.site-footer {
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- Игра ---- */

.game-hud {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 420px;
  margin-bottom: 18px;
  font-size: 1.15rem;
  font-weight: 700;
}

.game-hud span {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: var(--shadow);
}

#score {
  color: var(--accent-dark);
}

#timer {
  color: var(--text);
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 420px;
}

.hole {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #d9c7a3;
  border-radius: 50%;
  box-shadow: inset 0 6px 12px rgba(0,0,0,0.25);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hole .critter {
  font-size: 2.6rem;
  transform: translateY(100%);
  transition: transform 0.15s ease-out;
  user-select: none;
  pointer-events: none;
}

.hole.up .critter {
  transform: translateY(10%);
}

.result-box {
  margin-top: 20px;
}

.score-popup {
  position: absolute;
  font-weight: 800;
  font-size: 1.1rem;
  pointer-events: none;
  animation: floatUp 0.6s ease-out forwards;
}

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

.score-plus { color: #2a9d5c; }
.score-minus { color: #d1495b; }

table.records-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

table.records-table th, table.records-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

table.records-table th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .card { padding: 24px 18px; }
  .hole .critter { font-size: 2rem; }
}
