@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #071226;
  --bg-soft: #0d1b34;
  --surface: #ffffff;
  --primary: #2f6df6;
  --primary-dark: #1f4ed8;
  --secondary: #22d3ee;
  --accent: #f8b84e;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe4f0;
  --success: #0f766e;
  --error: #b42318;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.24);
}

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

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at 20% 16%, rgba(34, 211, 238, 0.23), transparent 26%),
    radial-gradient(circle at 82% 10%, rgba(248, 184, 78, 0.18), transparent 24%),
    linear-gradient(135deg, #071226, #0d1b34 58%, #071226);
}

button,
input,
select,
textarea {
  font: inherit;
}

.auth-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 28px;
  align-items: start;
}

.auth-intro,
.auth-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-intro {
  position: sticky;
  top: 32px;
  padding: 34px;
}

.auth-card {
  padding: 28px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #eaf1ff;
  font-size: 14px;
  font-weight: 800;
}

.auth-intro h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-intro p:last-child {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: #eef4ff;
}

.account-tab {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  color: #334155;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.account-tab i {
  margin-right: 8px;
}

.account-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #65a8ff);
  box-shadow: 0 16px 32px rgba(47, 109, 246, 0.28);
}

.account-tab:hover {
  transform: translateY(-1px);
}

.form-message {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}

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

.form-message.error {
  color: var(--error);
  background: #fff1f0;
}

.form-message.info {
  color: var(--primary-dark);
  background: #eaf1ff;
}

.register-form {
  display: none;
  margin-top: 22px;
}

.register-form.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.input-group,
.upload-placeholder {
  min-width: 0;
}

.input-group label,
.terms label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-group textarea {
  resize: vertical;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.14);
}

.password-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.password-row input {
  flex: 1;
}

.toggle-password {
  min-width: 64px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 800;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  grid-column: 1 / -1;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px dashed #9db8ff;
  border-radius: 18px;
  color: #334155;
  background: #f8fbff;
}

.upload-placeholder i {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  color: var(--primary);
  background: #eaf1ff;
}

.upload-placeholder strong,
.upload-placeholder span {
  display: block;
}

.upload-placeholder span {
  color: var(--muted);
  font-size: 14px;
}

.full-width {
  grid-column: 1 / -1;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
}

.terms input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.terms label {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.submit-btn {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #65a8ff);
  box-shadow: 0 18px 40px rgba(47, 109, 246, 0.32);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover,
.social-btn:hover {
  transform: translateY(-2px);
}

.submit-btn:hover {
  box-shadow: 0 24px 50px rgba(47, 109, 246, 0.4);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.social-btn {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-btn i,
.social-btn span {
  margin-right: 8px;
}

.social-btn:hover {
  border-color: #b8c7e3;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.social-btn.kakao span {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 6px;
  color: #3a1d1d;
  background: #fee500;
  font-size: 12px;
}

.switch {
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
}

.switch a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

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

  .auth-intro {
    position: static;
  }
}

@media (max-width: 680px) {
  .auth-page {
    width: min(100% - 28px, 1180px);
    padding: 22px 0;
  }

  .auth-intro,
  .auth-card {
    padding: 22px;
    border-radius: 22px;
  }

  .form-grid,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .account-tabs {
    grid-template-columns: 1fr;
  }

  .password-row {
    align-items: stretch;
    flex-direction: column;
  }
}
