body {
  background: linear-gradient(216deg, #f0f7ff 1%, #fff 62%);
  min-height: 100vh;
  color: #101828;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 72px;
}

body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle 360px at var(--orb1-x, 18%) var(--orb1-y, 28%), rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0.13) 22%, rgba(59, 130, 246, 0.08) 44%, rgba(59, 130, 246, 0.04) 62%, rgba(59, 130, 246, 0.015) 78%, rgba(59, 130, 246, 0) 100%);
  animation: circularMotion1 15s ease-in-out var(--orb-delay-motion1, 0s) infinite, glowBreath1 6.5s ease-in-out var(--orb-delay-glow1, 0s) infinite;
  animation-play-state: paused;
}

body::after {
  background:
    radial-gradient(circle 290px at var(--orb2a-x, 78%) var(--orb2a-y, 26%), rgba(139, 92, 246, 0.13) 0%, rgba(139, 92, 246, 0.1) 20%, rgba(139, 92, 246, 0.06) 42%, rgba(139, 92, 246, 0.028) 62%, rgba(139, 92, 246, 0.01) 80%, rgba(139, 92, 246, 0) 100%),
    radial-gradient(circle 230px at var(--orb2b-x, 72%) var(--orb2b-y, 72%), rgba(251, 191, 36, 0.11) 0%, rgba(251, 191, 36, 0.08) 20%, rgba(251, 191, 36, 0.045) 44%, rgba(251, 191, 36, 0.02) 64%, rgba(251, 191, 36, 0.008) 82%, rgba(251, 191, 36, 0) 100%);
  animation: circularMotion2 20s ease-in-out var(--orb-delay-motion2, 0s) infinite, glowBreath2 7.8s ease-in-out var(--orb-delay-glow2, 0s) infinite;
  animation-play-state: paused;
}

.bg-orb-layer {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle 250px at var(--orb3-x, 24%) var(--orb3-y, 74%), rgba(16, 185, 129, 0.13) 0%, rgba(16, 185, 129, 0.1) 22%, rgba(16, 185, 129, 0.055) 46%, rgba(16, 185, 129, 0.024) 66%, rgba(16, 185, 129, 0.009) 84%, rgba(16, 185, 129, 0) 100%);
  animation: circularMotion3 18s ease-in-out var(--orb-delay-motion3, 0s) infinite, glowBreath3 6.9s ease-in-out var(--orb-delay-glow3, 0s) infinite;
  animation-play-state: paused;
}

body.bg-animated::before,
body.bg-animated::after,
body.bg-animated .bg-orb-layer {
  animation-play-state: running;
}

@keyframes circularMotion1 {
  0% { transform: translate(0, 0); }
  25% { transform: translate(10vw, 5vh); }
  50% { transform: translate(12vw, 16vh); }
  75% { transform: translate(-4vw, 12vh); }
  100% { transform: translate(0, 0); }
}

@keyframes circularMotion2 {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-10vw, 6vh); }
  50% { transform: translate(-6vw, -10vh); }
  75% { transform: translate(4vw, -4vh); }
  100% { transform: translate(0, 0); }
}

@keyframes circularMotion3 {
  0% { transform: translate(0, 0); }
  25% { transform: translate(9vw, -8vh); }
  50% { transform: translate(14vw, -16vh); }
  75% { transform: translate(-3vw, -10vh); }
  100% { transform: translate(0, 0); }
}

@keyframes glowBreath1 {
  0%, 100% { opacity: 0.82; filter: blur(24px) saturate(0.94) brightness(0.96); }
  50% { opacity: 1; filter: blur(36px) saturate(1.15) brightness(1.12); }
}

@keyframes glowBreath2 {
  0%, 100% { opacity: 0.76; filter: blur(22px) saturate(0.9) brightness(0.94); }
  50% { opacity: 0.97; filter: blur(34px) saturate(1.18) brightness(1.1); }
}

@keyframes glowBreath3 {
  0%, 100% { opacity: 0.8; filter: blur(24px) saturate(0.92) brightness(0.95); }
  50% { opacity: 1; filter: blur(38px) saturate(1.2) brightness(1.13); }
}

body img {
  pointer-events: none;
  user-select: none;
  -moz-user-select: none;
  -webkit-user-drag: none;
}

.bg-animation-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 149, 246, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 149, 246, 0.2);
  transition: all 0.3s ease;
}

.bg-animation-toggle::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
  transition: all 0.25s ease;
}

.bg-animation-toggle:not(.active)::before {
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.bg-animation-toggle:not(.active)::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.9);
  transform: rotate(-35deg);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.bg-animation-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 48px 0 rgba(0, 149, 246, 0.3);
}

.bg-animation-toggle:active {
  transform: scale(0.95);
}

.bg-animation-toggle-icon {
  width: 30px;
  height: 30px;
  transition: transform 0.25s ease, color 0.25s ease, opacity 0.25s ease;
  color: #0284c7;
  stroke-width: 2.6;
  filter: drop-shadow(0 0 3px rgba(2, 132, 199, 0.35));
}

.bg-animation-toggle.active .bg-animation-toggle-icon {
  animation: pulse 1.8s ease-in-out infinite;
}

.bg-animation-toggle:not(.active) .bg-animation-toggle-icon {
  color: #64748b;
  opacity: 0.92;
  transform: scale(0.94);
  filter: none;
}

