:root {
  --bg: #07111f;
  --panel: rgba(18, 29, 49, 0.88);
  --panel-2: rgba(22, 35, 59, 0.9);
  --line: rgba(180, 217, 255, 0.12);
  --text: #eff6ff;
  --muted: #8ea1bb;
  --soft: #18263e;
  --accent: #5df2d6;
  --accent-2: #37b8ff;
  --accent-soft: rgba(93, 242, 214, 0.14);
  --danger: #ff8c8c;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] {
  --bg: #f7f8fc;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-2: #ffffff;
  --line: #e7eaf1;
  --text: #181b24;
  --muted: #707887;
  --soft: #f1f4f9;
  --accent: #ff8d6c;
  --accent-2: #ffb59f;
  --accent-soft: #fff2ed;
  --danger: #d9534f;
  --shadow: 0 18px 50px rgba(24, 27, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "SUIT", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(93, 242, 214, 0.16), transparent 26%),
    radial-gradient(circle at top right, rgba(55, 184, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #0e1a2e 0%, var(--bg) 100%);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at top right, rgba(255, 141, 108, 0.12), transparent 24%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 0.8fr);
}

.auth-shell-login {
  grid-template-columns: 1fr;
  place-items: center;
}

.auth-brand-pane {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px;
  background:
    linear-gradient(180deg, rgba(10, 20, 35, 0.82), rgba(7, 17, 31, 0.92)),
    radial-gradient(circle at top left, rgba(93, 242, 214, 0.18), transparent 28%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

:root[data-theme="light"] .auth-brand-pane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 248, 252, 0.94)),
    radial-gradient(circle at top right, rgba(255, 141, 108, 0.12), transparent 24%);
  border-right: 1px solid rgba(24, 27, 36, 0.06);
}

.auth-brand {
  display: grid;
  gap: 12px;
}

.auth-brand-mark {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.auth-brand-copy {
  max-width: 420px;
}

.auth-brand-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.auth-badge-grid {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.auth-badge {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .auth-badge {
  border: 1px solid rgba(24, 27, 36, 0.06);
  background: rgba(255, 255, 255, 0.9);
}

.auth-badge strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.auth-badge span {
  color: var(--muted);
  font-size: 13px;
}

.auth-form-pane {
  display: grid;
  place-items: center;
  padding: 36px;
}

.auth-form-pane-login {
  min-height: 100vh;
  width: 100%;
  padding: 36px;
}

.auth-card {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

:root[data-theme="light"] .auth-card {
  border: 1px solid rgba(24, 27, 36, 0.06);
}

.auth-card-logo {
  margin-bottom: 18px;
}

.auth-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.05em;
}

.auth-description {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.auth-social-block {
  margin-top: 24px;
}

.auth-social-label {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.auth-social-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.auth-social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

:root[data-theme="light"] .auth-social-button {
  border: 1px solid rgba(24, 27, 36, 0.08);
  background: #fff;
}

.auth-social-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.auth-social-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.auth-social-kakao {
  border-color: rgba(254, 229, 0, 0.2);
}

.auth-social-kakao .auth-social-icon {
  background: #fee500;
  color: #191600;
}

.auth-social-naver {
  border-color: rgba(45, 199, 109, 0.22);
}

.auth-social-naver .auth-social-icon {
  background: #2dc76d;
  color: #fff;
}

.auth-social-google {
  border-color: rgba(66, 133, 244, 0.22);
}

.auth-social-google .auth-social-icon {
  background: linear-gradient(135deg, #4285f4, #ea4335);
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-field {
  display: grid;
}

.auth-field input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

:root[data-theme="light"] .auth-field input {
  border: 1px solid rgba(24, 27, 36, 0.08);
  background: #fff;
}

.auth-field input:focus {
  border-color: rgba(93, 242, 214, 0.42);
  box-shadow: 0 0 0 4px rgba(93, 242, 214, 0.12);
}

:root[data-theme="light"] .auth-field input:focus {
  border-color: rgba(255, 141, 108, 0.42);
  box-shadow: 0 0 0 4px rgba(255, 141, 108, 0.12);
}

.auth-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -2px;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

:root[data-theme="light"] .auth-check input {
  border-color: rgba(24, 27, 36, 0.12);
  background: #fff;
}

.auth-check input::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #041019;
  border-bottom: 2px solid #041019;
  transform: rotate(-45deg) scale(0.2);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.auth-check input:hover {
  transform: translateY(-1px);
  border-color: rgba(93, 242, 214, 0.32);
}

:root[data-theme="light"] .auth-check input:hover {
  border-color: rgba(255, 141, 108, 0.32);
}

.auth-check input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(93, 242, 214, 0.12);
}

:root[data-theme="light"] .auth-check input:focus-visible {
  box-shadow: 0 0 0 4px rgba(255, 141, 108, 0.12);
}

.auth-check input:checked {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.auth-check input:checked::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

:root[data-theme="light"] .auth-check input:checked::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}

.auth-terms {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="light"] .auth-terms {
  border: 1px solid rgba(24, 27, 36, 0.08);
  background: #fbfcff;
}

.auth-terms-title {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.auth-check-terms {
  justify-content: flex-start;
  color: var(--text);
  font-size: 14px;
}

.auth-check-all {
  padding-bottom: 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .auth-check-all {
  border-bottom: 1px solid rgba(24, 27, 36, 0.08);
}

.auth-notice-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.auth-notice-list li + li {
  margin-top: 4px;
}

.auth-submit {
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041019;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.auth-message {
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.auth-message[data-state="error"] {
  color: var(--danger);
}

.auth-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.auth-meta a {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-pane {
    gap: 28px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  :root[data-theme="light"] .auth-brand-pane {
    border-bottom: 1px solid rgba(24, 27, 36, 0.06);
  }
}

@media (max-width: 640px) {
  .auth-brand-pane,
  .auth-form-pane {
    padding: 22px;
  }

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

  .auth-meta {
    flex-direction: column;
  }
}
