/* JEE Duel: login and signup (replaces login.css and signup.css) */
:root {
  --bg: #0e1116;
  --surface: #171b22;
  --border: #262c36;
  --border-strong: #3a4250;
  --text: #f2f4f7;
  --muted: #9aa4b2;
  --accent: #ffb547;
  --rival: #5cd6e0;
  --bad: #ff6b6b;
  --font-body: Inter, system-ui, sans-serif;
  --font-display: "Space Grotesk", Inter, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--muted); text-decoration: none; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.hidden { display: none; }

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
}

/* ---------- form side ---------- */
.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: clamp(24px, 5vw, 64px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 23px;
  color: var(--text);
}
.brand::before { content: ""; width: 14px; height: 14px; background: var(--accent); }
.auth-main h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.1;
}
.tagline { margin: 0; color: var(--muted); }

form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field-label { font-size: 17px; color: var(--muted); }
.hint { font-size: 16px; color: var(--muted); }

input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: 400 19px var(--font-body);
}
input[type="text"]:focus, input[type="password"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
input:user-invalid { border-color: var(--bad); }

.input-wrapper { position: relative; }
.input-wrapper input { padding-right: 48px; }
.eyeicon {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
}
.eyeicon:hover { color: var(--text); }

/* class picker: same tiles as the home page */
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; }
.classes input { position: absolute; opacity: 0; pointer-events: none; }
.classes label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.classes label:hover { border-color: var(--muted); }
.classes input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.classes input:focus-visible + label { outline: 2px solid var(--text); outline-offset: 2px; }

.submit {
  min-height: 48px;
  margin-top: 4px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  font: 600 19px var(--font-body);
  cursor: pointer;
}
.submit:hover { filter: brightness(1.08); }

.alt { margin: 0; font-size: 18px; color: var(--muted); }
.alt a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.links { display: flex; gap: 20px; font-size: 17px; }

/* ---------- quote side ---------- */
.quotes {
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 96px);
  background: var(--surface);
  border-left: 1px solid var(--border);
}
.quote { display: none; max-width: 620px; margin: 0; }
.quote.on { display: block; animation: quote-in 0.5s ease both; }
.quote .subject { display: inline-block; margin-bottom: 20px; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 16px; color: var(--muted); }
.quote.math .subject { color: var(--accent); border-color: var(--accent); }
.quote.phy .subject { color: var(--rival); border-color: var(--rival); }
.quote.chem .subject { color: var(--text); }
.quote blockquote { margin: 0 0 20px; font-family: var(--font-display); font-size: clamp(18px, 2vw, 24px); line-height: 1.5; font-weight: 500; }
.quote figcaption { color: var(--muted); font-size: 18px; }
@keyframes quote-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .quotes { display: none; }
}
@media (prefers-reduced-motion: reduce) { .quote.on { animation: none; } }

.error { margin: 0; padding: 12px 14px; border: 1px solid var(--bad); border-radius: 8px;
        background: rgba(255,107,107,.08); color: var(--bad); font-size: 17px; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%      { transform: translateX(-10px); }
  30%      { transform: translateX(9px); }
  45%      { transform: translateX(-7px); }
  60%      { transform: translateX(5px); }
  75%      { transform: translateX(-3px); }
  90%      { transform: translateX(2px); }
}

.auth-main.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@media (prefers-reduced-motion: reduce) {
  .auth-main.shake { animation: none; }
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  font-size: 16px !important;
  font-family: inherit !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  -webkit-box-shadow: 0 0 0 1000px #0f1217 inset !important;
  transition: background-color 9999s ease-in-out 0s;
}