:root {
  color-scheme: light;
  --app-shell-bg: #f3fbff;
  --app-shell-card: rgba(255, 255, 255, 0.9);
  --app-shell-border: rgba(47, 158, 235, 0.22);
  --app-shell-text: #102a43;
  --app-shell-muted: #52667a;
  --app-shell-blue: #1f6fd6;
  --app-shell-aqua: #5bbceb;
  --app-shell-soft: #ddf5ff;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--app-shell-bg);
}

.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--app-shell-text);
  background:
    radial-gradient(circle at 18% 16%, rgba(221, 245, 255, 0.98), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(91, 188, 235, 0.26), transparent 28%),
    linear-gradient(135deg, #eef9ff 0%, #f8fcff 54%, #eaf7ff 100%);
  overflow: hidden;
  position: relative;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  height: 180px;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

.app-shell::before {
  bottom: -104px;
  background: rgba(47, 158, 235, 0.12);
}

.app-shell::after {
  bottom: -132px;
  background: rgba(31, 111, 214, 0.08);
}

.app-shell-card {
  width: min(420px, 100%);
  min-height: 300px;
  border: 1px solid var(--app-shell-border);
  border-radius: 32px;
  background: var(--app-shell-card);
  box-shadow: 0 26px 68px rgba(31, 111, 214, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 34px 24px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.app-shell-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 24%, rgba(221, 245, 255, 0.86), transparent 28%),
    radial-gradient(circle at 76% 76%, rgba(91, 188, 235, 0.12), transparent 32%);
  pointer-events: none;
}

.app-shell-whale {
  width: 124px;
  height: 82px;
  position: relative;
  z-index: 1;
  animation: appShellFloat 4.8s ease-in-out infinite;
}

.app-shell-whale-body {
  position: absolute;
  left: 12px;
  top: 20px;
  width: 84px;
  height: 48px;
  border-radius: 58% 46% 50% 58% / 54% 56% 46% 50%;
  background: linear-gradient(145deg, #aee7ff 0%, #5bbceb 48%, #1f6fd6 118%);
  box-shadow: 0 16px 30px rgba(31, 111, 214, 0.18);
  overflow: hidden;
}

.app-shell-whale-body::before {
  content: "";
  position: absolute;
  left: 14%;
  bottom: 8%;
  width: 60%;
  height: 32%;
  border-radius: 60% 52% 44% 58%;
  background: rgba(255, 255, 255, 0.62);
}

.app-shell-whale-eye {
  position: absolute;
  right: 20px;
  top: 34px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffffff;
  z-index: 2;
}

.app-shell-whale-eye::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: #102a43;
}

.app-shell-whale-tail {
  position: absolute;
  right: 12px;
  top: 35px;
  width: 32px;
  height: 26px;
  transform-origin: 2px 50%;
  animation: appShellTail 3.6s ease-in-out infinite;
}

.app-shell-whale-tail::before,
.app-shell-whale-tail::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 16px;
  background: #5bbceb;
}

.app-shell-whale-tail::before {
  left: 0;
  top: 2px;
  border-radius: 72% 28% 70% 30%;
  transform: rotate(34deg);
}

.app-shell-whale-tail::after {
  left: 10px;
  top: 8px;
  border-radius: 28% 72% 30% 70%;
  background: #1f6fd6;
  opacity: 0.82;
  transform: rotate(-34deg);
}

.app-shell-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.app-shell-bubbles span {
  position: absolute;
  border-radius: 999px;
  background: rgba(221, 245, 255, 0.78);
  border: 1px solid rgba(47, 158, 235, 0.22);
  animation: appShellBubble 4.8s ease-in-out infinite;
}

.app-shell-bubbles span:nth-child(1) {
  width: 12px;
  height: 12px;
  left: 24%;
  top: 26%;
}

.app-shell-bubbles span:nth-child(2) {
  width: 9px;
  height: 9px;
  right: 24%;
  top: 34%;
  animation-delay: -1.2s;
}

.app-shell-bubbles span:nth-child(3) {
  width: 7px;
  height: 7px;
  left: 62%;
  top: 20%;
  animation-delay: -2s;
}

.app-shell-title,
.app-shell-subtitle {
  position: relative;
  z-index: 2;
  margin: 0;
}

.app-shell-title {
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.15;
  font-weight: 900;
  color: var(--app-shell-blue);
}

.app-shell-subtitle {
  font-size: 14px;
  line-height: 1.6;
  color: var(--app-shell-muted);
  font-weight: 650;
}

.app-shell-loader {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 7px;
  margin-top: 4px;
}

.app-shell-loader span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--app-shell-aqua);
  animation: appShellPulse 1.2s ease-in-out infinite;
}

.app-shell-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.app-shell-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes appShellFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(8px, -8px, 0) rotate(1.5deg); }
}

@keyframes appShellTail {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(9deg); }
}

@keyframes appShellBubble {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.48; }
  50% { transform: translate3d(0, -18px, 0); opacity: 0.95; }
}

@keyframes appShellPulse {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 18px;
  }

  .app-shell-card {
    min-height: 280px;
    border-radius: 26px;
    padding: 30px 18px;
  }

  .app-shell-whale {
    transform: scale(0.92);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell-whale,
  .app-shell-whale-tail,
  .app-shell-bubbles span,
  .app-shell-loader span {
    animation: none !important;
  }
}
