/* Login and sign-up, in the home page's look: near-black, Onest, a bold line
   with a light second half, white pill buttons, lines you can barely see.
   Replaces login.css on login.melodreams.com. Every id and class the login
   scripts use is kept; this file only decides how they look. */

@import url("https://fonts.melodreams.com/css/fonts.css");

:root {
  --bg: #05060b;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.56);
  --dim: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.07);
  --field: rgba(255, 255, 255, 0.04);
  --field-line: rgba(255, 255, 255, 0.09);
  --accent: #fff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  min-height: 100vh; min-height: 100dvh;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; }
.hidden, [hidden] { display: none !important; }

/* ---- layout: frames on the left, the form on the right ---- */

.lx { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
@media (min-width: 1000px) { .lx { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }

.lx-art { position: relative; display: none; overflow: hidden; border-right: 1px solid var(--line); background: #030407; }
@media (min-width: 1000px) { .lx-art { display: block; position: sticky; top: 0; height: 100vh; height: 100dvh; } }
.lx-art__cols { position: absolute; inset: -12% -8%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; rotate: -7deg; }
.lx-art__col { display: flex; flex-direction: column; gap: 16px; animation: lxRise 90s linear infinite; }
.lx-art__col--b { animation-name: lxFall; animation-duration: 110s; }
.lx-art__col--c { animation-duration: 75s; }
.lx-art__col img { display: block; width: 100%; height: auto; border-radius: 14px; opacity: 0.8; box-shadow: inset 0 0 0 1px var(--line); }
@keyframes lxRise { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }
@keyframes lxFall { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0, 0); } }
.lx-art__veil { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(3, 4, 7, 0.55) 0%, rgba(3, 4, 7, 0.1) 30%, rgba(3, 4, 7, 0.25) 60%, rgba(3, 4, 7, 0.94) 100%),
  linear-gradient(90deg, rgba(3, 4, 7, 0) 70%, rgba(5, 6, 11, 0.7) 100%); }
.lx-art__line { position: absolute; left: clamp(32px, 5vw, 64px); bottom: clamp(36px, 7vh, 72px); margin: 0;
  font-size: clamp(40px, 4.2vw, 64px); font-weight: 800; letter-spacing: -0.065em; line-height: 0.92; }
.lx-art__line em { display: block; font-style: normal; font-weight: 300; color: rgba(255, 255, 255, 0.55); }

