:root {
  --bg: #0a0d0f;
  --panel: #12161a;
  --line: #30363c;
  --text: #ecece8;
  --muted: #858d92;
  --orange: #4da3ff;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input { font: inherit; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(420px, .9fr);
  width: 100vw;
  min-height: 100vh;
}

.auth-story {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 76px);
  background:
    linear-gradient(90deg, rgba(8,10,12,.92), rgba(8,10,12,.42)),
    url("https://i.ytimg.com/vi/e-ORhEE9VVg/maxresdefault.jpg") center/cover;
  border-right: 1px solid var(--line);
}

.back-link,
.auth-story small,
.eyebrow {
  color: var(--orange);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .13em;
  text-decoration: none;
}

.auth-story h1 {
  max-width: 820px;
  margin: 18px 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 7.2vw, 122px);
  font-style: italic;
  font-weight: 500;
  line-height: .88;
  letter-spacing: -.06em;
  text-shadow: 0 3px 30px rgba(0,0,0,.6);
}

.auth-story p {
  max-width: 500px;
  margin: 0;
  color: #c4c8c9;
  font-size: 16px;
  line-height: 1.5;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 80px);
  background:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
}

.auth-card {
  width: min(100%, 520px);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0,0,0,.45);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  height: 58px;
  color: var(--muted);
  background: #101418;
  border: 0;
  border-right: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
}

.auth-tabs button:last-child { border-right: 0; }
.auth-tabs button.active { color: var(--orange); background: #211a14; }

#signedOutView,
.signed-in-view { padding: clamp(30px, 4vw, 56px); }

#signedOutView header span,
.signed-in-view > span:not(.account-light) {
  color: var(--orange);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

#signedOutView h2,
.signed-in-view h2 {
  margin: 10px 0 34px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  letter-spacing: -.04em;
}

#authForm { display: grid; }

#authForm label {
  margin: 0 0 9px;
  color: #a8aeb1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
}

#authForm input {
  width: 100%;
  height: 54px;
  margin: 0 0 22px;
  padding: 0 15px;
  color: var(--text);
  background: #0c1013;
  border: 1px solid #3c444a;
  border-radius: 4px;
  outline: 0;
}

#authForm input:focus { border-color: var(--orange); }

.submit-auth,
.open-music,
.logout-button {
  display: grid;
  place-items: center;
  min-height: 54px;
  color: #fff;
  background: #241d17;
  border: 1px solid var(--orange);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
}

.submit-auth:disabled,
.logout-button:disabled { opacity: .55; cursor: wait; }

.auth-status {
  min-height: 20px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-status.error { color: #ff6f76; }
.auth-status.success { color: #54d993; }

.signed-in-view { text-align: center; }

.account-light {
  display: block;
  width: 10px;
  height: 10px;
  margin: 0 auto 16px;
  background: #54d993;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(84,217,147,.6);
}

.signed-in-view h2 {
  overflow-wrap: anywhere;
  margin-bottom: 28px;
}

.logout-button {
  width: 100%;
  margin-top: 12px;
  color: #aeb4b7;
  background: #171c20;
  border-color: #454d53;
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 42vh; }
  .auth-story h1 { font-size: clamp(50px, 14vw, 86px); }
  .auth-panel { min-height: 58vh; }
}
