:root {
  --bg: #f7faff;
  --bg2: #eef5ff;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(255, 255, 255, 0.94);
  --text: #111827;
  --muted: #667085;
  --soft: #98a2b3;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.15);
  --blue: #4f8cff;
  --blue-soft: rgba(79, 140, 255, 0.15);
  --navy: #111827;
  --navy2: #1f2937;
  --shadow: 0 34px 90px rgba(15, 23, 42, 0.13);
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.08);
  --button-shadow: 0 18px 38px rgba(17, 24, 39, 0.24);
  --radius: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 18% 12%,
      rgba(255, 255, 255, 1) 0,
      rgba(255, 255, 255, 0) 31%
    ),
    radial-gradient(
      circle at 82% 16%,
      rgba(194, 218, 255, 0.78) 0,
      rgba(194, 218, 255, 0) 28%
    ),
    radial-gradient(
      circle at 50% 96%,
      rgba(228, 240, 255, 0.92) 0,
      rgba(228, 240, 255, 0) 36%
    ),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 47%, var(--bg2) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(70px);
  z-index: 0;
}

body::before {
  width: 330px;
  height: 330px;
  left: -145px;
  top: 90px;
  background: rgba(177, 207, 255, 0.46);
}

body::after {
  width: 390px;
  height: 390px;
  right: -170px;
  bottom: -20px;
  background: rgba(255, 255, 255, 0.95);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 18px;
}

.auth-shell {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.brand-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeUp 0.7s ease both;
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.logo-wrap img {
  width: min(60vw, 248px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(15, 23, 42, 0.12));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.brand-copy span {
  color: #7c8aa0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.brand-copy strong {
  color: #233044;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 34px 28px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(255, 255, 255, 0.76)
    ),
    var(--glass);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: fadeUp 0.8s ease 0.06s both;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 40px 105px rgba(15, 23, 42, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.card-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -96px;
  top: -94px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(79, 140, 255, 0.18),
    rgba(79, 140, 255, 0)
  );
  pointer-events: none;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.78),
      rgba(255, 255, 255, 0) 36%
    ),
    linear-gradient(315deg, rgba(79, 140, 255, 0.1), rgba(79, 140, 255, 0) 40%);
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-head {
  margin-bottom: 24px;
  text-align: center;
}

.card-head p {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.card-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 33px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.field {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    background 0.24s ease,
    transform 0.24s ease;
}

.field:focus-within {
  border-color: rgba(79, 140, 255, 0.78);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 0 0 5px rgba(79, 140, 255, 0.16),
    0 16px 34px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.field-icon {
  width: 24px;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #52627a;
  opacity: 0.96;
}

.field-icon svg {
  width: 19px;
  height: 19px;
  display: block;
  stroke: currentColor;
}

.field input {
  width: 100%;
  height: 58px;
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.field input::placeholder {
  color: #9aa7ba;
  font-weight: 650;
}

.primary-btn,
.secondary-btn {
  width: 100%;
  height: 59px;
  padding: 0 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.03em;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.primary-btn {
  margin-top: 8px;
  color: #ffffff;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--navy2) 0%, var(--navy) 100%);
  box-shadow: var(--button-shadow);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(17, 24, 39, 0.28);
}

.secondary-btn {
  margin-top: 14px;
  color: #111827;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.secondary-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line-strong);
  box-shadow:
    0 18px 38px rgba(15, 23, 42, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.primary-btn:active,
.secondary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.notice-text {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  font-weight: 650;
  text-align: center;
  letter-spacing: -0.025em;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(255, 255, 255, 0.22),
      transparent 34%
    ),
    rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-box {
  width: 352px;
  max-width: calc(100% - 28px);
  padding: 27px 22px 22px;
  text-align: center;
  color: var(--text);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 34px 92px rgba(15, 23, 42, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  animation: popIn 0.3s ease both;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 2px auto 16px;
  border-radius: 999px;
  border: 4px solid rgba(15, 23, 42, 0.1);
  border-top-color: #111827;
  animation: spin 0.85s linear infinite;
}

.auth-title {
  margin: 4px 0 8px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.auth-msg {
  min-height: 20px;
  margin: 0;
  color: #52627a;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.auth-sub {
  margin-top: 9px;
  color: #9aa7ba;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 1024px) {
  .page {
    padding: 38px 24px;
  }

  .auth-shell {
    max-width: 486px;
    gap: 17px;
  }

  .logo-wrap img {
    width: 244px;
  }

  .card {
    padding: 35px 30px 26px;
  }
}

@media (max-width: 768px) {
  .page {
    align-items: flex-start;
    padding: 28px 15px;
  }

  .auth-shell {
    max-width: 100%;
    gap: 15px;
  }

  .logo-wrap img {
    width: min(52vw, 190px);
  }

  .brand-copy span {
    font-size: 11px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .card {
    padding: 30px 20px 22px;
    border-radius: 28px;
  }

  .card-head {
    margin-bottom: 21px;
  }

  .card-head h2 {
    font-size: 29px;
  }

  .field {
    min-height: 57px;
    padding: 0 15px;
    border-radius: 18px;
  }

  .field input {
    height: 55px;
    font-size: 15px;
  }

  .primary-btn,
  .secondary-btn {
    height: 56px;
    border-radius: 18px;
    font-size: 15.5px;
  }
}

@media (max-width: 480px) {
  body::before {
    width: 260px;
    height: 260px;
    left: -150px;
    top: 30px;
  }

  body::after {
    width: 290px;
    height: 290px;
    right: -175px;
    bottom: -30px;
  }

  .page {
    padding: 20px 12px;
  }

  .auth-shell {
    gap: 13px;
  }

  .logo-wrap img {
    width: min(50vw, 154px);
  }

  .brand-area {
    gap: 11px;
  }

  .brand-copy {
    gap: 4px;
  }

  .brand-copy span {
    font-size: 10px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .card {
    padding: 26px 16px 19px;
    border-radius: 25px;
  }

  .card-head {
    margin-bottom: 18px;
  }

  .card-head p {
    margin-bottom: 6px;
    font-size: 10.5px;
  }

  .card-head h2 {
    font-size: 25px;
  }

  .field {
    min-height: 54px;
    margin-bottom: 12px;
    padding: 0 14px;
    border-radius: 17px;
  }

  .field-icon {
    width: 22px;
    min-width: 22px;
  }

  .field-icon svg {
    width: 18px;
    height: 18px;
  }

  .field input {
    height: 52px;
    font-size: 14.5px;
  }

  .primary-btn,
  .secondary-btn {
    height: 53px;
    border-radius: 17px;
    font-size: 15px;
  }

  .secondary-btn {
    margin-top: 12px;
  }

  .notice-text {
    margin-top: 14px;
    font-size: 12px;
  }

  .auth-box {
    border-radius: 26px;
    padding: 24px 19px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
