:root{
  --bg:#f3f5f9;
  --card:#ffffff;
  --border:#dde1ea;
  --text:#0b0d10;
  --muted:#6b7280;
  --accent:#1e90ff;
  --danger:#ef4444;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font:16px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
       "Segoe UI", Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  position:relative;
  overflow:hidden;
}

.page-dim{
  position:fixed;
  inset:0;
  background:#000000;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s linear;
}

/* Center the login card */
.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.login-card{
  width:100%;
  max-width:468px;
  background:var(--card);
  border-radius:28px;
  padding:0;
  border:4px solid #111111;
  box-shadow:11px 11px 0 #111111;
  overflow:hidden;
  animation:card-in .4s ease-out;
  transition:opacity .32s ease, transform .32s ease, filter .32s ease;
}

.login-card.is-draggable{
  position:fixed;
  margin:0;
  z-index:10;
}

.login-card.is-fading-out{
  opacity:0;
  transform:scale(.94);
  filter:blur(2px);
  pointer-events:none;
}

@keyframes card-in{
  from{opacity:0; transform:translateY(8px) scale(.98);}
  to{opacity:1; transform:translateY(0) scale(1);}
}

.login-header{
  text-align:center;
  margin:0;
  padding:20px 24px 15px;
  border-bottom:4px solid #111111;
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
}
.login-header:active{cursor:grabbing;}
.title{
  margin:0;
  font-size:26px;
  font-weight:700;
  line-height:1.05;
}
.subtitle{
  margin:3px 0 0;
  font-size:13px;
  line-height:1.15;
  color:var(--muted);
}

