body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(103, 143, 9, 0.18), transparent 22%),
    #f4f7ee;
  color: #17211a;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #678f09, #86b514);
  color: #ffffff;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(14, 32, 2, 0.12);
}

header h1 {
  margin: 0;
  font-size: clamp(2rem, 1.6rem + 1vw, 2.4rem);
}

header p {
  margin: 10px 0 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
}

nav {
  background: #0f1608;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav a {
  color: #f7fbef;
  text-decoration: none;
  margin: 0 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

nav a:hover {
  color: #d9f59d;
}

main {
  flex: 1;
  max-width: 900px;
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding: 28px 24px 32px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(15, 22, 8, 0.08);
  text-align: center;
}

main h2 {
  margin-top: 0;
  color: #123110;
}

main p,
main li {
  color: #283125;
}

button {
  padding: 12px 22px;
  border: none;
  background: linear-gradient(135deg, #678f09, #86b514);
  color: #ffffff;
  cursor: pointer;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(103, 143, 9, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.armpit-emoji {
  padding: 12px 22px;
  border: none;
  background: linear-gradient(135deg, #ff3502, #b10eda);
  color: #ffffff;
  cursor: pointer;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(103, 143, 9, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(103, 143, 9, 0.28);
}

.site-footer {
  background: #111827;
  color: #f9fafb;
  padding: 34px 20px 18px;
  margin-top: 0;
}

.site-footer .footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.site-footer p {
  margin: 0 0 10px;
  color: #d1d5db;
  line-height: 1.7;
}

.site-footer a {
  display: block;
  color: #c7f59b;
  text-decoration: none;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer .footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid #334155;
  text-align: center;
}

@media (max-width: 768px) {
  main {
    margin: 24px 16px;
    padding: 24px 18px;
  }

  .site-footer .footer-content {
    grid-template-columns: 1fr;
  }

  nav {
    text-align: center;
  }

  nav a {
    display: inline-block;
    margin: 8px 12px;
  }
}

.shuffle-game {
  max-width: 760px;
  margin: 0 auto;
}

.shuffle-game .status-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 18px 0 28px;
}

.shuffle-game .hat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
  margin: 0 auto;
}

.hat-card {
  background: linear-gradient(180deg, #fcfcfc 0%, #f3f8e7 100%);
  border: 2px solid rgba(103, 143, 9, 0.18);
  border-radius: 24px;
  padding: 22px 16px;
  color: #182618;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  min-height: 180px;
  position: relative;
}

.hat-card:hover {
  transform: translateY(-3px);
  border-color: #678f09;
}

.hat-card .hat-ball {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.8rem;
}

.hat-card.correct .hat-ball,
.hat-card.show-ball .hat-ball {
  display: block;
}

.hat-card .hat-emoji {
  display: block;
  font-size: 3rem;
  margin-bottom: 10px;
}

.hat-card.selected {
  border-color: #2563eb;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.14);
}

.hat-card.correct {
  background: linear-gradient(180deg, #dcfce7 0%, #ecfdf5 100%);
  border-color: #10b981;
}

.hat-card.wrong {
  background: linear-gradient(180deg, #fee2e2 0%, #fef2f2 100%);
  border-color: #ef4444;
}

.hat-card.disabled,
.hat-card[disabled] {
  opacity: 0.7;
  cursor: default;
}

.hat-emoji {
  display: block;
  font-size: 3rem;
  margin-bottom: 10px;
}

.shuffle-footer {
  margin-top: 28px;
}

.shuffle-button.secondary {
  background: #111827;
  color: #f8fafc;
}

.shuffle-button.secondary:hover {
  background: #1f2937;
}

@media (max-width: 780px) {
  .hat-grid {
    grid-template-columns: 1fr;
  }
}

.img-page main {
  max-width: 1100px;
  width: min(1100px, calc(100% - 32px));
  text-align: left;
}

.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 24px;
  align-items: start;
}

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 22, 8, 0.18);
  background: #ffffff;
  padding: 8px;
  box-sizing: border-box;
}

body.projects-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #071027 0%, #0f1724 100%);
  color: #e6eef6;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.projects-page .container {
  max-width: 980px;
  margin: 40px auto;
  padding: 24px;
}


.projects-page .lead {
  color: #9aa4b2;
  margin-top: 8px;
}

.projects-page .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.projects-page .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 18px;
  border-radius: 10px;
}

.projects-page .card h3 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #e6eef6;
}

.projects-page .card p {
  margin: 0 0 12px;
  color: #9aa4b2;
  font-size: 0.95rem;
}

.projects-page .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.projects-page .tag {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}


.projects-page a.button {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: #38bdf8;
  color: #042b37;
  text-decoration: none;
  font-weight: 600;
}

.projects-page a.button:hover {
  background: #7dd3fc;
}

@media (max-width: 640px) {
  .projects-page .container {
    padding: 18px;
  }


}