/* ═══════════════════════════════════════════════════════
   Login Page Styles
   ═══════════════════════════════════════════════════════ */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 92, 252, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 252, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 400px at 50% 50%, var(--accent-glow), transparent);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% { opacity: 0.3; }
  100% { opacity: 0.7; }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(124, 92, 252, 0.05);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* Logo Area */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

.logo-fallback {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 200px;
}

.cube-icon {
  width: 40px;
  height: 40px;
  position: relative;
  transform-style: preserve-3d;
  animation: cubeRotate 12s infinite linear;
}

@keyframes cubeRotate {
  0% { transform: rotateX(-20deg) rotateY(0deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

.cube-face {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--accent);
  background: rgba(124, 92, 252, 0.05);
  border-radius: 4px;
}

.front  { transform: translateZ(20px); }
.back   { transform: rotateY(180deg) translateZ(20px); }
.right  { transform: rotateY(90deg) translateZ(20px); }
.left   { transform: rotateY(-90deg) translateZ(20px); }
.top    { transform: rotateX(90deg) translateZ(20px); }
.bottom { transform: rotateX(-90deg) translateZ(20px); }

.login-logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.login-logo h1 span {
  color: var(--accent);
  font-weight: 300;
}

.login-logo .subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 8px;
}

.shield-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--accent);
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.input-wrapper input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:focus + .input-icon {
  color: var(--accent);
}

.toggle-pw {
  position: absolute;
  right: 10px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}
.toggle-pw:hover { color: var(--text-secondary); }
.toggle-pw svg { width: 18px; height: 18px; }

.btn-login {
  margin-top: 8px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  justify-content: center;
  letter-spacing: 0.02em;
}

.btn-discord {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 24px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  margin-top: 8px;
}
.btn-discord:hover {
  background: #4752C4;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.login-footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}
