* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f8fafc;
  color: #1f2937;
}

a {
  color: #2563eb;
}

a:hover {
  color: #1d4ed8;
}

body {
  font-family: "Noto Sans KR", "Segoe UI", sans-serif;
  line-height: 1.6;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
  max-width: 72rem;
}

.text-center {
  text-align: center;
}

.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  cursor: pointer;
  font: inherit;
}

.btn-primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.btn-outline-danger {
  border-color: #dc2626;
  background: transparent;
  color: #dc2626;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.navbar {
  padding: 1rem 0;
  background: #ffffff;
}

.navbar .container,
.navbar-nav {
  display: flex;
  align-items: center;
}

.navbar .container {
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-nav {
  gap: 1rem;
}

.navbar-brand,
.nav-link {
  text-decoration: none;
}

.footer {
  margin-top: auto;
  padding: 1.5rem 0;
  background: #ffffff;
}

.home-hero {
  max-width: 48rem;
  margin: 5rem auto;
  padding: 3rem 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.08);
}

.home-hero__eyebrow {
  margin-bottom: 0.75rem;
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-hero__title {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
}

.home-hero__description {
  margin-bottom: 0;
  color: #64748b;
}

.home-hero a {
  font-size: 2em;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: start center;
  padding: clamp(5rem, 14vh, 9rem) 1.5rem 3rem;
  background: #ffffff;
}

.login-panel {
  width: min(100%, 26rem);
}

.login-brand {
  margin: 0 0 1.5rem;
  color: #2563eb;
  font-size: 2rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.login-title {
  margin-bottom: 2rem;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 700;
}

.login-description {
  margin-bottom: 2rem;
  color: #64748b;
}

.login-form {
  display: grid;
  gap: 1.25rem;
}

.login-field {
  display: grid;
  gap: 0.5rem;
  text-align: left;
}

.login-field label {
  color: #111827;
  font-size: 0.875rem;
  font-weight: 700;
}

.login-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  color: #111827;
  font: inherit;
}

.login-field input:focus {
  border-color: #2563eb;
  outline: 3px solid rgba(37, 99, 235, 0.15);
}

.login-submit {
  min-height: 3rem;
  border: 0;
  border-radius: 0.25rem;
  background: #3562e8;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-access-token {
  min-height: 3rem;
  border: 1px solid #3562e8;
  border-radius: 0.25rem;
  background: #ffffff;
  color: #3562e8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.login-access-token:hover:not(:disabled) {
  background: #eff6ff;
}

.login-submit:hover:not(:disabled) {
  background: #1d4ed8;
}

.login-secondary-button {
  display: grid;
  min-height: 3rem;
  place-items: center;
  border: 1px solid #3562e8;
  border-radius: 0.25rem;
  color: #3562e8;
  font-weight: 700;
  text-decoration: none;
}

.login-secondary-button:hover {
  background: #eff6ff;
}

.login-user-info {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.25rem;
  background: #f8fafc;
  color: #334155;
  line-height: 1.8;
}

.login-user-info p {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.login-submit:disabled,
.login-access-token:disabled {
  cursor: wait;
  opacity: 0.7;
}

.login-status {
  min-height: 1.6rem;
  margin: 0;
  font-weight: 600;
}

.login-status--success {
  color: #15803d;
}

.login-status--error {
  color: #b91c1c;
}

.chat-example {
  max-width: 42rem;
  margin: 3rem auto;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
}

.chat-example__eyebrow {
  margin-bottom: 0.5rem;
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 700;
}

.chat-example__description,
.chat-example__status {
  color: #64748b;
}

.chat-example__connection,
.chat-example__message-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.chat-example input {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  font: inherit;
}

.chat-example__connection {
  grid-template-columns: 1fr;
}

.chat-example__actions,
.chat-example__message-form {
  grid-template-columns: 1fr auto;
}

.chat-example__messages {
  height: 18rem;
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #f8fafc;
}

.chat-example__messages li + li {
  margin-top: 0.5rem;
}

@media (max-width: 48rem) {
  .home-hero {
    margin: 2rem auto;
    padding: 2rem 1.5rem;
  }
}
