
/* =====================================
   SWITCH LOGIN — COMPLETE STYLESHEET
===================================== */

:root {
  color-scheme: dark;
  --bg: #05070d;
  --card: rgba(15, 19, 31, 0.94);
  --text: #f5f7ff;
  --muted: #929bb0;
  --accent: #8b9dff;
  --line: rgba(255, 255, 255, 0.10);
  --radius: 22px;
}

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

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 45%, #11182a 0%, #080b13 42%, #030408 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: clip;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  isolation: isolate;
}

/* =====================================
   LIGHT SCENE
===================================== */

.light-scene {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

.light-glow {
  position: absolute;
  width: min(70vw, 700px);
  aspect-ratio: 1;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 205, 103, 0.16),
    rgba(255, 180, 65, 0.055) 32%,
    transparent 70%
  );
  opacity: 0.12;
  filter: blur(12px);
  transition: opacity 0.8s ease, transform 0.9s ease;
}

.bulb-wrapper {
  position: absolute;
  top: 19%;
  left: 50%;
  width: 112px;
  height: 160px;
  transform: translate(-50%, -50%) scale(0.8);
  transform-origin: center;
  opacity: 0.22;
  filter: brightness(0.48);
  transition:
    top 0.85s cubic-bezier(.2,.8,.2,1),
    left 0.85s cubic-bezier(.2,.8,.2,1),
    transform 0.85s ease,
    opacity 0.65s ease,
    filter 0.65s ease;
}

.bulb {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(255, 201, 96, 0.22));
}

