/* WaddleNet sign-in page styles. Served to anyone (no login needed), so this file holds
   only the sign-in screen's own look. The application's styles are in index.html and are
   not sent until after sign-in. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-latin-700-normal.woff2') format('woff2');
}

:root {
  --ink-900: #171512;
  --ink-800: #1E1B18;
  --ink-700: #2A2621;
  --ink-500: #8A8272;
  --surface: #1B1917;
  --card: #26231F;
  --border: #3A362F;
  --accent: #3DBE64;
  --accent-dim: rgba(61, 190, 100, 0.16);
  --good: #34D07A;
  --good-dim: rgba(52, 208, 122, 0.16);
  --warn: #E0A030;
  --warn-dim: rgba(224, 160, 48, 0.16);
  --danger: #E5695C;
  --danger-dim: rgba(229, 105, 92, 0.16);
  --text: #EDE9E1;
  --text-soft: #A39C8D;
  --radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--text); }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.hidden { display: none !important; }

.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

#loginScreen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, #3A3426 0%, var(--ink-900) 60%);
  position: relative; transition: background 8s ease-in-out;
}
#loginDuckLayer { position: fixed; inset: 0; overflow: hidden; z-index: 1; pointer-events: none; }
.login-duck-pos { position: absolute; top: 0; left: 0; width: 56px; height: 46px; z-index: 2; }
.login-duck { width: 100%; height: 100%; transition: transform 0.15s ease; }
.login-duck.facing-left { transform: scaleX(-1); }
.duck-shadow-ellipse { transition: opacity 0.3s ease, transform 0.3s ease; transform-origin: 50% 50%; }
.login-duck-pos.swimming .duck-shadow-ellipse { opacity: 0; }
/* Walking cycle: a little vertical lift alongside the body-roll waddle,
   rather than rotation alone - a purely-rotating body with no vertical
   give at all is a big part of what reads as "stiff" in a walk cycle. */
@keyframes duck-waddle { 0%, 100% { transform: translateY(0) rotate(-3.5deg); } 50% { transform: translateY(-1.6px) rotate(3.5deg); } }
.login-duck-pos.walking .duck-body-group { animation: duck-waddle 0.4s ease-in-out infinite; transform-origin: 50% 90%; }
/* Legs swing (rotate) around the hip like a pendulum instead of sliding
   sideways - a horizontal slide reads as skating, a rotation around the
   hip point reads as an actual step. Same hip points playRandomIdleBehavior's
   "sit" case already pivots around (20,40 / 32,40), so sit <-> walk transitions
   stay visually consistent. The slight translateY on the forward swing adds a
   small foot-lift instead of the leg staying pinned to the ground throughout.
   Swing is narrow (19deg total) with a held pose at each end rather than a
   wide continuous back-and-forth, which read as flapping on its own.
   BOTH legs use this exact same keyframe (not a mirrored pair) - what
   actually made it still read as flapping after that first fix was the
   two legs swinging at the SAME TIME (just toward opposite values), which
   looks like a pair of wings or scissors no matter how narrow the angle
   is. The real fix is timing, not angle: legRight gets a -25%-of-duration
   animation-delay set in JS (see initLoginDuck), so each leg is only ever
   actively swinging while the other is mid-hold - only one foot moves at
   any given instant, which is what actually reads as alternating steps. */
@keyframes duck-leg-step {
  0%, 15% { transform: rotate(9deg); }
  35%, 65% { transform: rotate(-10deg) translateY(-1px); }
  85%, 100% { transform: rotate(9deg); }
}
.login-duck-pos.walking .goose-leg-left { animation: duck-leg-step 0.4s ease-in-out infinite; transform-origin: 20px 40px; }
.login-duck-pos.walking .goose-leg-right { animation: duck-leg-step 0.4s ease-in-out infinite; transform-origin: 32px 40px; }

@keyframes duck-peck { 0%, 100% { transform: translateY(0) rotate(0deg); } 40%, 60% { transform: translateY(7px) rotate(18deg); } }
@keyframes duck-flap { 0%, 100% { transform: scaleY(1) translateY(0); } 50% { transform: scaleY(1.4) translateY(-4px); } }
@keyframes duck-swim-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.login-duck-pos.swimming .duck-body-group { animation: duck-swim-bob 1.6s ease-in-out infinite; }
.login-duck-pos.swimming .goose-leg-left, .login-duck-pos.swimming .goose-leg-right { opacity: 0; }

.duck-footprint { position: absolute; top: 0; left: 0; width: 11px; height: 11px; pointer-events: none; z-index: 1; opacity: 0.5; transition: opacity 3.2s ease-out; }
.duck-footprint.fading { opacity: 0; }
@keyframes rain-fall { 0% { transform: translateY(0); } 100% { transform: translateY(110vh); } }
.login-inner-wrap { position: relative; z-index: 2; }
.login-topbrand {
  position: fixed; top: 26px; left: 30px; display: flex; align-items: center; gap: 10px;
}
.login-card {
  background: var(--ink-800); border: 1px solid var(--ink-700); border-radius: 14px;
  padding: 40px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.login-card h1 { color: #fff; font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.login-card .brand-sub { color: var(--ink-500); font-size: 13px; margin: 0 0 28px; }
.login-card input {
  width: 100%; padding: 11px 12px; margin-bottom: 12px; border-radius: 8px;
  border: 1px solid var(--ink-700); background: var(--ink-900); color: #fff; font-size: 14px;
}
.login-card input::placeholder { color: #A69C86; }
.login-card button {
  width: 100%; padding: 11px; border-radius: 8px; border: none; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s;
}
.login-card button:hover { background: #2FA155; }
.login-card button.secondary {
  margin-top: 10px; background: transparent; border: 1px solid var(--accent); color: var(--accent);
}
.login-card button.secondary:hover { background: var(--accent); color: #fff; }
#loginMessage { color: #F87171; font-size: 13px; margin-top: 14px; min-height: 16px; }
#loginPasskeyStatus { color: var(--ink-500); font-size: 13px; margin-top: 12px; }
#loginPasskeyHelp { font-size: 13px; margin-top: 6px; }
#loginPasskeyHelp a { color: var(--accent); }
#loginPasskeyDetails { margin: 8px 0 0; padding: 8px; max-height: 180px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: 11px; line-height: 1.4; color: var(--text-soft); background: var(--ink-900); border: 1px solid var(--border); border-radius: 6px; }

/* Shared with the application: the look of text and password fields, and their focus ring. In the
   application's stylesheet these come after the rules above and take precedence, as here. */
input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="date"], select {
  padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); font-size: 13.5px;
  background: var(--card); color: var(--text); width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
