:root {
  --banner-bg: #25a1db;
  --banner-fg: #000000;
  --banner-fg-dim: #000000;
  --btn-bg: #ffffff;
  --btn-fg: #0f172a;
  --btn-alt-bg: rgba(255, 255, 255, 0.2);
  --btn-alt-fg: #000000;
  --radius-xl: 16px;
}

/* -------- Splash -------- */
html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: #0aafff;
  background-size: 100% 100%;
}

.center {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  opacity: 1;
  animation: fade-in 1s ease-in-out forwards;
}

@keyframes fade-in {
  5% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .center {
    width: 80%;
  }
}

.contain,
.stretch,
.cover {
  display: block;
  width: 100%;
  height: 100%;
}

.contain {
  object-fit: contain;
}

.cover {
  object-fit: cover;
}

.bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
}

.bottomLeft {
  position: absolute;
  bottom: 0;
  left: 0;
}

.bottomRight {
  position: absolute;
  bottom: 0;
  right: 0;
}

#update-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  padding: 16px 18px;
  border-radius: var(--radius-xl);
  background: var(--banner-bg);
  color: var(--banner-fg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  display: none;
  z-index: 2147483647;
  font: 14px/1.45 "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;

  opacity: 0;
  transform: translate(-50%, 8px);
}

#update-banner.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity .18s ease, transform .18s ease;
}

#update-banner .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

#update-banner .title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px 0;
}

#update-banner .desc {
  margin: 0;
  color: var(--banner-fg-dim);
  font-size: 13px;
}

#update-banner .actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

#update-banner button {
  border: 0;
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .06s ease, opacity .15s ease;
  will-change: transform;
}

#update-banner button:active {
  transform: translateY(1px);
}

#refresh-now {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

#refresh-now:hover {
  opacity: .92;
}

#later {
  background: var(--btn-alt-bg);
  color: var(--btn-alt-fg);
}

#later:hover {
  opacity: .9;
}

@media (max-width: 420px) {
  #update-banner .row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #update-banner .actions {
    justify-content: stretch;
  }

  #update-banner button {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {

  #update-banner,
  #update-banner button {
    transition: none;
  }
}

#offline-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateY(-20%);
  display: none;
  inline-size: auto;
  max-width: min(92vw, 420px);
  padding: 12px 14px;
  border-radius: var(--radius-xl);
  background: #0f0f10;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  z-index: 2147483647;
  font: 14px/1.45 "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;

  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .2s ease;
}

#offline-banner.show {
  display: inline-block;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* layout interno */
#offline-banner .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

#offline-banner .title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}

#offline-banner .desc {
  margin: 2px 0 0 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .85);
}

#offline-banner .actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

#offline-retry {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  transition: transform .06s ease, opacity .15s ease;
}

#offline-retry:hover {
  opacity: .92;
}

#offline-retry:active {
  transform: translateY(1px);
}

@media (max-width: 420px) {
  #offline-banner .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #offline-retry {
    width: 100%;
    text-align: center;
  }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {

  #offline-banner,
  #offline-retry {
    transition: none;
  }
}

#offline-banner.below-update {
  bottom: 88px;
}