/* Landing — tela cheia + landscape no mobile */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  font-family: "Made Tommy Soft", "Segoe UI", system-ui, sans-serif;
  background: #05080f;
  color: #fff;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.snq-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  background: #05080f;
  border-radius: 0;
  box-shadow: none;
}

.snq-bg {
  position: absolute;
  inset: 0;
  background-color: #05080f;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: opacity 0.45s ease;
}

.snq-bg--loading {
  background-image: url("/assets/sinuquinha-ui/splash-loading.png");
  z-index: 2;
  opacity: 1;
}

.snq-bg--home {
  background-image: url("/assets/sinuquinha-ui/splash-loading.png");
  z-index: 1;
  opacity: 0;
}

.snq-stage.is-ready .snq-bg--loading {
  opacity: 0;
  pointer-events: none;
}

.snq-stage.is-ready .snq-bg--home {
  opacity: 1;
}

.snq-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 55%,
      rgba(5, 8, 15, 0.4) 72%,
      rgba(5, 8, 15, 0.72) 100%
    );
  transition: opacity 0.4s ease;
}

.snq-stage.is-ready .snq-vignette {
  opacity: 1;
}

/* —— LOADING —— */
.snq-loading {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.25rem 6vh;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.snq-stage.is-ready .snq-loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.snq-loading__bar-wrap {
  width: min(52vw, 420px);
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 210, 80, 0.55);
  box-shadow: 0 0 18px rgba(255, 140, 0, 0.35);
  overflow: hidden;
}

.snq-loading__bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6b73c, #ff7a18 55%, #ffe27a);
  box-shadow: 0 0 12px rgba(255, 180, 40, 0.8);
  transition: width 0.12s linear;
}

.snq-loading__text {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.snq-loading__spinner {
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  background: url("/assets/sinuquinha-ui/loading-round.png") center / contain no-repeat;
  animation: snq-spin 1.1s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 180, 40, 0.6));
}

@keyframes snq-spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— HOME —— */
.snq-home {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.25rem 4vh;
  pointer-events: none;
}

.snq-home[hidden] {
  display: none !important;
}

.snq-stage.is-ready .snq-home {
  display: flex;
  pointer-events: auto;
  animation: snq-home-in 0.45s ease both;
}

@keyframes snq-home-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.snq-home__spacer {
  flex: 1;
}

.snq-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  width: min(90vw, 640px);
  margin-bottom: 0.9rem;
}

.snq-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 220px;
  min-height: 56px;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease;
  cursor: pointer;
  user-select: none;
}

.snq-btn:active {
  transform: translateY(3px) scale(0.98);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.35),
    0 6px 14px rgba(0, 0, 0, 0.3);
}

.snq-btn--entrar {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 45%),
    url("/assets/sinuquinha-ui/btn-green.png");
  background-color: #1f9d45;
}

.snq-btn--cadastrar {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 45%),
    url("/assets/sinuquinha-ui/btn-blue.png");
  background-color: #1f6fd8;
}

.snq-footer {
  width: min(92vw, 520px);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.snq-footer a {
  color: #ffe14a;
  font-weight: 700;
  text-decoration: none;
}

.snq-footer a:hover {
  text-decoration: underline;
}

/*
  Mobile em pé (portrait): gira a tela para landscape
  (arte Bilhar 360 é horizontal)
*/
@media (orientation: portrait) and (max-width: 1024px) {
  .snq-stage {
    width: 100dvh;
    height: 100dvw;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    transform: rotate(90deg) translateY(-100%);
    transform-origin: top left;
  }

  .snq-actions {
    width: min(70vh, 560px);
  }

  .snq-loading__bar-wrap {
    width: min(55vh, 420px);
  }

  .snq-footer {
    width: min(70vh, 480px);
  }
}

/* Já em landscape: tela cheia normal */
@media (orientation: landscape) {
  .snq-stage {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    transform: none;
  }
}
