:root {
  --violet-900: #4b2c7d;
  --violet-800: #5f35a2;
  --violet-700: #6f43c1;
  --violet-500: #9b7cf2;
  --yellow-400: #ffd84f;
  --yellow-300: #ffe78d;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --text: #201433;
  --muted: #5f5a73;
  --line: rgba(95, 53, 162, 0.14);
  --shadow: 0 24px 70px rgba(61, 34, 112, 0.2);
}

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

body {
  font-family:
    'Avenir Next', 'Avenir', 'SF Pro Display', 'Segoe UI', sans-serif;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 79, 0.26), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(255, 234, 166, 0.15), transparent 22%),
    linear-gradient(135deg, #5f35a2 0%, #7a46d9 45%, #8c5df2 100%);
  background-size: 140% 140%;
  animation: bodyGlow 18s ease-in-out infinite;
  overflow: hidden;
}

.login-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-orb,
.scene-wave,
.scene-spark {
  position: absolute;
  pointer-events: none;
}

.scene-orb {
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.38;
  animation: orbFloat 16s ease-in-out infinite;
}

.orb-a {
  width: 420px;
  height: 420px;
  top: -70px;
  left: -100px;
  background: radial-gradient(circle, rgba(255, 223, 117, 0.75), rgba(255, 223, 117, 0));
}

.orb-b {
  width: 340px;
  height: 340px;
  right: -80px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(255, 243, 193, 0.45), rgba(255, 243, 193, 0));
  animation-delay: -6s;
}

.scene-wave {
  left: -10%;
  width: 120%;
  height: 200px;
  border-radius: 48% 52% 0 0 / 100% 100% 0 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 216, 79, 0.08));
  filter: blur(10px);
  opacity: 0.5;
}

.wave-a {
  bottom: 12%;
  animation: waveDrift 18s ease-in-out infinite;
}

.wave-b {
  bottom: -2%;
  height: 240px;
  opacity: 0.36;
  animation: waveDrift 23s ease-in-out infinite reverse;
}

.scene-spark {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 216, 79, 0.2), rgba(255, 216, 79, 0.02) 55%, transparent 72%);
  filter: blur(6px);
  opacity: 0.45;
}

.spark-a {
  top: 12%;
  right: 16%;
  animation: sparkPulse 10s ease-in-out infinite;
}

.spark-b {
  bottom: 14%;
  left: 10%;
  width: 160px;
  height: 160px;
  opacity: 0.28;
  animation: sparkPulse 14s ease-in-out infinite -3s;
}

.auth-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.auth-card {
  width: min(1080px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-visual {
  position: relative;
  padding: 52px 52px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.17), transparent 20%),
    linear-gradient(180deg, rgba(88, 48, 154, 0.3) 0%, rgba(67, 35, 126, 0.2) 100%);
}

.auth-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 216, 79, 0.16);
  border: 1px solid rgba(255, 216, 79, 0.38);
  color: #fff4b0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-logo {
  width: min(430px, 88%);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(28, 10, 64, 0.28));
}

.auth-visual h1 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  color: #fff;
  max-width: 560px;
}

.auth-lead {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.auth-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.highlight-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.auth-panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  padding: 48px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-header {
  margin-bottom: 26px;
}

.auth-kicker {
  color: var(--violet-800);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.auth-header h2 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  color: var(--violet-900);
  margin-bottom: 12px;
}

.auth-header p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-body {
  display: flex;
  flex-direction: column;
}

.login-btn {
  width: 100%;
  padding: 16px 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-btn.google-btn {
  background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
  color: var(--text);
  border: 1px solid rgba(95, 53, 162, 0.16);
  box-shadow: 0 12px 28px rgba(86, 56, 147, 0.1);
}

.login-btn.google-btn:hover {
  border-color: rgba(95, 53, 162, 0.3);
  box-shadow: 0 18px 32px rgba(86, 56, 147, 0.16);
}

.google-icon {
  width: 22px;
  height: 22px;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-footer p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.error-message {
  background: rgba(255, 89, 89, 0.1);
  color: #a62828;
  border: 1px solid rgba(214, 73, 73, 0.18);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  display: none;
}

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

.loading {
  opacity: 0.7;
  pointer-events: none;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -14px, 0) scale(1.04);
  }
}

@keyframes waveDrift {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-2%) translateY(10px);
  }
}

@keyframes sparkPulse {
  0%,
  100% {
    transform: scale(1) translate3d(0, 0, 0);
    opacity: 0.22;
  }
  50% {
    transform: scale(1.12) translate3d(12px, -8px, 0);
    opacity: 0.45;
  }
}

@keyframes bodyGlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (max-width: 920px) {
  .auth-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-visual,
  .auth-panel {
    padding: 34px 24px;
  }

  .auth-logo {
    width: min(320px, 90%);
  }
}

@media (max-width: 560px) {
  .auth-container {
    padding: 16px;
  }

  .auth-card {
    border-radius: 24px;
  }

  .auth-visual,
  .auth-panel {
    padding: 26px 18px;
  }

  .auth-highlights {
    gap: 8px;
  }

  .highlight-chip {
    font-size: 12px;
    padding: 8px 12px;
  }
}

@media (max-width: 920px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .auth-container {
    min-height: 100svh;
    align-items: flex-start;
    padding-top: 18px;
    padding-bottom: 28px;
  }

  .auth-card {
    max-width: 620px;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .auth-container {
    padding: 10px 12px 22px;
  }

  .auth-visual {
    padding: 18px 16px 16px;
    gap: 10px;
  }

  .auth-badge {
    padding: 7px 11px;
    font-size: 10px;
  }

  .auth-logo {
    width: min(210px, 72%);
  }

  .auth-visual h1 {
    font-size: clamp(24px, 8vw, 32px);
  }

  .auth-lead {
    font-size: 14px;
    line-height: 1.35;
  }

  .auth-highlights {
    margin-top: 2px;
  }

  .highlight-chip {
    font-size: 11px;
    padding: 7px 10px;
  }

  .auth-panel {
    padding: 18px 16px 20px;
  }

  .auth-header {
    margin-bottom: 16px;
  }

  .auth-header h2 {
    font-size: clamp(24px, 8vw, 30px);
    margin-bottom: 8px;
  }

  .auth-header p {
    font-size: 14px;
    line-height: 1.4;
  }

  .login-btn {
    min-height: 50px;
    padding: 13px 16px;
  }

  .auth-footer {
    margin-top: 14px;
    padding-top: 12px;
  }
}
