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

:root {
  font-family: 'Outfit', sans-serif;
  color: #fff;
  background: #050505;
}

html, body { width: 100%; height: 100%; overflow: hidden; }

body { background: #050505; }

button, input { font: inherit; }

.room {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 500px;
  display: flex;
  overflow: hidden;
  background: #050505;
  transition: background-color .8s ease;
}

.room.on { background: #111; }

.room-light {
  position: absolute;
  top: -30%;
  left: 0;
  width: 1000px;
  height: 1000px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: scale(.5);
  background: radial-gradient(circle, rgba(255,220,100,.15) 0%, rgba(255,214,0,.05) 30%, transparent 70%);
  transition: opacity .8s ease, transform .8s ease;
}

.room.on .room-light { opacity: 1; transform: scale(1.5); }

.fireflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}

.firefly {
  position: absolute;
  border-radius: 50%;
  background: #FFEA00;
  box-shadow: 0 0 10px 3px rgba(255,234,0,.9), 0 0 20px rgba(255,179,0,.6);
  animation: fireflyMove var(--duration) ease-in-out var(--delay) infinite alternate;
}

@keyframes fireflyMove {
  0% { transform: translate(var(--x1), var(--y1)); opacity: .45; }
  25% { transform: translate(var(--x2), var(--y2)); opacity: 1; }
  50% { transform: translate(var(--x3), var(--y3)); opacity: .65; }
  75% { transform: translate(var(--x4), var(--y4)); opacity: 1; }
  100% { transform: translate(var(--x5), var(--y5)); opacity: .5; }
}

.lamp-side {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.lamp-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  transform: scale(1.1);
  -webkit-tap-highlight-color: transparent;
}

.lamp-head {
  width: 140px;
  height: 50px;
  background: #151515;
  border-radius: 140px 140px 4px 4px;
  box-shadow: inset 0 2px 5px rgba(255,255,255,.1), 0 10px 20px rgba(0,0,0,.9);
  position: relative;
  z-index: 6;
  transition: box-shadow .4s ease;
  border-bottom: 2px solid #050505;
}

.room.on .lamp-head {
  box-shadow: inset 0 -3px 10px rgba(255,220,150,.4), inset 0 2px 5px rgba(255,255,255,.1);
}

.lamp-glow {
  position: absolute;
  top: 40px;
  width: 90px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 40px 20px rgba(255,230,150,.9), 0 0 80px 40px rgba(255,200,100,.6);
  opacity: 0;
  transition: opacity .4s ease-in-out;
  z-index: 5;
  pointer-events: none;
}

.room.on .lamp-glow { opacity: 1; }

.light-beam {
  position: absolute;
  top: 45px;
  width: 500px;
  height: 350px;
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  background: linear-gradient(to bottom, rgba(255,230,140,.8) 0%, rgba(255,200,80,.2) 60%, transparent 100%);
  opacity: 0;
  transition: opacity .4s ease-in-out;
  z-index: 3;
  pointer-events: none;
  filter: blur(8px);
}

.room.on .light-beam { opacity: 1; }

.lamp-stem {
  width: 6px;
  height: 290px;
  background: linear-gradient(to right, #050505 0%, #2a2a2a 50%, #050505 100%);
  position: relative;
  z-index: 4;
  transition: background .4s ease, box-shadow .4s ease;
}

.room.on .lamp-stem {
  background: linear-gradient(to right, #050505 0%, #2a2010 50%, #050505 100%);
  box-shadow: 0 0 10px rgba(255,200,100,.15);
}

.lamp-base {
  width: 100px;
  height: 16px;
  background: #151515;
  border-radius: 30px 30px 4px 4px;
  box-shadow: inset 0 2px 5px rgba(255,255,255,.1), 0 10px 20px rgba(0,0,0,.9);
  position: relative;
  z-index: 5;
  transition: box-shadow .4s ease;
  border-bottom: 2px solid #050505;
}

.room.on .lamp-base {
  box-shadow: inset 0 2px 6px rgba(255,220,150,.3), 0 10px 20px rgba(0,0,0,.9);
}

.desk-surface {
  position: absolute;
  bottom: -40px;
  width: 550px;
  height: 100px;
  background: radial-gradient(ellipse at center, rgba(255,220,120,.25) 0%, rgba(255,180,50,.05) 50%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .4s ease-in-out;
  z-index: 1;
  pointer-events: none;
}

.room.on .desk-surface { opacity: 1; }

.string-svg {
  position: absolute;
  top: 45px;
  left: calc(50% + 55px);
  width: 2px;
  height: 2px;
  overflow: visible;
  z-index: 5;
  pointer-events: none;
}

.string-svg path {
  stroke: #222;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.string-handle {
  position: absolute;
  top: 125px;
  left: calc(50% + 49px);
  width: 10px;
  height: 20px;
  background: linear-gradient(to bottom, #ebd17a, #aa8529);
  border-radius: 5px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.5), 0 3px 5px rgba(0,0,0,.7);
  cursor: grab;
  z-index: 6;
  touch-action: none;
  user-select: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.string-handle.dragging { cursor: grabbing; transition: none; }

.login-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding-right: 10%;
}

.login-card {
  padding: 48px;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateX(50px);
  filter: blur(10px);
  pointer-events: none;
  transition: opacity .6s ease .0s, transform .6s cubic-bezier(.2,.8,.2,1), filter .6s ease;
}

.room.on .login-card {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  pointer-events: auto;
  transition-delay: .2s;
}

.glass {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}

.glass-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
}

.login-heading {
  text-align: center;
  margin-bottom: 8px;
}

.login-heading h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -.5px;
}

.login-heading p { color: #aaa; font-size: 15px; }

.inputs { display: flex; flex-direction: column; gap: 16px; }

.input-wrap { position: relative; display: block; }

.input-wrap input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.4);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.5);
}

