:root {
  color-scheme: dark;
  --foreground: #f1f1f1;
  --muted: #b9b9c4;
  --accent: #ff7a00;
  --accent-strong: #ff9431;
  --danger: #ff6b6b;
  --card: rgba(8, 9, 20, 0.78);
  --field: rgba(255, 255, 255, 0.06);
  --field-border: rgba(255, 255, 255, 0.16);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px 16px;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--foreground);
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url("/ezoterist-bg-landscape.png") center / cover no-repeat fixed;
}

@media (orientation: portrait) {
  body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url("/ezoterist-bg.png");
  }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  border: 2px solid rgba(255, 122, 0, 0.55);
  border-radius: 22px;
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

h1 {
  margin: 22px 0 6px;
  font-size: 1.7rem;
  font-weight: 800;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 999px;
  background: var(--field);
}

.auth-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--accent);
}

.google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  color: #1f1f1f;
  background: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s;
}

.google-button:hover { background: #ececec; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

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

.auth-message {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--danger);
  border-radius: 10px;
  color: var(--danger);
  background: rgba(255, 107, 107, 0.1);
  font-size: 0.92rem;
}

.auth-message[data-type="success"] {
  border-color: #4fd18b;
  color: #7be3aa;
  background: rgba(79, 209, 139, 0.1);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  color: var(--foreground);
  background: var(--field);
  font: inherit;
  font-size: 1rem;
}

.auth-form input::placeholder { color: rgba(255, 255, 255, 0.35); }

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.25);
}

.auth-submit {
  margin-top: 6px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-submit:hover { background: var(--accent-strong); }
.auth-submit:disabled { opacity: 0.6; cursor: progress; }

.auth-switch {
  margin: 20px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

.auth-switch a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; border-radius: 18px; }
  h1 { font-size: 1.5rem; }
}

.auth-forgot,
.auth-link-button {
  align-self: flex-end;
  margin-top: -4px;
  padding: 0;
  border: 0;
  color: var(--accent-strong);
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.auth-link-button { align-self: center; margin-top: 0; }

.auth-forgot:hover,
.auth-link-button:hover { text-decoration: underline; }
.auth-link-button:disabled { opacity: 0.6; cursor: progress; }

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -4px;
}

.auth-options .auth-forgot { margin-top: 0; }

.auth-form .auth-remember {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
}

.auth-form .auth-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-back {
  position: fixed;
  z-index: 2;
  top: 16px;
  left: 16px;
  padding: 8px 16px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  font-weight: 700;
  text-decoration: none;
}

.auth-back:hover { background: rgba(255, 122, 0, 0.3); }

@media (max-width: 480px) {
  body { padding-top: 68px; }
}
