/* Shared layout foundation for the Rainbow PC theme. */
:root {
  --coin: #ffc72c;
  --ink: #203247;
  --muted: #66748a;
  --line: rgba(32, 50, 71, 0.14);
  --green: #3dbb6a;
  --purple: #7f63d9;
  --nav-h: 74px;
  --font-display: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Trebuchet MS", Arial, system-ui, sans-serif;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #eafaff;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--nav-h);
  border-bottom: 1px solid rgba(47, 155, 103, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(42, 91, 125, 0.1);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 32px rgba(42, 91, 125, 0.16);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 155, 103, 0.14);
  object-fit: contain;
}

.brand-name {
  max-width: 220px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0.62rem 0.95rem;
  border-radius: 8px;
  color: #31536f;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: #e8f8ee;
  color: #227c55;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-signup {
  display: inline-flex;
  min-width: 116px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: linear-gradient(180deg, #42c47e, #25895d);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 6px 0 #176a47, 0 16px 26px rgba(47, 155, 103, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-signup:hover {
  color: #ffffff;
  filter: brightness(1.04);
  transform: translateY(2px);
  box-shadow: 0 4px 0 #176a47, 0 12px 22px rgba(47, 155, 103, 0.2);
}

.account-link {
  width: 220px;
  height: 48px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 6px;
  border: 2px solid rgba(47, 155, 103, 0.25);
  border-radius: 8px;
  background: #f7fff9;
  box-shadow: 0 8px 18px rgba(42, 91, 125, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.account-link:hover {
  border-color: rgba(47, 155, 103, 0.46);
  transform: translateY(-1px);
}

.account-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #8e77e8, var(--purple));
  color: #ffffff;
}

.account-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.account-copy small {
  color: var(--green);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
}

.account-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-arrow {
  color: var(--green);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.games-carousel {
  position: relative;
}

.games-track {
  scrollbar-width: none;
}

.games-track::-webkit-scrollbar {
  display: none;
}

.games-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.game-slide img {
  user-select: none;
  transition: transform 0.25s ease;
}

.game-slide:hover img {
  transform: scale(1.025);
}

.games-carousel__controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.games-carousel__button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #8d73e7, #6044b4);
  color: #ffffff;
  box-shadow: 0 5px 0 #463286;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.games-carousel__button:hover:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #463286;
}

.games-carousel__button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.site-footer {
  position: relative;
  color: var(--ink);
  border-top: 1px solid rgba(47, 155, 103, 0.18);
  background: linear-gradient(180deg, #f6fff6 0%, #ffffff 100%);
}


.footer-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(170px, 0.65fr) minmax(240px, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-top: 3rem;
  padding-bottom: 2.3rem;
}

.footer-brand {
  max-width: 500px;
}

.footer-brand__identity {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.footer-brand__mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  padding: 5px;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(42, 91, 125, 0.12);
}

.footer-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand__identity strong,
.footer-brand__identity small {
  display: block;
}

.footer-brand__identity strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.25;
}

.footer-brand__identity small {
  margin-top: 0.15rem;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 900;
}

.footer-brand__description {
  max-width: 460px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.75;
}

.footer-block h2 {
  margin: 0.3rem 0 1rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.footer-policy-list {
  display: grid;
  gap: 0.65rem;
  list-style: none;
}

.footer-policy-list a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-policy-list a::before {
  content: "";
  width: 17px;
  height: 17px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--coin);
}

.footer-policy-list a:hover {
  color: var(--green);
  transform: translateX(3px);
}

.footer-contact > a,
.footer-contact > p {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.footer-contact > a {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0.8rem;
}

.footer-contact > a:hover {
  color: var(--green);
}

.footer-contact i {
  padding-top: 0.28rem;
  color: var(--green);
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid rgba(47, 155, 103, 0.14);
  background: #f4fbf8;
}

.footer-bottom__inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.85fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 62px;
  }

  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    max-width: 150px;
    font-size: 0.86rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(47, 155, 103, 0.18);
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    justify-content: center;
    width: 100%;
  }

  .btn-signup {
    min-width: 96px;
    min-height: 38px;
    font-size: 0.7rem;
  }

  .account-link {
    width: 142px;
    height: 42px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 7px;
  }

  .account-avatar {
    width: 32px;
    height: 32px;
  }

  .account-copy small,
  .account-arrow {
    display: none;
  }

}

@media (max-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom__inner {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .brand-name {
    display: none;
  }

  .header-actions {
    gap: 0.45rem;
  }

  .btn-signup {
    min-width: 86px;
    padding-inline: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
