/* ==========================================================================
   Social AI Assistant - 3D Cyber Security Login Page Styling
   Matrix Green & Gold Palette
   ========================================================================== */

:root {
  --primary-color: #00e676;
  --secondary-color: #00a152;
  --accent-gold: #f59e0b;
  --bg-primary: #060e0a;
  --bg-secondary: #0a1711;
  --bg-card: rgba(10, 22, 16, 0.78);
  --bg-glass-heavy: rgba(8, 18, 13, 0.88);
  --border-glow: rgba(0, 230, 118, 0.35);
  --border-subtle: rgba(0, 230, 118, 0.15);

  --text-main: #f0fdf4;
  --text-light: #e8f5e9;
  --text-muted: #a5d6a7;
  --text-dim: #6b9a76;

  --gradient-brand: linear-gradient(135deg, #00e676 0%, #00c853 50%, #00796b 100%);
  --gradient-glow: radial-gradient(circle at center, rgba(0, 230, 118, 0.25) 0%, transparent 70%);

  --font-main: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --shadow-neon: 0 0 25px rgba(0, 230, 118, 0.45);
  --shadow-card: 0 20px 45px rgba(0, 0, 0, 0.75);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
}

/* 3D Canvas Background Container */
#canvas-container,
#canvas-container canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none !important;
  user-select: none !important;
  overflow: hidden;
}

/* Ambient Glows */
.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

.ambient-glow-1 {
  top: -120px;
  right: 15%;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.35) 0%, transparent 70%);
}

.ambient-glow-2 {
  bottom: -100px;
  left: 10%;
  background: radial-gradient(circle, rgba(0, 161, 82, 0.3) 0%, transparent 70%);
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.25; }
  100% { transform: scale(1.15); opacity: 0.4; }
}

/* Page Layout */
.login-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* Left Hero Brand Section */
.login-image-section {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem 6rem;
  position: relative;
}

.login-brand-content {
  max-width: 600px;
}

.brand-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-bottom: 2rem;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-color);
  animation: dotPulse 2s infinite;
}

@keyframes dotPulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.brand-logo-large {
  margin-bottom: 1.5rem;
}

.brand-logo-large img {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 20px rgba(0, 230, 118, 0.6));
}

.brand-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 40%, #00e676 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.security-features-badge {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.feat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(10, 22, 16, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.feat-item i {
  color: var(--primary-color);
}

/* Right Form Section */
.login-form-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  position: relative;
}

/* 3D Tilt Login Card */
.login-box {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card), 0 0 25px rgba(0, 230, 118, 0.12);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.card-glow-spot {
  position: absolute;
  top: 0;
  left: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.login-icon-wrap {
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  color: var(--primary-color);
  font-size: 1.6rem;
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.25);
}

.login-box h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

.login-box p.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Alerts */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde047;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.35rem;
  position: relative;
  z-index: 1;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

.form-group label i {
  color: var(--primary-color);
  font-size: 0.85rem;
}

.input-wrap {
  position: relative;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(6, 14, 10, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-main);
  transition: all 0.25s ease;
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control:focus {
  outline: none;
  background: rgba(6, 14, 10, 0.9);
  border-color: var(--primary-color);
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.35);
}

/* Password Reset */
.password-reset-link {
  text-align: right;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.password-reset-link a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}

.password-reset-link a:hover {
  color: var(--primary-color);
}

/* Submit Button */
.submit-row {
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.btn-login-3d {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: var(--gradient-brand);
  border: none;
  border-radius: var(--radius-sm);
  color: #060e0a;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-main);
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 230, 118, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-login-3d:hover {
  box-shadow: var(--shadow-neon);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-login-3d:active {
  transform: translateY(0);
}

/* Back Link */
.login-footer-info {
  margin-top: 1.75rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  position: relative;
  z-index: 1;
}

.back-home-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.back-home-link:hover {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.4);
}

/* Responsive */
@media (max-width: 992px) {
  .login-container {
    flex-direction: column;
    overflow-y: auto;
  }

  .login-image-section {
    flex: none;
    padding: 2.5rem 1.5rem 1rem;
    align-items: center;
    text-align: center;
  }

  .brand-title {
    font-size: 2rem;
  }

  .security-features-badge {
    justify-content: center;
  }

  .login-form-section {
    padding: 1.5rem;
  }
}
