@import url('https://fonts.googleapis.com/css2?family=Cal+Sans&display=swap');

body {
  font-family: "Cal Sans", sans-serif;
  letter-spacing: 0.05rem;
  background: linear-gradient(135deg, #1d222b 0%, #1d1d25 45%, #0e0e11 100%);
  color: #eaeaf0;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-attachment: fixed;
  background-size: cover;
}

header {
  display: flex;
  align-items: center;
  background: #16161d;
  padding: 0.5rem 1rem;
}

header img, header h1 {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  cursor: default;
}

header img {
  height: 60px;
}

header h1 {
  font-size: 1rem;
  margin: 0;
}

/* Subtle intermittent shimmer/glimpse */
header img::after,
header h1::after {
  content: "";
  position: absolute;
  top: 0;
  left: -140%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.65) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  opacity: 0;
  pointer-events: none;
  animation: glimpse 8s infinite;
  animation-timing-function: cubic-bezier(.4,0,.2,1);
}

/* Most of the cycle is idle; a quick shine passes occasionally */
@keyframes glimpse {
  0%, 75% {
    left: -140%;
    opacity: 0;
  }
  82% {
    left: 20%;
    opacity: 0.9;
  }
  88% {
    left: 120%;
    opacity: 0;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

header nav {
  display: inline-flex;
  margin-left: auto;
  margin-right: auto;
  gap: 1rem;
}

nav a {
  margin-right: 1rem;
  color: #eaeaf0;
  text-decoration: none;
  position: relative;
  padding: 0.05rem 0;
  transition: color 200ms ease, transform 160ms cubic-bezier(.2,.9,.2,1);
  will-change: color, transform;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #eaeaf0, #fff);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 200ms ease;
  border-radius: 2px;
  opacity: 0.95;
}

nav a:hover,
nav a:focus {
  color: #ffffff;
  transform: translateY(-1px);
}

nav a:hover::after,
nav a:focus::after {
  transform: scaleX(1);
}

nav a:active {
  transform: translateY(0);
}

/* common button baseline for all buttons */
button,
input[type="button"],
input[type="submit"] {
  font-family: "Cal Sans", sans-serif;
  cursor: pointer;
  will-change: transform, box-shadow;
  transition: transform 160ms cubic-bezier(.2,.9,.2,1),
              box-shadow 200ms ease,
              background 300ms ease,
              background-color 200ms ease,
              color 240ms ease,
              font-weight 200ms ease,
              text-shadow 240ms ease;
}

/* header-specific button styles */
header button {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  color: #eaeaf0;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

/* subtle pulsing animation for hovered state (red) */
@keyframes pulse-red {
  from {
    color: #ff6b6b;
    text-shadow: 0 1px 0 rgba(0,0,0,0.45), 0 0 0 rgba(255,107,107,0);
    background: linear-gradient(180deg, rgba(77,5,5,0.14), rgba(255,20,20,0.02));
  }
  to {
    color: #ff4b4b;
    text-shadow: 0 1.5px 0 rgba(0,0,0,0.55), 0 6px 18px rgba(255,75,75,0.06);
    background: linear-gradient(180deg, rgba(77,5,5,0.22), rgba(20,5,5,0.06));
  }
}

/* subtle pulsing animation for hovered state (green, for Unban) */
@keyframes pulse-green {
  from {
    color: #8ee08e;
    text-shadow: 0 1px 0 rgba(0,0,0,0.35), 0 0 0 rgba(142,224,142,0);
    background: linear-gradient(180deg, rgba(12,55,12,0.08), rgba(20,120,20,0.02));
  }
  to {
    color: #5fc75f;
    text-shadow: 0 1.5px 0 rgba(0,0,0,0.45), 0 6px 18px rgba(95,199,95,0.06);
    background: linear-gradient(180deg, rgba(12,55,12,0.14), rgba(20,120,20,0.04));
  }
}

header button:hover,
header button:focus {
  transform: translateY(-2px);
  /* dim red background */
  background: linear-gradient(180deg, rgba(77,5,5,0.18), rgba(20,5,5,0.06));
  /* red + heavier */
  color: #ff4b4b;
  font-weight: 700;
  /* make it read heavier visually */
  text-shadow: 0 1.5px 0 rgba(0,0,0,0.55);
  box-shadow: 0 10px 20px rgba(255,75,75,0.12);
  outline: none;
  /* animated pulse while hovered/focused */
  animation: pulse-red 900ms ease-in-out infinite alternate;
}

header button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  animation: none;
}

header button:focus-visible {
  box-shadow: 0 0 0 4px rgba(255,75,75,0.09);
}

/* main/content layout */
main {
  padding: 1.5rem;
}

table {
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  border: 1px solid #333;
  padding: 0.5rem;
}

/* stage toggle buttons - styled like remove/unban buttons, show a power icon.
   Add class "power-only" to hide the text label and display only the icon. */

/* shared base for stage buttons */
.stage_on_btn,
.stage_off_btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  color: #eaeaf0;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  user-select: none;
  min-width: 40px;
  height: 34px;
  box-sizing: border-box;
  transition: box-shadow 200ms ease, background 200ms ease, color 200ms ease;
  transform: none;
}

/* power icon displayed before content; if you want only the icon, add class "power-only" to the element */
.stage_on_btn::before,
.stage_off_btn::before {
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
}

/* default visual variants */
.stage_on_btn {
  /* green-themed baseline */
  background: linear-gradient(180deg, rgba(12,55,12,0.06), rgba(20,120,20,0.02));
  border: 1px solid rgba(95,199,95,0.08);
}

.stage_off_btn {
  /* red-themed baseline */
  background: linear-gradient(180deg, rgba(77,5,5,0.06), rgba(20,5,5,0.02));
  border: 1px solid rgba(255,75,75,0.08);
}

/* hover / focus states mirror remove_btn behavior but without translation */
.stage_on_btn:hover,
.stage_on_btn:focus {
  transform: none !important;
  background: linear-gradient(180deg, rgba(12,55,12,0.14), rgba(20,120,20,0.04));
  color: #5fc75f;
  font-weight: 700;
  text-shadow: 0 1.5px 0 rgba(0,0,0,0.45);
  box-shadow: 0 10px 20px rgba(95,199,95,0.10);
  outline: none;
  animation: pulse-green 900ms ease-in-out infinite alternate;
}

.stage_on_btn:active {
  transform: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  animation: none;
}

.stage_off_btn:hover,
.stage_off_btn:focus {
  transform: none !important;
  background: linear-gradient(180deg, rgba(77,5,5,0.18), rgba(20,5,5,0.06));
  color: #ff4b4b;
  font-weight: 700;
  text-shadow: 0 1.5px 0 rgba(0,0,0,0.55);
  box-shadow: 0 10px 20px rgba(255,75,75,0.12);
  outline: none;
  animation: pulse-red 900ms ease-in-out infinite alternate;
}

.stage_off_btn:active {
  transform: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  animation: none;
}

/* power-only variant: hides textual label and shows only the power symbol (keep for accessibility via aria-label) */
.stage_on_btn.power-only,
.stage_off_btn.power-only {
  padding: 0;
  width: 36px;
  height: 36px;
  font-size: 0; /* hide raw text */
}

.stage_on_btn.power-only::before,
.stage_off_btn.power-only::before {
  font-size: 1.15rem;
  color: inherit;
}

/* remove button: visually matches header buttons but does NOT translate on hover.
   Supports .remove_btn (default delete look) and .remove_btn.unban (green for "Unban"). */
.remove_btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  color: #eaeaf0;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
  /* no movement: explicitly disable translate-based hover */
  transform: none;
}

