/* WaveRP login page. No external fonts or images: it must load fast and work offline. */
:root {
  --bg: #0a1024;
  --frame: #1c3a80;
  --frame-2: #244a9e;
  --slot: rgba(4, 12, 46, 0.5);
  --slot-hover: rgba(4, 12, 46, 0.7);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f2f6ff;
  --muted: #a9c0ee;
  --accent: #5b9dff;
  --danger: #ff8d8d;
  --ok: #7ee2a0;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  position: relative;
  color: var(--text);
  font: 16px/1.45 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1b3b8a 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 110%, #123070 0%, transparent 55%),
    var(--bg);
  overflow-x: hidden;
}

/* soft wave shapes along the bottom */
.waves {
  position: fixed;
  inset: auto 0 0 0;
  height: 32vh;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%2312306f' fill-opacity='.55' d='M0 224l60-16c60-16 180-48 300-42.7s240 48 360 64 240 5.7 360-21.3 240-69.4 300-90.7l60-21.3v208H0z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'%3E%3Cpath fill='%23244a9e' fill-opacity='.35' d='M0 256l48-26.7c48-26.3 144-80 240-80s192 53.7 288 80 192 26.7 288 5.3 192-64 288-69.3 192 26.7 240 42.7l48 16v96H0z'/%3E%3C/svg%3E") bottom / 100% 90% no-repeat;
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: 40px 16px 24px;
}

.brand { text-align: center; margin-bottom: 24px; }
.brand .logo { width: 64px; height: 64px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45)); }
.brand h1 { margin: 10px 0 2px; font-size: 34px; letter-spacing: 0.02em; }
.brand p { margin: 0; color: var(--muted); font-size: 15px; }

.card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 18px 22px 22px;
  background: rgba(28, 58, 128, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

/* tabs are plain radio buttons + labels, so they work without JavaScript */
.tab-radio { position: absolute; opacity: 0; pointer-events: none; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: var(--slot);
  border-radius: 12px;
}

.tabs label {
  padding: 9px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.tabs label:hover { color: #fff; }

#tab-login:checked ~ .tabs label[for='tab-login'],
#tab-register:checked ~ .tabs label[for='tab-register'] {
  color: #fff;
  background: var(--frame-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#tab-login:focus-visible ~ .tabs label[for='tab-login'],
#tab-register:focus-visible ~ .tabs label[for='tab-register'] { outline: 2px solid var(--accent); outline-offset: 2px; }

.panel { display: none; }
#tab-login:checked ~ .panel-login,
#tab-register:checked ~ .panel-register { display: block; }

.field { display: block; margin: 0 0 14px; padding: 0; border: 0; }
.field > span:first-child, .field > legend { display: block; margin-bottom: 5px; padding: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.field > legend em { font-weight: 400; font-style: normal; opacity: 0.8; }
.field small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); opacity: 0.85; }

input[type='text'], input[type='email'], input[type='password'] {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  color: #fff;
  background: var(--slot);
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

input::placeholder { color: rgba(255, 255, 255, 0.35); }
input:hover { background: var(--slot-hover); }
input:focus { border-color: var(--accent); background: var(--slot-hover); }

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 64px; }

.reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.reveal:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.looks { display: flex; flex-wrap: wrap; gap: 8px; }
.looks legend { flex: 0 0 100%; float: left; width: 100%; }
.choice { flex: 1; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block;
  padding: 10px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  background: var(--slot);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.choice:hover span { background: var(--slot-hover); }
.choice input:checked + span { color: #fff; border-color: var(--accent); background: rgba(91, 157, 255, 0.22); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 14px; font-size: 14px; cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }

.primary {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  color: #0a1a44;
  cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #cfe0ff);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
}
.primary:hover { filter: brightness(1.05); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: 0.6; cursor: default; }
.primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.switch { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.switch label { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.form-error, .field-error, .notice { margin: 0 0 12px; padding: 9px 12px; font-size: 13px; border-radius: 9px; }
.form-error { color: #ffdcdc; background: rgba(255, 90, 90, 0.18); border: 1px solid rgba(255, 141, 141, 0.45); }
.field-error { margin: 6px 0 0; padding: 0; color: var(--danger); background: none; font-weight: 600; }
.notice { color: #d9ffe6; background: rgba(126, 226, 160, 0.16); border: 1px solid rgba(126, 226, 160, 0.4); }

footer { display: flex; gap: 16px; margin-top: auto; padding-top: 28px; font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: #fff; }

@media (max-width: 480px) {
  .page { padding-top: 24px; }
  .card { padding: 14px 16px 18px; }
  .brand h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