.lx-main { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 0 clamp(20px, 4vw, 48px); }
.lx-top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.lx-brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 650; letter-spacing: -0.02em; text-decoration: none; }
.lx-brand img { width: 22px; height: 22px; }
.lx-top__link { font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.lx-top__link:hover { color: #fff; }
.lx-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0 48px; }
.lx-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 22px 0 26px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--dim); }
.lx-foot__links { display: flex; gap: 20px; }
.lx-foot a { color: var(--dim); text-decoration: none; transition: color 0.2s ease; }
.lx-foot a:hover { color: #fff; }
.lx-foot__tip { margin: 0; }

/* ---- the form column ---- */

.card { width: min(380px, 100%); animation: lxIn 0.9s var(--ease) both; }
@keyframes lxIn { from { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.brand { margin-bottom: 30px; }
.lx-title { margin: 0; font-size: clamp(40px, 4vw, 52px); font-weight: 800; letter-spacing: -0.065em; line-height: 0.95; }
.lx-title em { font-style: normal; font-weight: 300; color: rgba(255, 255, 255, 0.5); }
.brand-title--signup { display: none; }
#auth-card:has(#panel-login.hidden) .brand-title--login { display: none; }
#auth-card:has(#panel-login.hidden) .brand-title--signup { display: block; }
.switcher { display: none !important; }

.panel { animation: lxStep 0.5s var(--ease) both; }

/* fields */
.field { position: relative; margin: 0 0 10px; }
.input {
  display: block; width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid var(--field-line); border-radius: 14px; background: var(--field);
  color: #fff; font: inherit; font-size: 15px; outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: rgba(255, 255, 255, 0.3); }
.input:hover { border-color: rgba(255, 255, 255, 0.14); }
.input:focus { border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.06); }
.input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #12131a inset; caret-color: #fff; }
.field:has(.icon-btn) .input { padding-right: 50px; }
.field--two-btns .input { padding-right: 88px !important; }
.field.has-error .input { border-color: rgba(248, 113, 113, 0.6); }
.field.has-success .input { border-color: rgba(74, 222, 128, 0.5); }
.field .icon { display: none; }

.field--prefix .lx-prefix { position: absolute; left: 16px; top: 50%; translate: 0 -50%; font-size: 15px; color: rgba(255, 255, 255, 0.4); pointer-events: none; }
.field--prefix .input { padding-left: 82px; }

/* .field in front: cookies.css has a global .toggle of its own */
.field .icon-btn {
  position: absolute; top: 50%; right: 9px; translate: 0 -50%;
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, 0.45);
  font-size: 14px; cursor: pointer; transition: color 0.2s ease, background-color 0.2s ease;
}
.field .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.icon-btn:focus-visible, .btn:focus-visible, .social__btn:focus-visible, .lx a:focus-visible { outline: 2px solid #8ab6ff; outline-offset: 2px; }
.field--two-btns .generate-password { right: 45px; }
.check-username { color: rgba(255, 255, 255, 0.45); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 2px 4px; font-size: 13.5px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); cursor: pointer; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #fff; cursor: pointer; }
.link-blue { color: #fff; font-weight: 500; text-decoration: none; opacity: 0.85; }
.link-blue:hover { opacity: 1; }

.lx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lx-turnstile { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.lx-turnstile:empty { margin: 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 50px; padding: 0 22px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn.primary { margin-top: 20px; background: #fff; color: #06070d; }
.btn.primary:hover:not(:disabled) { opacity: 0.88; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.35 !important; cursor: default; }
#login-form .btn.primary { opacity: 1; }

/* messages */
.form-msg { margin: 12px 0 0; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.form-msg:empty { display: none; }
.form-msg.error { background: rgba(248, 113, 113, 0.09); color: #fca5a5; }
.form-msg.success { background: rgba(74, 222, 128, 0.08); color: #86efac; }
.form-msg.warning { background: rgba(251, 191, 36, 0.08); color: #fcd34d; }
.form-msg.info { background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.form-msg i { margin-right: 6px; }
.form-msg strong { color: #fff; }
.notice { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

.lx-switch { margin: 22px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.switch-to { margin-left: 4px; color: #fff; font-weight: 600; text-decoration: none; cursor: pointer; }
.switch-to:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- social buttons ---- */
.social { margin: 0 0 4px; }
.social__list { display: flex; flex-direction: column; gap: 8px; }
.social__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 18px;
  border: 1px solid var(--field-line); border-radius: 999px; background: transparent;
  color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.social__btn:hover { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.18); }
.social__btn svg { flex: 0 0 auto; }
.social__or { display: flex; align-items: center; gap: 14px; margin: 20px 0 18px; font-size: 12.5px; color: var(--dim); }
.social__or::before, .social__or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---- sign-up wizard ---- */
.signup-paid-notice { margin: -14px 0 22px; font-size: 14px; color: var(--muted); }
.signup-paid-notice strong { color: #fff; font-weight: 600; }
.signup-paid-notice i { display: none; }

.wiz-progress { display: flex; gap: 6px; margin: 0 0 26px; }
.wiz-dot { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); transition: background-color 0.4s ease; }
.wiz-dot.is-done { background: rgba(255, 255, 255, 0.42); }
.wiz-dot.is-active { background: #fff; }

.wiz-step { display: none; }
.wiz-step.is-active { display: block; animation: lxStep 0.5s var(--ease) both; }
@keyframes lxStep { from { opacity: 0; transform: translate3d(14px, 0, 0); } to { opacity: 1; transform: none; } }
.wiz-title { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -0.045em; line-height: 1.15; }
.wiz-sub { margin: 6px 0 20px; font-size: 14px; color: var(--muted); }
.wiz-sub strong { color: #fff; font-weight: 500; }
.wiz-error { margin: 8px 2px 0; font-size: 13px; color: #fca5a5; }
.wiz-error:empty { display: none; }

.wiz-nav { display: flex; gap: 10px; margin-top: 22px; }
.wiz-nav .btn { margin-top: 0; }
.wiz-nav .btn.is-off { display: none !important; }
#wiz-back { flex: 0 0 50px; width: 50px; padding: 0; box-shadow: inset 0 0 0 1px var(--field-line); }
#wiz-back:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }

.lx-strength { height: 3px; margin: 10px 2px 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
#strength-bar { width: 0; height: 100%; border-radius: 3px; transition: width 0.3s ease, background-color 0.3s ease; }
.strength-weak { background: #f87171; }
.strength-fair { background: #fbbf24; }
.strength-good { background: #a3e635; }
.strength-strong, .strength-very-strong { background: #4ade80; }
.lx-strength__text { min-height: 18px; margin: 0 2px; font-size: 12px; color: var(--muted); }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px;
  border-radius: 16px; box-shadow: inset 0 0 0 1px var(--field-line); cursor: pointer;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}
.plan-card:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.plan-card.is-selected { background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1.5px #fff; }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card__name { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan-card__price { font-size: 13px; color: var(--muted); }
.plan-card__price b { margin-right: 2px; font-size: 26px; font-weight: 800; letter-spacing: -0.05em; color: #fff; }
.plan-card__list { margin: 8px 0 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.plan-card__list li + li { margin-top: 3px; }
.plan-note { margin: 14px 2px 0; font-size: 12.5px; color: var(--dim); }

.lx-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--field-line); font-size: 14px; color: var(--muted); cursor: pointer; transition: box-shadow 0.2s ease; }
.lx-check:has(input:checked) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); color: #fff; }
.lx-check input { margin-top: 2px; flex: 0 0 auto; }
.lx-check a { color: #fff; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }

.signup-checkout-hint { margin: 14px 0 0; font-size: 12.5px; text-align: center; color: var(--dim); }
#signup-button-status { display: none !important; }

/* ---- email code screen (markup and base styles live in the page) ---- */
.lx-page .vgate { background: rgba(3, 4, 7, 0.82); }
.lx-page .vgate__card { background: #0b0c12; border-color: var(--line); border-radius: 26px; box-shadow: none; padding: 36px 32px; }
.lx-page .vgate__title { font-size: 26px; font-weight: 800; letter-spacing: -0.05em; }
.lx-page .vgate__sub { color: var(--muted); }
.lx-page .vgate__box { height: 58px; border-radius: 14px; border-color: var(--field-line); background: var(--field); font-family: inherit; }
.lx-page .vgate__submit { height: 50px; border-radius: 999px; background: #fff; color: #06070d; }
.lx-page .vgate__ghost { height: 46px; border-radius: 999px; }
.lx-page .vgate__input { height: 50px; border-radius: 14px; border-color: var(--field-line); background: var(--field); font-family: inherit; }
.lx-page .vgate__msg.ok { color: #86efac; }

/* ---- pop-ups from the login scripts (they carry inline styles) ---- */
.mdr-modal-backdrop { background: rgba(3, 4, 7, 0.82) !important; font-family: 'Onest', system-ui, sans-serif; }
.mdr-modal-backdrop > div { background: #0b0c12 !important; border: 1px solid var(--line) !important; border-radius: 24px !important; box-shadow: none !important; color: #fff !important; }
.mdr-modal-backdrop h2, .mdr-modal-backdrop h3 { color: #fff !important; font-weight: 800 !important; letter-spacing: -0.04em; }
.mdr-modal-backdrop p { color: var(--muted); }
.mdr-modal-backdrop input:not([type="checkbox"]):not([type="radio"]) { border-radius: 12px !important; border-color: var(--field-line) !important; background: var(--field) !important; color: #fff !important; font-family: inherit !important; }
.mdr-modal-backdrop button { font-family: inherit !important; border-radius: 999px !important; }
.mdr-modal-backdrop .spinner { border-color: rgba(255, 255, 255, 0.12) !important; border-top-color: #fff !important; }

/* ---- bits the scripts rely on ---- */
.spinner { width: 44px; height: 44px; margin: 0 auto; border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }
@keyframes modalFadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes progress { from { width: 100%; } to { width: 0; } }

.login-toast {
  position: fixed; top: 22px; left: 50%; z-index: 2147483647;
  display: flex; align-items: center; gap: 10px; max-width: min(520px, calc(100vw - 36px));
  padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(11, 12, 18, 0.96); color: #fff; font-size: 13.5px; font-weight: 600;
  transform: translate(-50%, -14px); opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.login-toast.login-toast--open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.login-toast--success { border-color: rgba(74, 222, 128, 0.4); }
.login-toast--warning { border-color: rgba(251, 191, 36, 0.4); }
.login-toast--error { border-color: rgba(248, 113, 113, 0.45); color: #fecaca; }

@media (prefers-reduced-motion: reduce) {
  .lx-art__col, .card, .panel, .wiz-step.is-active { animation: none !important; }
}

/* Social buttons belong to the first sign-up step only. */
#signup-form:has(.wiz-step.is-active:not([data-step="1"])) .social { display: none; }
#signup-form:has(.wiz-step.is-active:not([data-step="1"])) .signup-paid-notice { display: none; }

.lx-sub { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.lx-switch--quiet { margin-top: 10px; font-size: 12.5px; color: var(--dim); }
.mdr-modal-backdrop :is(#verify-btn, #send-reset-btn, #renew-now-btn, #go-home-btn, #backup-done-btn, #pw-confirm-btn) { background: #fff !important; color: #06070d !important; border: 0 !important; font-weight: 600 !important; }
.mdr-modal-backdrop :is(#verify-btn, #send-reset-btn, #renew-now-btn, #go-home-btn, #backup-done-btn, #pw-confirm-btn):disabled { opacity: 0.4 !important; }
.mdr-modal-backdrop a { color: #fff !important; text-underline-offset: 3px; }

/* phones: typing in a field never zooms the page */
@media (hover: none) and (max-width: 768px) {
  :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) { font-size: 16px !important; }
}

/* reset page: room between the strength line and the next field */
#reset-form #rst-pw-hint { margin: 0 2px 14px; }

/* plan picker: no white outline on the chosen plan, a round blue check instead */
.plan-card.is-selected { box-shadow: inset 0 0 0 1px var(--field-line) !important; background: rgba(255, 255, 255, 0.05); }
.plan-card.is-selected::after {
  content: ''; position: absolute; top: 12px; right: 12px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #3b82f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  animation: plan-check 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes plan-check { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.plan-card:has(input:focus-visible) { outline: 2px solid #8ab6ff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .plan-card.is-selected::after { animation: none; } }