.remove_btn:hover,
.remove_btn:focus {
  /* do not translate; only visual emphasis */
  transform: none !important;
  background: linear-gradient(180deg, rgba(77,5,5,0.18), rgba(20,5,5,0.06));
  color: #ff4b4b;
  font-weight: 700;
  text-shadow: 0 1.5px 0 rgba(0,0,0,0.55);
  box-shadow: 0 10px 20px rgba(255,75,75,0.12);
  outline: none;
  animation: pulse-red 900ms ease-in-out infinite alternate;
}

/* variant: use for "Unban" buttons (add class "unban" to the element) */
.remove_btn.unban {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005));
  border: 1px solid rgba(255,255,255,0.04);
}

.remove_btn.unban:hover,
.remove_btn.unban:focus {
  transform: none !important;
  background: linear-gradient(180deg, rgba(12,55,12,0.14), rgba(20,120,20,0.04));
  color: #5fc75f;
  font-weight: 700;
  text-shadow: 0 1.5px 0 rgba(0,0,0,0.45);
  box-shadow: 0 10px 20px rgba(95,199,95,0.10);
  outline: none;
  animation: pulse-green 900ms ease-in-out infinite alternate;
}

footer {
  background: #16161d;
  color: #888;
  text-align: center;
  padding: 1rem;
  position: fixed;
  width: 100%;
  bottom: 0;
}

footer p {
  margin: 0;
  font-style: italic;
}

#login-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: #1e1e25;
  border-radius: 8px;
  border: #eaeaf0 1px solid;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#login-title {
  margin-bottom: 1rem;
  text-align: center;
  margin-top: 0;
}

#login-subtitle {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #bbb;
  font-size: 0.7rem;
  font-style: italic;
}

#login-form {
  display: flex;
  flex-direction: column;
}

.login-label {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.login-input {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.3rem;
  border: 1px solid #555;
  border-radius: 4px;
  box-sizing: border-box;
  background: #2e2e35;
  color: #eaeaf0;
}

#login-button {
  padding: 0.7rem;
  background: #eaeaf0;
  color: #2e2e35;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
}

#login-button:hover,
#login-button:focus {
  background: #357abd;
  color: #eaeaf0;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(53,122,189,0.22);
}

#login-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}