.bg-animation-toast {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 9998;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.2;
  color: #0b4a7a;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 149, 246, 0.25);
  box-shadow: 0 10px 30px rgba(0, 149, 246, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bg-animation-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.95; }
}

a, a:hover {
  text-decoration: none;
}

.container {
  padding: 8px 16px 80px;
  animation: fadeInUp 0.6s ease;
  max-width: 1200px;
  margin: 0 auto;
}

.activation-card {
  position: relative;
  margin: 56px auto 12px;
  max-width: 700px;
  min-width: 560px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 40px 32px 32px;
  text-align: center;
}

.order-query-card {
  margin-top: 56px;
}

.card-title {
  font-weight: 600;
  font-size: 24px;
  color: #101828;
  line-height: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.entry-intro {
  margin: -12px 0 24px;
  font-size: 14px;
  line-height: 22px;
  color: #475467;
  text-align: left;
}

.query-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.query-mode-tab {
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d8e4f2;
  background: rgba(255, 255, 255, 0.85);
  color: #344054;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.query-mode-tab:hover {
  border-color: #b6d5f3;
  color: #1d4f8f;
}

.query-mode-tab.active {
  border-color: #0095f6;
  background: rgba(0, 149, 246, 0.1);
  color: #0262a2;
  box-shadow: 0 0 0 2px rgba(0, 149, 246, 0.1);
}

.query-panel {
  display: none;
}

.query-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #101828;
  margin-bottom: 8px;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  color: #101828;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #0095f6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(0, 149, 246, 0.1);
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: #98a2b3;
}

input[type="email"].error,
input[type="text"].error {
  border-color: #f04438;
}

.error-text {
  font-size: 13px;
  color: #f04438;
  margin-top: 6px;
  display: none;
}

.error-text.show {
  display: block;
}

.btn-submit {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 149, 246, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 25px;
  border: 1px solid rgba(0, 149, 246, 0.6);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3), 0 8px 32px 0 rgba(0, 149, 246, 0.35);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover:not(:disabled) {
  border: 1px solid rgba(83, 177, 253, 0.7);
  background: rgba(83, 177, 253, 0.85);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 8px 32px 0 rgba(83, 177, 253, 0.45);
}

.btn-submit:active:not(:disabled) {
  border: 1px solid rgba(21, 123, 239, 0.55);
  background: rgba(21, 123, 239, 0.8);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), 0 4px 16px 0 rgba(21, 123, 239, 0.3);
}

.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-submit.loading {
  gap: 10px;
}

.btn-submit.loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  animation: spin 0.6s linear infinite;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .order-query-card {
    margin-top: 28px;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 560px) {
  .activation-card {
    min-width: calc(100vw - 24px);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (prefers-color-scheme: dark) {
  .bg-animation-toggle {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 8px 32px 0 rgba(2, 132, 199, 0.28);
  }

  .bg-animation-toggle:hover {
    box-shadow: 0 12px 48px 0 rgba(56, 189, 248, 0.32);
  }

  .bg-animation-toggle-icon {
    color: #7dd3fc;
    filter: drop-shadow(0 0 4px rgba(125, 211, 252, 0.3));
  }

  .bg-animation-toggle:not(.active)::before {
    background: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.22);
  }

  .bg-animation-toggle:not(.active)::after {
    background: rgba(248, 113, 113, 0.95);
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.35);
  }

  .bg-animation-toast {
    color: #cfefff;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.3);
  }

  body {
    background:
      radial-gradient(1200px 600px at 10% -10%, rgba(14, 116, 144, 0.35) 0%, rgba(14, 116, 144, 0) 60%),
      radial-gradient(900px 600px at 90% 10%, rgba(30, 64, 175, 0.35) 0%, rgba(30, 64, 175, 0) 55%),
      linear-gradient(180deg, #0b1020 0%, #0f172a 50%, #0b1020 100%);
    color: #e5e7eb;
  }

  .card-title,
  label {
    color: #e5e7eb;
  }

  .entry-intro {
    color: #9ca3af;
  }

  .query-mode-tab {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.9);
    color: #cbd5e1;
  }

  .query-mode-tab:hover {
    border-color: rgba(56, 189, 248, 0.5);
    color: #e2f6ff;
  }

  .query-mode-tab.active {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.18);
    color: #e0f2fe;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
  }

  .activation-card {
    background: rgba(17, 24, 39, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
  }

  input[type="email"],
  input[type="text"] {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
    color: #f9fafb;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  }

  input[type="email"]::placeholder,
  input[type="text"]::placeholder {
    color: #94a3b8;
  }

  input[type="email"]:focus,
  input[type="text"]:focus {
    border-color: #38bdf8;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(56, 189, 248, 0.2);
  }

  .btn-submit {
    background: rgba(14, 165, 233, 0.9);
    border: 1px solid rgba(14, 165, 233, 0.7);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 8px 32px 0 rgba(14, 165, 233, 0.3);
  }

  .btn-submit:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.8);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 8px 32px 0 rgba(56, 189, 248, 0.4);
  }

  .btn-submit:active:not(:disabled) {
    background: rgba(2, 132, 199, 0.9);
    border: 1px solid rgba(2, 132, 199, 0.7);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 16px 0 rgba(2, 132, 199, 0.35);
  }
}