/* Styling for server-rendered pages (login, registration, legal, messages), in the same glass/lime look as the app.
 * Applied by html_response in place of each page's old inline <style>; mostly styles elements, not classes. */
:root {
  --bg: #050607; --glass: rgba(255,255,255,.045); --glass-strong: rgba(255,255,255,.07); --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --text: #eef2ef; --muted: rgba(238,242,239,.55); --lime: #c6ff3d; --red: #ff5a6a; --green: #3ef08f;
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --spring: cubic-bezier(.34, 1.56, .64, 1); --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; padding: 48px 16px; background: radial-gradient(1000px 600px at 75% -10%, rgba(198,255,61,.08), transparent 60%) fixed, var(--bg);
  color: var(--text); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body > * { max-width: 720px; margin-left: auto; margin-right: auto; position: relative; z-index: 1; }
main, .card, .panel, .box, .container, section, article {
  background: var(--glass); border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; margin-bottom: 16px;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
  animation: rise .8s var(--ease) both;
}
main section, main article, .card section { background: none; border: 0; padding: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
h1, h2, h3 { color: var(--text); margin: 0 0 12px; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
em { font-family: var(--serif); font-style: italic; color: var(--lime); font-weight: 400; }
p, li { color: var(--text); }
small, .muted, .hint, .note { color: var(--muted); }
a { color: var(--lime); text-decoration: none; border-bottom: 1px solid rgba(198,255,61,.3); transition: border-color .3s; }
a:hover { border-color: var(--lime); }
form { display: grid; gap: 14px; margin: 10px 0; }
form.inline { display: inline-flex; margin: 0 4px 0 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; letter-spacing: .04em; }
input, select, textarea {
  width: 100%; background: rgba(0,0,0,.35); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font: inherit;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
input[type="checkbox"], input[type="radio"] { width: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(198,255,61,.6); background: rgba(0,0,0,.5); box-shadow: 0 0 0 4px rgba(198,255,61,.12); }
button, .button, input[type="submit"] {
  background: var(--lime); color: #0a0d05; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 650; cursor: pointer; width: auto; justify-self: start;
  box-shadow: 0 10px 30px -10px rgba(198,255,61,.6); transition: transform .4s var(--spring), box-shadow .3s;
}
button:hover, .button:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(198,255,61,.75); }
button:active { transform: translateY(0) scale(.98); }
button.danger, .danger { background: transparent; color: var(--red); border: 1px solid var(--red); box-shadow: none; }
.error, .alert-error { border: 1px solid rgba(255,90,106,.45); background: rgba(255,90,106,.08); color: #ffc2c8; padding: 10px 14px; border-radius: 14px; animation: shake .5s var(--ease); }
.success, .message, .ok { border: 1px solid rgba(62,240,143,.4); background: rgba(62,240,143,.07); padding: 10px 14px; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--line-2); padding: 8px; }
td { border-bottom: 1px solid var(--line); padding: 9px 8px; }
code, pre { background: rgba(0,0,0,.35); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); }
img, svg { max-width: 100%; }

/* Login */
body.auth { display: grid; place-items: center; padding: 32px 16px; }
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; filter: blur(80px); opacity: .75; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; mix-blend-mode: screen; }
.aurora i:nth-child(1) { background: radial-gradient(circle, rgba(198,255,61,.32), transparent 60%); left: -12vmax; top: -14vmax; animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(circle, rgba(62,240,143,.18), transparent 60%); right: -14vmax; top: 10vmax; animation: drift2 28s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(circle, rgba(120,160,255,.14), transparent 60%); left: 20vmax; bottom: -20vmax; animation: drift3 32s ease-in-out infinite alternate; }
.authShell { max-width: 980px; width: 100%; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: none; border: 0; padding: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; animation: none; margin: 0; }
.authHero { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px; animation: rise .9s var(--ease) both; }
.authHero h2 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; margin: 22px 0 14px; letter-spacing: -.03em; }
.authHero p { color: var(--muted); max-width: 400px; }
.authBrand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; }
.drop { width: 22px; height: 22px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: radial-gradient(circle at 35% 35%, #eaffb0, var(--lime) 55%, #5d7d10); box-shadow: 0 0 24px rgba(198,255,61,.55); animation: pulse 3s ease-in-out infinite; }
.authLine { width: 100%; height: 130px; margin-top: 24px; overflow: visible; }
.authLine .stroke { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s var(--ease) .3s forwards; filter: drop-shadow(0 0 8px rgba(198,255,61,.6)); }
.authLine .area { opacity: 0; animation: fade 1.6s ease 1.4s forwards; }
.authLine .dot { opacity: 0; animation: fade .4s ease 2.5s forwards, beat 2s ease-in-out 2.9s infinite; transform-origin: 400px 26px; }
.authCard { display: grid; gap: 14px; margin: 0; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 26px; padding: 32px; backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.08); animation: rise .9s var(--ease) .15s both; }
.authCard > * { animation: rise .7s var(--ease) both; }
.authCard > *:nth-child(2) { animation-delay: .25s; } .authCard > *:nth-child(3) { animation-delay: .3s; } .authCard > *:nth-child(4) { animation-delay: .35s; }
.authCard > *:nth-child(5) { animation-delay: .4s; } .authCard > *:nth-child(6) { animation-delay: .45s; } .authCard > *:nth-child(7) { animation-delay: .5s; }
.authCard h1 { margin: 0; } .authCard p { margin: 0; }
.authCard button { width: 100%; justify-self: stretch; margin-top: 4px; }
.authLinks { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; }
@media (max-width: 760px) { .authShell { grid-template-columns: 1fr; } .authLine { display: none; } .authHero h2 { margin-top: 14px; } }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes beat { 50% { transform: scale(1.6); opacity: .6; } }
@keyframes pulse { 50% { box-shadow: 0 0 36px rgba(198,255,61,.85); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, 10vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(-10vmax, -14vmax) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .authLine .stroke { stroke-dashoffset: 0; } .authLine .area, .authLine .dot { opacity: 1; } }

/* Other server pages (password reset, registration, messages): one centred glass card. */
html { background: radial-gradient(1000px 600px at 75% -10%, rgba(198,255,61,.08), transparent 60%) fixed, var(--bg); min-height: 100%; }
body:not(.auth) {
  max-width: 560px; min-height: 0; margin: 10vh auto; padding: 34px 32px; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 26px;
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%); box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.08);
  animation: rise .8s var(--ease) both;
}
body:not(.auth)::before { content: ""; display: block; width: 22px; height: 22px; margin-bottom: 18px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: radial-gradient(circle at 35% 35%, #eaffb0, var(--lime) 55%, #5d7d10); box-shadow: 0 0 24px rgba(198,255,61,.55); }
body:not(.auth) main, body:not(.auth) .card, body:not(.auth) .container { background: none; border: 0; padding: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; margin: 0; }
body:not(.auth) > * { animation: rise .7s var(--ease) .1s both; }
body:not(.auth) form button { width: 100%; justify-self: stretch; }
@media (max-width: 600px) { body:not(.auth) { margin: 16px; padding: 26px 20px; } }
