/* =========================
   Theme
========================= */

:root {
  --bg: #0b0d10;
  --surface: #11151a;
  --surface-hover: #171c22;
  --border: #252b33;

  --text: #f4f7fa;
  --muted: #9ba5b1;

  --accent: #ffffff;
  --accent-text: #0b0d10;

  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-hover: #f0f2f5;
  --border: #dce1e7;

  --text: #11151a;
  --muted: #65707c;

  --accent: #11151a;
  --accent-text: #ffffff;

  --shadow: 0 24px 70px rgba(20, 30, 40, 0.12);
}

[hidden] {
  display: none !important;
}


/* =========================
   Reset
========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  line-height: 1.6;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

button,
a {
  font: inherit;
}

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


/* =========================
   Layout
========================= */

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}


/* =========================
   Header
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;

  background: color-mix(
    in srgb,
    var(--bg) 92%,
    transparent
  );

  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;

  width: 34px;
  height: 34px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--surface);

  font-size: 0.9rem;
  font-weight: 800;
}

.brand-name {
  font-size: 1rem;
}


/* =========================
   Theme Toggle
========================= */

.theme-toggle {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--surface);
  color: var(--text);

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}


/* =========================
   Authentication Page
========================= */

.auth-page {
  min-height: calc(100vh - 72px - 180px);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 80px 20px;
}

.auth-card {
  width: min(460px, 100%);

  padding: 42px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--surface);

  box-shadow: var(--shadow);

  text-align: center;
}


/* =========================
   Auth Logo
========================= */

.auth-logo {
  width: 64px;
  height: 64px;

  display: grid;
  place-items: center;

  margin: 0 auto 24px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--bg);

  font-size: 1.25rem;
  font-weight: 800;
}


/* =========================
   Auth Heading
========================= */

.auth-eyebrow {
  margin-bottom: 12px;

  color: var(--muted);

  font-size: 0.72rem;
  font-weight: 800;

  letter-spacing: 0.12em;
}

.auth-card h1 {
  margin-bottom: 14px;

  font-size: clamp(1.8rem, 4vw, 2.35rem);

  line-height: 1.15;
  letter-spacing: -0.04em;
}

.auth-description {
  max-width: 370px;

  margin: 0 auto 30px;

  color: var(--muted);

  font-size: 0.95rem;
}


/* =========================
   GitHub Button
========================= */

.github-button {
  width: 100%;
  min-height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  border: 1px solid var(--accent);
  border-radius: 11px;

  background: var(--accent);
  color: var(--accent-text);

  font-size: 0.95rem;
  font-weight: 750;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.github-button:hover {
  transform: translateY(-1px);
  opacity: 0.92;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.16);
}

.github-button:active {
  transform: translateY(0);
}

.github-button:focus-visible {
  outline: 3px solid var(--muted);
  outline-offset: 3px;
}

.github-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}


/* =========================
   Divider
========================= */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;

  margin: 28px 0 20px;

  color: var(--muted);

  font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";

  flex: 1;

  height: 1px;

  background: var(--border);
}


/* =========================
   Auth Note
========================= */

.auth-note {
  color: var(--muted);

  font-size: 0.76rem;
  line-height: 1.55;
}


/* =========================
   Back Link
========================= */

.back-link {
  display: inline-block;

  margin-top: 26px;

  color: var(--muted);

  font-size: 0.85rem;
  font-weight: 650;

  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--text);
}


/* =========================
   Footer
========================= */

.site-footer {
  padding: 38px 0;

  border-top: 1px solid var(--border);

  color: var(--muted);

  font-size: 0.82rem;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  color: var(--text);
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-left: auto;
}


/* =========================
   Responsive
========================= */

@media (max-width: 600px) {

  .container {
    width: min(100% - 28px, 1120px);
  }

  .auth-page {
    min-height: calc(100vh - 72px - 220px);
    padding: 48px 14px;
  }

  .auth-card {
    padding: 32px 22px;
    border-radius: 16px;
  }

  .auth-logo {
    width: 56px;
    height: 56px;

    margin-bottom: 20px;

    border-radius: 14px;
  }

  .auth-card h1 {
    font-size: 1.8rem;
  }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-copy {
    margin-left: 0;
  }
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.github-button {
  width: 100%;
  min-height: 52px;

  border: 1px solid var(--accent);
  border-radius: 11px;

  background: var(--accent);
  color: var(--accent-text);

  font-size: 0.95rem;
  font-weight: 750;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.github-button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.github-button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.github-button.secondary:hover {
  background: var(--surface-hover);
}
}

.auth-message {
  margin: -12px 0 20px;
  color: var(--text);
  font-size: 0.9rem;
}

.auth-message.error {
  color: #ff7777;
}

.github-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.github-button[hidden] {
  display: none;
}