.bulb-glass {
  position: absolute;
  top: 0;
  left: 8px;
  width: 96px;
  height: 105px;
  border-radius: 50% 50% 43% 43%;
  background:
    radial-gradient(ellipse at 33% 24%, #fffbe7 0%, #ffe8a2 15%,
    #ffc44e 46%, #b86b20 100%);
  box-shadow:
    inset -10px -9px 20px rgba(92, 43, 0, 0.4),
    inset 7px 5px 15px rgba(255, 255, 255, 0.6),
    0 0 28px rgba(255, 193, 79, 0.25);
}

.bulb-highlight {
  position: absolute;
  width: 23px;
  height: 46px;
  left: 17px;
  top: 12px;
  border-radius: 50%;
  transform: rotate(25deg);
  background: rgba(255, 255, 255, 0.57);
  filter: blur(5px);
}

.bulb-neck {
  position: absolute;
  top: 88px;
  left: 31px;
  width: 50px;
  height: 20px;
  background: linear-gradient(90deg, #a75e1c, #ffda7d, #9c5119);
  border-radius: 4px;
}

.bulb-base {
  position: absolute;
  top: 105px;
  left: 34px;
  width: 44px;
  height: 35px;
  border-radius: 4px 4px 10px 10px;
  background: repeating-linear-gradient(
    to bottom,
    #b3bac6 0 4px,
    #505969 4px 7px
  );
  box-shadow: inset 0 0 8px #202633;
}

.bulb-base span {
  display: block;
  height: 2px;
  margin-top: 6px;
  background: rgba(255,255,255,.18);
}

/* =====================================
   PHYSICAL SWITCH
===================================== */

.switch-wrapper {
  position: absolute;
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
  transition:
    top 0.8s ease,
    left 0.8s ease,
    transform 0.8s ease,
    opacity 0.5s ease;
}

.switch-board {
  width: 142px;
  height: 202px;
  padding: 17px;
  border-radius: 23px;
  background: linear-gradient(145deg, #f1f2f4, #aeb3bd 52%, #6b7180);
  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.65),
    inset 2px 2px 4px rgba(255,255,255,.9),
    inset -3px -4px 8px rgba(0,0,0,.32);
}

.switch {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(145deg, #161a23, #303747);
  box-shadow:
    inset 4px 4px 9px rgba(0,0,0,.7),
    inset -2px -2px 5px rgba(255,255,255,.12);
  cursor: pointer;
}

.switch-inner {
  position: absolute;
  inset: 7px;
  border-radius: 9px;
  background: linear-gradient(145deg, #e7e9ed, #aab0bc);
  box-shadow:
    2px 3px 5px rgba(0,0,0,.45),
    inset 2px 2px 4px rgba(255,255,255,.9),
    inset -3px -3px 6px rgba(0,0,0,.18);
  transform: translateY(0);
  transition: transform 0.25s ease;
}

.switch-inner::before {
  content: "";
  position: absolute;
  top: 13%;
  left: 16%;
  width: 68%;
  height: 28%;
  border-radius: 7px;
  background: linear-gradient(#f8f9fb, #cbd0da);
  box-shadow: inset 0 1px 3px rgba(255,255,255,.7);
}

.switch-inner::after {
  content: "";
  position: absolute;
  bottom: 13%;
  left: 16%;
  width: 68%;
  height: 28%;
  border-radius: 7px;
  background: linear-gradient(#969daa, #d8dbe1);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.16);
}

.switch-shadow {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
  pointer-events: none;
}

.switch:active .switch-inner {
  transform: scale(.97);
}

.switch-label {
  color: #c4c9d6;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Light ON */

.light-scene.light-on .light-glow {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.25);
}

.light-scene.light-on .bulb-wrapper {
  opacity: 1;
  filter: brightness(1.2);
  transform: translate(-50%, -50%) scale(1.2);
}

.light-scene.light-on .bulb {
  filter: drop-shadow(0 0 45px rgba(255, 199, 87, .95));
}

.light-scene.light-on .switch-inner {
  transform: translateY(10px);
}

.light-scene.light-on .switch-wrapper {
  left: 8%;
  top: 16%;
  transform: translate(-50%, -50%) scale(.58);
}

.light-scene.bulb-small .bulb-wrapper {
  left: 88%;
  top: 12%;
  transform: translate(-50%, -50%) scale(.68);
}

.light-scene.bulb-small .switch-wrapper {
  opacity: 0;
  visibility: hidden;
}

.light-scene.bulb-small .bulb-wrapper {
  opacity: 0;
  visibility: hidden;
}

.light-scene.bulb-small .light-glow {
  opacity: 0;
}

/* =====================================
   LOGIN OVERLAY
===================================== */

.login-section {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(2, 4, 10, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity .45s ease,
    visibility .45s ease;
}

.login-section::before {
  content: "";
  position: fixed;
  z-index: -1;
  width: min(70vw, 700px);
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 198, 94, .15),
    rgba(255, 182, 72, .055) 35%,
    transparent 72%
  );
  filter: blur(12px);
  pointer-events: none;
}

.login-section.login-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =====================================
   LOGIN CARD
===================================== */

.login-card {
  position: relative;
  width: min(100%, 510px);
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(23, 28, 44, .97), var(--card));
  box-shadow:
    0 35px 100px rgba(0,0,0,.65),
    0 0 70px rgba(255, 194, 91, .07),
    inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: none;
  transition: border-color .3s ease, box-shadow .3s ease;
}

.login-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -55px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(255, 195, 91, .11),
    transparent 68%
  );
  filter: blur(25px);
  pointer-events: none;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 30px;
}

.login-icon {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(150,165,255,.3);
  border-radius: 16px;
  background: linear-gradient(145deg, #252d4b, #111729);
  box-shadow: 0 8px 28px rgba(90,110,255,.12);
}

.lock-body {
  position: absolute;
  left: 15px;
  top: 24px;
  width: 24px;
  height: 19px;
  border: 2px solid #bdc8ff;
  border-radius: 5px;
}

.lock-shackle {
  position: absolute;
  left: 20px;
  top: 13px;
  width: 14px;
  height: 16px;
  border: 2px solid #bdc8ff;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.eyebrow {
  margin-bottom: 5px;
  color: #a8b4ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.login-header h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
  letter-spacing: -1px;
}

.login-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* =====================================
   FORM ELEMENTS
===================================== */

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.input-group > label,
.password-label-row > label {
  color: #dfe3f0;
  font-size: 12px;
  font-weight: 600;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 8, 16, .68);
  transition: border-color .2s ease, background .2s ease;
}

.input-wrapper:focus-within {
  border-color: rgba(139,157,255,.8);
  background: rgba(8, 12, 24, .95);
}

.input-icon {
  display: flex;
  flex: 0 0 19px;
  width: 19px;
  color: #828ca6;
}

.input-icon svg {
  width: 19px;
  height: 19px;
}

.input-wrapper input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.input-wrapper input::placeholder {
  color: #626d83;
}

.input-wrapper input:focus-visible {
  outline: none;
}

.password-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.forgot-password {
  border: 0;
  background: transparent;
  color: #a8b4ff;
  font-size: 11px;
  cursor: pointer;
}

.forgot-password:hover,
.register-text button:hover {
  color: white;
}

.password-toggle {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #a8b4ff;
  font-size: 11px;
  cursor: pointer;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -3px;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #aeb6c8;
  font-size: 12px;
  cursor: pointer;
}

.remember-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.custom-checkbox {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid #505a70;
  border-radius: 5px;
  background: #101522;
}

.remember-label input:checked + .custom-checkbox {
  border-color: #899bff;
  background: #899bff;
}

.remember-label input:checked + .custom-checkbox::after {
  content: "✓";
  color: #0b1020;
  font-size: 12px;
  font-weight: 800;
}

.remember-label input:focus-visible + .custom-checkbox {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: 100%;
  min-height: 53px;
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: linear-gradient(110deg, #8193ff, #a4aaff);
  box-shadow: 0 10px 28px rgba(104,123,255,.18);
  color: #090d1c;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.login-button:hover {
  filter: brightness(1.08);
}

.login-button:active {
  transform: scale(.985);
}

.login-button:disabled {
  opacity: .65;
  cursor: wait;
}

/* =====================================
   MESSAGES
===================================== */

.form-message {
  padding: 12px 14px;
  border: 1px solid rgba(139,157,255,.25);
  border-radius: 10px;
  background: rgba(111,130,255,.08);
  color: #c9d1ff;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* =====================================
   SOCIAL LOGIN
===================================== */

.divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 26px 0 18px;
  color: #747f95;
  font-size: 10px;
}

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

.social-login {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: #dce1ed;
  font-size: 11px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}

.social-button > span:first-child {
  font-size: 15px;
  font-weight: 750;
}

.social-button:hover {
  border-color: rgba(155,169,255,.4);
  background: rgba(155,169,255,.07);
}

.register-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 25px;
  color: #8993a8;
  font-size: 12px;
  text-align: center;
}

.register-text button {
  border: 0;
  background: transparent;
  color: #a8b4ff;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.backend-note {
  margin: 19px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: #727e94;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

/* =====================================
   CREATE ACCOUNT MODE
===================================== */

.login-card.create-mode {
  width: min(100%, 540px);
}

.login-card.create-mode .login-header {
  margin-bottom: 24px;
}

.login-card.create-mode .login-form {
  gap: 16px;
}

/* =====================================
   RESPONSIVE
===================================== */

@media (min-width: 900px) {
  .switch-board {
    width: 160px;
    height: 225px;
  }

  .bulb-wrapper {
    transform: translate(-50%, -50%) scale(1);
  }

  .login-card {
    padding: 42px;
  }
}

@media (max-width: 600px) {
  .switch-board {
    width: 122px;
    height: 174px;
    padding: 14px;
  }

  .switch-wrapper {
    top: 58%;
  }

  .bulb-wrapper {
    top: 20%;
    transform: translate(-50%, -50%) scale(.72);
  }

  .light-scene.light-on .switch-wrapper {
    left: 8%;
    top: 12%;
    transform: translate(-50%, -50%) scale(.46);
  }

  .light-scene.bulb-small .bulb-wrapper {
    left: 88%;
    top: 10%;
    transform: translate(-50%, -50%) scale(.58);
  }

  .login-section {
    padding: 12px;
  }

  .login-card {
    width: 100%;
    padding: 25px 20px;
    border-radius: 19px;
  }

  .login-header {
    gap: 13px;
    margin-bottom: 24px;
  }

  .login-icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  .lock-body {
    left: 12px;
    top: 21px;
  }

  .lock-shackle {
    left: 17px;
    top: 10px;
  }

  .login-form {
    gap: 17px;
  }

  .divider {
    margin-top: 22px;
  }
}

@media (max-width: 360px) {
  .login-section {
    padding: 8px;
  }

  .login-card {
    padding: 22px 15px;
  }

  .social-login {
    gap: 6px;
  }

  .social-button {
    gap: 5px;
    font-size: 10px;
  }

  .password-label-row {
    align-items: flex-start;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .login-section {
    align-items: flex-start;
    padding: 12px;
  }

  .login-card {
    margin: auto;
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}