.input-wrap input:focus {
  border-color: rgba(255,220,100,.45);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.5), 0 0 0 3px rgba(255,220,100,.06);
}

.input-wrap input::placeholder { color: #888; }

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  z-index: 2;
  opacity: .8;
}

.user-icon::before {
  content: '';
  position: absolute;
  width: 7px; height: 7px;
  border: 2px solid #888; border-radius: 50%;
  left: 4px; top: 1px;
}
.user-icon::after {
  content: '';
  position: absolute;
  width: 13px; height: 8px;
  border: 2px solid #888; border-bottom: 0;
  border-radius: 9px 9px 0 0;
  left: 1px; bottom: 1px;
}

.mail-icon::before {
  content: '';
  position: absolute; inset: 3px 1px;
  border: 2px solid #888; border-radius: 3px;
}
.mail-icon::after {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border-left: 2px solid #888; border-bottom: 2px solid #888;
  transform: rotate(-45deg);
  left: 5px; top: 1px;
}

.lock-icon::before {
  content: '';
  position: absolute;
  width: 12px; height: 10px;
  border: 2px solid #888; border-radius: 3px;
  left: 2px; bottom: 1px;
}
.lock-icon::after {
  content: '';
  position: absolute;
  width: 8px; height: 9px;
  border: 2px solid #888; border-bottom: 0;
  border-radius: 8px 8px 0 0;
  left: 4px; top: 0;
}

.sign-in {
  padding: 16px;
  border-radius: 16px;
  border: none;
  background: #ffd600;
  color: #000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: transform .2s, background-color .3s, box-shadow .3s;
}

.sign-in:hover {
  transform: scale(1.02);
  background: #ffdc64;
  box-shadow: 0 0 20px rgba(255,220,100,.4);
}

.sign-in:active { transform: scale(.98); }

.divider { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.divider span { flex: 1; height: 1px; background: rgba(255,255,255,.1); }
.divider b { color: #888; font-size: 13px; font-weight: 500; white-space: nowrap; }

.socials { display: flex; gap: 16px; }

.social-btn {
  flex: 1;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .2s, background-color .3s;
}

.social-btn:hover { transform: scale(1.05); background: rgba(255,255,255,.15); }
.social-btn:active { transform: scale(.95); }

.google-icon {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 700;
  font-family: Arial, sans-serif;
  color: #4285F4;
}

.github-icon { font-size: 18px; color: white; }

.prompt {
  position: absolute;
  top: 15%;
  left: 18%;
  transform: translateX(-50%);
  color: #555;
  font-size: 18px;
  font-weight: 500;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 1;
  transition: opacity .5s ease, transform .5s ease;
}

.room.on .prompt { opacity: 0; transform: translate(-50%, -20px); }

.prompt i {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, #555, transparent);
  animation: promptArrow 2s infinite;
}

@keyframes promptArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@media (max-width: 900px) {
  .room { flex-direction: column; overflow-y: auto; }
  .lamp-side { flex: 0 0 55vh; min-height: 430px; }
  .login-side { padding: 30px 24px 50px; flex: 0 0 auto; }
  .login-card { max-width: 440px; }
  .prompt { left: 50%; top: 7%; font-size: 14px; text-align: center; }
}

@media (max-height: 650px) and (min-width: 901px) {
  .lamp-container { transform: scale(.8); }
  .login-card { padding: 30px; gap: 16px; }
}

/* ============================================================
   ClientVault additions to the lamp animation
   (everything above this line is the original animation)
   ============================================================ */

/* Brand mark above the card */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2px;
}
.brand-dot {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #ffd600, #b98f00);
  box-shadow: 0 0 18px rgba(255,214,0,.35), inset 0 1px 2px rgba(255,255,255,.6);
  display: grid; place-items: center;
  font-size: 15px;
  flex: 0 0 auto;
}
.brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.brand-name small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #8c8c8c;
  margin-top: 2px;
}

