html {
  scroll-behavior: smooth;
  container-type: scroll-state;
  container-name: page;
}

body {
  font-family: "Nunito", Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  background: #a6e3e9;
  color: #111827;
}

a:focus {
  outline: 3px solid #4f46e5;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #111827;
  color: white;
  padding: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 0;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: #a6b1e1;
  color: white;
  text-decoration: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 100;
  translate: 80px 0;
  transition:
    translate 0.3s ease,
    background 0.2s;
}
.back-to-top:hover {
  background: #8e9bd8;
}
.back-to-top:focus {
  outline: 3px solid #4f46e5;
  outline-offset: 3px;
}

@container page scroll-state(scrollable: top) {
  .back-to-top {
    translate: 0 0;
  }
}

header {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  padding: 2.5rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.25),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(25deg);
  pointer-events: none;
}
header h1 {
  position: relative;
  font-family: "Fredoka One", cursive;
  font-size: 2.3rem;
  margin: 0;
  letter-spacing: 1.5px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}
@media (max-width: 600px) {
  header h1 {
    font-size: 2.2rem;
  }
}

.featured-games,
.contact-page {
  padding: 2rem 0;
}

footer {
  background: #111827;
  color: #9ca3af;
  padding: 2em 1em;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
  gap: 1.5em;
}
.footer-section {
  flex: 1 1 200px;
  min-width: 200px;
}
.footer-section h3 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.5em;
}
.footer-section h3 a {
  color: #ffffff;
  text-decoration: none;
}
.footer-section h3 a:hover {
  text-decoration: underline;
  color: #ffffff;
}
.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-section ul li {
  margin-bottom: 1em;
}
.footer-section ul li a {
  color: #9ca3af;
  text-decoration: none;
}
.footer-section ul li a:hover {
  text-decoration: underline;
  color: #ffffff;
}
footer hr {
  border: none;
  height: 1px;
  background: #ffffff1a;
  margin-bottom: 2rem;
}
footer .copyright {
  flex-basis: 100%;
  text-align: left;
  color: #9ca3af;
  font-size: 0.9rem;
}
@media (max-width: 768px) {
  .footer-container {
    gap: 1.5em;
  }
}

section {
  max-width: 1300px;
  margin: 2em auto;
  text-align: center;
}

section h2 {
  font-family: "Fredoka One", cursive;
}

.why-play {
  background: #ffffff;
  padding: 2em;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.why-play h2 {
  font-family: "Fredoka One", cursive;
}

.game-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
}

.game-card {
  width: 180px;
  height: 120px;
  background-color: #ffffff;
  color: #1f2340;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}
@media (max-width: 600px) {
  .game-card {
    width: 140px;
    height: 100px;
    font-size: 0.9rem;
  }
}

.contact-page {
  max-width: 700px;
  margin: 7em auto;
  padding: 0 1em;
}
.contact-card {
  background: #ffffff;
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.contact-card h2 {
  font-family: "Fredoka One", cursive;
  color: #111827;
  margin-bottom: 0.5em;
}
.contact-card p {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  color: #111827;
  margin-bottom: 1.5em;
}
.contact-email h3 {
  font-family: "Fredoka One", cursive;
  color: #111827;
  margin-bottom: 0.5em;
}
.contact-email a {
  color: #1e40af;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}
.contact-email a:hover {
  text-decoration: underline;
}

.terms-page,
.privacy-page {
  max-width: 800px;
  margin: 4em auto;
  padding: 0 1em;
}

.terms-card,
.privacy-card {
  background: #ffffff;
  padding: 2.5em;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.terms-card h2,
.privacy-card h2 {
  font-family: "Fredoka One", cursive;
  color: #111827;
  margin-bottom: 1em;
}

.terms-card p,
.privacy-card p {
  font-family: "Nunito", sans-serif;
  color: #111827;
  margin-bottom: 1em;
}

.terms-card h3,
.privacy-card h3 {
  font-family: "Fredoka One", cursive;
  color: #111827;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.terms-card a,
.privacy-card a {
  color: #1e40af;
  font-weight: 600;
  text-decoration: none;
}

.terms-card a:hover,
.privacy-card a:hover {
  text-decoration: underline;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}