.form{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:20px 24px 22px;
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.field-label{
  font-size:14px;
  color:var(--muted);
}

input[type="text"],
input[type="password"]{
  border-radius:16px;
  border:3px solid #111111;
  padding:10px 12px;
  font-size:14px;
  outline:none;
  background:#ffffff;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input[type="text"]:focus,
input[type="password"]:focus{
  background:#ffffff;
  border-color:#111111;
  box-shadow:0 0 0 4px rgba(17,17,17,.08);
}

.error{
  min-height:18px;
  margin:0;
  font-size:13px;
  color:var(--danger);
}

.btn-login{
  margin-top:0;
  width:100%;
  align-self:stretch;
  border:3px solid #111111;
  border-radius:16px;
  padding:10px 0;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  background:#ffffff;
  color:#111111;
  box-shadow:none;
  transition:transform .12s ease, background .15s ease, color .15s ease;
}
.btn-login:hover{
  background:#111111;
  color:#ffffff;
}
.btn-login:active{
  transform:translateY(1px);
}

.admin-entry{
  position:fixed;
  left:50%;
  top:56%;
  z-index:12;
  transform:translate(-50%, -50%);
  width:min(620px, calc(100vw - 180px));
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  color:#f5f5f5;
  cursor:default;
  overflow:visible;
  box-shadow:none;
  transition:transform .18s ease, filter .18s ease;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.admin-entry[hidden]{
  display:none !important;
}

.admin-entry.is-entering{
  animation:admin-entry-fade-in .45s ease-out both;
}

.admin-entry-noise{
  position:absolute;
  inset:-28px -36px -24px -36px;
  pointer-events:none;
  z-index:0;
}

.admin-entry-block{
  position:absolute;
  display:block;
  width:26px;
  height:26px;
  opacity:.92;
  animation:
    admin-block-flicker 1.7s steps(3,end) infinite,
    admin-block-shift 1.35s steps(4,end) infinite;
  will-change:transform, opacity;
}

.admin-entry-block--accent{
  background:#e30519;
}

.admin-entry-block--bg{
  background:#050505;
}

.admin-entry-block--tl{
  left:4%;
  top:10%;
  box-shadow:26px 0 0 #e30519, 0 26px 0 #e30519, 26px 26px 0 #e30519;
  animation-delay:.18s, .06s;
}

.admin-entry-block--tr{
  right:2.4%;
  top:7%;
  box-shadow:-24px 24px 0 #e30519;
  animation-delay:.62s, .21s;
}

.admin-entry-block--bl{
  left:7.5%;
  bottom:10%;
  box-shadow:24px 24px 0 #e30519;
  animation-delay:1.02s, .44s;
}

.admin-entry-block--br{
  right:6.5%;
  bottom:9%;
  animation-delay:.44s, .31s;
}

.admin-entry-block--out-1{
  left:18%;
  top:-4%;
  width:14px;
  height:14px;
  animation-delay:1.34s, .52s;
}

.admin-entry-block--out-2{
  right:11%;
  top:4%;
  width:18px;
  height:18px;
  animation-delay:.88s, .14s;
}

.admin-entry-block--out-3{
  left:9%;
  bottom:2%;
  width:16px;
  height:16px;
  animation-delay:1.52s, .39s;
}

.admin-entry-block--in-1{
  left:45.8%;
  top:31%;
  animation-delay:.3s, .18s;
}

.admin-entry-block--in-2{
  left:67.8%;
  top:58%;
  animation-delay:.94s, .47s;
}

.admin-entry-block--in-3{
  right:15.6%;
  top:24.5%;
  animation-delay:1.2s, .09s;
}

.admin-entry-block--in-4{
  right:31%;
  top:69%;
  width:18px;
  height:18px;
  animation-delay:.74s, .34s;
}

.admin-entry-block--in-5{
  left:58%;
  top:17%;
  width:12px;
  height:12px;
  animation-delay:1.08s, .26s;
}

.admin-entry-block--in-6{
  left:77%;
  top:44%;
  width:22px;
  height:22px;
  animation-delay:.54s, .42s;
}

.admin-entry-banner{
  position:relative;
  width:100%;
  aspect-ratio:942 / 207;
  background:url("../assets/images/admin.png") center / 100% 100% no-repeat;
  overflow:hidden;
  z-index:1;
}

.admin-entry-code{
  position:relative;
  z-index:1;
  width:100%;
  display:flex;
  justify-content:center;
}

.admin-entry-code-window{
  width:min(430px, 72%);
  min-height:42px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:2px;
  color:#ff5060;
  font-family:"SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size:8px;
  line-height:1.15;
  letter-spacing:.03em;
  text-transform:uppercase;
  text-shadow:0 0 10px rgba(227, 5, 25, .16);
}

.admin-entry-code-line{
  min-height:9px;
  white-space:nowrap;
  overflow:hidden;
  opacity:.44;
  transition:opacity .28s ease;
}

.admin-entry-code-line:nth-child(2){
  opacity:.7;
}

.admin-entry-code-line--typing{
  opacity:1;
}

.admin-entry-mask{
  position:absolute;
  display:block;
  background:#050505;
  opacity:.98;
  animation:
    admin-mask-flicker 1.9s steps(2,end) infinite,
    admin-mask-shift 1.6s steps(3,end) infinite;
  will-change:transform, opacity;
}

.admin-entry-mask--one{
  left:45.3%;
  top:34%;
  width:22px;
  height:22px;
  animation-delay:.22s, .08s;
}

.admin-entry-mask--two{
  right:15.6%;
  top:58%;
  width:26px;
  height:26px;
  animation-delay:.8s, .29s;
}

.admin-entry-mask--three{
  right:7.8%;
  top:11%;
  width:15px;
  height:15px;
  animation-delay:1.18s, .51s;
}

.admin-entry-mask--four{
  left:72.8%;
  top:74%;
  width:12px;
  height:12px;
  animation-delay:1.46s, .17s;
}

.admin-entry-banner::before,
.admin-entry-banner::after{
  display:none;
}

.admin-entry-title{
  position:absolute;
  left:24.8%;
  top:56%;
  min-width:0;
  padding:7px 18px 6px;
  border:2px solid #111111;
  border-radius:9px;
  background:#111111;
  color:#d80918;
  font-size:16px;
  line-height:1;
  font-weight:700;
  letter-spacing:.01em;
  text-transform:uppercase;
  text-align:center;
  cursor:pointer;
  overflow:visible;
  transition:transform .14s ease, filter .14s ease, background .14s ease, color .14s ease;
}

.admin-entry-title::after{
  content:"";
  position:absolute;
  inset:-5px;
  border-radius:12px;
  border:2px solid rgba(17, 17, 17, .82);
  opacity:0;
  transform:scale(.92);
  animation:admin-entry-title-pulse 2.1s ease-out infinite;
  pointer-events:none;
}

.admin-entry-title:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
}

.admin-entry-title:active{
  transform:translateY(1px);
}

@keyframes admin-entry-title-pulse{
  0%{
    opacity:0;
    transform:scale(.92);
  }
  16%{
    opacity:.8;
  }
  58%{
    opacity:0;
    transform:scale(1.18);
  }
  100%{
    opacity:0;
    transform:scale(1.18);
  }
}

@keyframes admin-entry-fade-in{
  from{
    opacity:0;
    transform:translate(-50%, -46%);
    filter:blur(2px);
  }
  to{
    opacity:1;
    transform:translate(-50%, -50%);
    filter:blur(0);
  }
}

@keyframes admin-block-flicker{
  0%, 14%{
    opacity:.92;
  }
  15%, 18%{
    opacity:.18;
  }
  19%, 54%{
    opacity:.94;
  }
  55%, 62%{
    opacity:.28;
  }
  63%, 100%{
    opacity:.96;
  }
}

@keyframes admin-block-shift{
  0%, 18%{
    transform:translate(0, 0);
  }
  19%, 36%{
    transform:translate(3px, -2px);
  }
  37%, 58%{
    transform:translate(-4px, 2px);
  }
  59%, 76%{
    transform:translate(2px, 3px);
  }
  77%, 100%{
    transform:translate(-2px, -3px);
  }
}

@keyframes admin-mask-flicker{
  0%, 18%{
    opacity:.98;
  }
  19%, 26%{
    opacity:.18;
  }
  27%, 71%{
    opacity:.98;
  }
  72%, 80%{
    opacity:.42;
  }
  81%, 100%{
    opacity:.98;
  }
}

@keyframes admin-mask-shift{
  0%, 22%{
    transform:translate(0, 0);
  }
  23%, 41%{
    transform:translate(-3px, 2px);
  }
  42%, 63%{
    transform:translate(4px, -2px);
  }
  64%, 83%{
    transform:translate(-2px, -3px);
  }
  84%, 100%{
    transform:translate(2px, 3px);
  }
}

/* Mobile */
@media (max-width:480px){
  .login-card{
    max-width:100%;
  }
  .login-header{
    padding:18px 20px 14px;
  }
  .form{
    padding:18px 20px 20px;
  }
  .admin-entry{
    width:calc(100vw - 56px);
    padding:0;
    top:56%;
  }
  .admin-entry-banner{
    aspect-ratio:942 / 207;
  }
  .admin-entry-noise{
    inset:-18px -20px -18px -20px;
  }
  .admin-entry-block{
    width:16px;
    height:16px;
  }
  .admin-entry-block--tl{
    box-shadow:16px 0 0 #e30519, 0 16px 0 #e30519, 16px 16px 0 #e30519;
  }
  .admin-entry-block--tr{
    box-shadow:-16px 16px 0 #e30519;
  }
  .admin-entry-block--bl{
    box-shadow:16px 16px 0 #e30519;
  }
  .admin-entry-block--in-4{
    width:12px;
    height:12px;
  }
  .admin-entry-mask--one{
    width:14px;
    height:14px;
  }
  .admin-entry-mask--two{
    width:16px;
    height:16px;
  }
  .admin-entry-mask--three{
    width:10px;
    height:10px;
  }
  .admin-entry-mask--four{
    width:8px;
    height:8px;
  }
  .admin-entry-title{
    left:24.5%;
    top:56%;
    font-size:12px;
    padding:5px 12px 4px;
    border-width:1px;
    border-radius:6px;
  }
  .admin-entry-code-window{
    width:min(360px, 82%);
    font-size:7px;
    min-height:36px;
  }
}