/* The login card can be taller on the setup page — let the column scroll */
.login-side { padding: 32px 10% 32px 0; }
.login-card { max-height: calc(100vh - 64px); overflow-y: auto; }
.login-card::-webkit-scrollbar { width: 8px; }
.login-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
.login-card.wide { max-width: 520px; }

/* Alerts */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert b { display: block; font-weight: 600; margin-bottom: 2px; }
.alert-error   { background: rgba(255,72,72,.1);  border-color: rgba(255,90,90,.35);  color: #ffc9c9; }
.alert-success { background: rgba(60,220,130,.1); border-color: rgba(60,220,130,.3);  color: #b6f5d1; }
.alert-info    { background: rgba(255,214,0,.08); border-color: rgba(255,214,0,.25);  color: #f6e39a; }
.alert ul { margin: 4px 0 0 16px; padding: 0; }
.alert li { margin: 2px 0; }

/* Two inputs side by side on the setup form */
.row-2 { display: flex; gap: 14px; }
.row-2 > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 560px) { .row-2 { flex-direction: column; } }

/* Field labels (setup form needs them; login stays placeholder-only) */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span.lbl {
  font-size: 12.5px;
  font-weight: 500;
  color: #9a9a9a;
  letter-spacing: .2px;
  padding-left: 4px;
}
.field .input-wrap input { width: 100%; }
.hint { font-size: 12.5px; color: #7d7d7d; padding-left: 4px; line-height: 1.5; }

/* Inputs without a left icon */
.input-wrap.plain input { padding-left: 16px; }

/* Show / hide password */
.pw-toggle {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .6px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 3;
  transition: color .2s, background-color .2s;
}
.pw-toggle:hover { color: #ffd600; background: rgba(255,255,255,.06); }

/* Field-level error */
.input-wrap.has-error input { border-color: rgba(255,90,90,.5); }
.err { font-size: 12.5px; color: #ff9c9c; padding-left: 4px; }

/* Secondary text / footer of the card */
.card-foot {
  text-align: center;
  font-size: 13.5px;
  color: #8a8a8a;
  line-height: 1.6;
}
.card-foot a { color: #ffd600; text-decoration: none; }
.card-foot a:hover { text-decoration: underline; }

/* Disabled button state while submitting */
.sign-in[disabled] { opacity: .6; cursor: progress; transform: none !important; }

/* Caps-lock warning */
.caps {
  display: none;
  font-size: 12.5px;
  color: #f6e39a;
  padding-left: 4px;
}
.caps.show { display: block; }

/* The pull prompt — kept from the original, with a clickable lamp fallback */
.prompt { z-index: 12; }
.prompt em { font-style: normal; color: #6f6f6f; font-size: 13px; }

/* Make the lamp head itself a toggle, so the page works without dragging */
.lamp-head, .lamp-base { cursor: pointer; }

/* Respect reduced-motion preferences: no fireflies, instant reveal */
@media (prefers-reduced-motion: reduce) {
  .fireflies { display: none; }
  .login-card, .room, .room-light, .lamp-glow, .light-beam, .desk-surface { transition: none !important; }
  .string-handle { transition: none !important; }
}

/* Small screens: the card must never be cut off */
@media (max-width: 900px) {
  .login-side { padding: 24px 20px 48px; }
  .login-card { max-height: none; }
}
