:root {
  --red: #E42026;
  --black: #1a1a1a;
  --font: system-ui, sans-serif;
  --mono: 'Courier New', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font); color: #fff; height: 100vh; display: flex; flex-direction: column;
  background: var(--black);
  overflow: hidden;
}

.login-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.login-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(228,32,38,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(228,32,38,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 4s ease-in-out infinite;
}

.login-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(228,32,38,0.04) 49%, rgba(228,32,38,0.04) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(228,32,38,0.03) 49%, rgba(228,32,38,0.03) 51%, transparent 52%);
  background-size: 120px 120px;
  animation: gridPulse 4s ease-in-out infinite reverse;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.login-container .glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228,32,38,0.08) 0%, transparent 70%);
  animation: glowPulse 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(0.8); opacity: 0.5; }
  50%      { transform: scale(1.2); opacity: 1; }
}

header {
  background: #fff;
  border-bottom: 3px solid var(--red);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  position: relative;
  z-index: 2;
}
header h1 { font-size: 1rem; font-weight: 700; letter-spacing: 0.05em; color: var(--black); }
header span { font-family: var(--mono); font-size: 0.65rem; color: #999; text-transform: uppercase; }

.login-box {
  width: 360px;
  padding: 2.5rem 2rem;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  border: 1px solid rgba(228, 32, 38, 0.15);
  box-shadow: 0 0 40px rgba(228, 32, 38, 0.05), 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

.login-box .field { margin-bottom: 1rem; }
.login-box .field:last-of-type { margin-bottom: 0; }

.login-box label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #888;
  margin-bottom: 0.5rem;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--black);
  border: 1px solid #333;
  border-radius: 4px;
  color: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-box input:focus {
  border-color: var(--red);
  box-shadow: 0 0 8px rgba(228, 32, 38, 0.2);
}

.login-box button {
  width: 100%;
  margin-top: 1.2rem;
  padding: 0.7rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.login-box button:hover { opacity: 0.9; }
.login-box button:disabled { opacity: 0.5; cursor: wait; }

.error-msg {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--red);
  text-align: center;
  min-height: 1.2em;
}

footer {
  height: 28px; background: var(--black); display: flex; align-items: center;
  justify-content: center; font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.2); text-transform: uppercase;
  position: relative; z-index: 2;
}

.login-lang-switch {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 2;
}
.login-lang-switch a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  opacity: 0.75;
  transition: transform 0.15s, opacity 0.15s;
}
.login-lang-switch a:hover { opacity: 0.9; }
.login-lang-switch a.active { opacity: 1; }
.login-lang-switch img {
  width: 18px;
  height: 12px;
  border-radius: 1.5px;
  display: block;
  transition: width 0.15s, height 0.15s;
}
.login-lang-switch a.active img {
  width: 24px;
  height: 16px;
}
