:root {
  --bg: #14181a;
  --panel: #1c2225;
  --panel-2: #232b2f;
  --line: #2e383d;
  --text: #e6ecee;
  --muted: #8fa3aa;
  --accent: #1bb7b2;
  --bad: #e5624a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

/* Lottery logos drifting behind the form - decoration only. */
.backdrop {
  position: fixed;
  inset: -10%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 34px;
  padding: 40px;
  opacity: .16;
  transform: rotate(-12deg) scale(1.25);
  pointer-events: none;
}

.backdrop img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: grayscale(1) brightness(1.8);
}

/* Keeps the form readable over the pattern. */
.veil {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(20, 24, 26, .72) 0%, rgba(20, 24, 26, .94) 68%);
  pointer-events: none;
}

.login {
  position: relative;
  width: min(380px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 34px 30px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  text-align: center;
}

.mark {
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mark img { display: block; }

h1 { margin: 0 0 26px; font-size: 20px; font-weight: 650; letter-spacing: .2px; }

form { display: flex; flex-direction: column; gap: 14px; text-align: left; }

label { display: flex; flex-direction: column; gap: 6px; }
label span { font-size: 12.5px; color: var(--muted); }

input {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14.5px;
}
input:focus { outline: none; border-color: var(--accent); }

/* Chrome paints autofilled fields white; inset shadow keeps them dark. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: inset 0 0 0 1000px var(--panel-2);
  transition: background-color 9999s ease-in-out 0s;
}

button {
  margin-top: 6px;
  background: var(--accent);
  color: #06231f;
  border: 0;
  border-radius: 9px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }

.error {
  color: var(--bad);
  font-size: 13px;
  background: rgba(229, 98, 74, .1);
  border: 1px solid rgba(229, 98, 74, .35);
  border-radius: 8px;
  padding: 8px 11px;
}

@media (max-width: 480px) {
  .login { padding: 28px 22px 24px; }
  .backdrop { gap: 22px; }
}
