/* ============================================
   Delhi Traffic Police - Intelligence Portal
   Premium Dark Theme with Glass Effects
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0066ff;
  --primary-light: #3d8bff;
  --primary-dark: #0044cc;
  --accent: #ff6b35;
  --accent-light: #ff8c5a;
  --bg-dark: #0b0f1a;
  --bg-card: rgba(15, 20, 35, 0.85);
  --bg-input: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --border-focus: rgba(0,102,255,0.5);
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.5);
  --text-secondary: rgba(255,255,255,0.7);
  --glass: rgba(255,255,255,0.03);
  --success: #00c853;
  --error: #ff5252;
  --warning: #ffab00;
  --radius: 14px;
  --radius-lg: 24px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
}

/* ===== CONTAINER ===== */
.container { display: flex; width: 100%; height: 100vh; }

/* ===== LEFT PANEL ===== */
.left-panel {
  position: relative;
  width: 50%;
  display: flex;
  align-items: center;
  padding: 60px;
  overflow: hidden;
}

.bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
}

.video-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(
    160deg,
    rgba(8,12,28,0.95) 0%,
    rgba(0,30,80,0.85) 40%,
    rgba(8,12,28,0.92) 100%
  );
}

.left-content {
  position: relative; z-index: 3;
  max-width: 460px;
}

.left-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #94b8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.left-content h4 {
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 700;
}

.headline {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.8;
  color: white;
  margin-bottom: 32px;
}

.left-badges {
  display: flex; gap: 10px; flex-wrap: wrap;
}

.left-badges .badge-item {
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,102,255,0.1);
  border: 1px solid rgba(0,102,255,0.25);
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.left-badges .badge-item span { font-size: 0.9rem; }

.left-socials {
  display: flex; gap: 12px; margin-top: 20px;
}

.social-icon-sm {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: rgba(255,255,255,0.7);
}

/* ===== RIGHT PANEL ===== */
.right-panel {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,60,150,0.08) 0%, transparent 60%),
              var(--bg-dark);
  padding: 24px;
}

/* ===== AUTH CARD ===== */
.auth-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 70px 32px 28px;
  width: 400px;
  max-width: 95%;
  box-shadow:
    0 24px 48px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.02) inset,
    0 1px 0 rgba(255,255,255,0.04) inset;
}

/* Accent line top */
.auth-card::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 80px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 0 0 3px 3px;
}

/* ===== LOGO ===== */
.auth-logo {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2;
}

.auth-logo img {
  width: 48px; height: 48px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,102,255,0.3));
  transition: transform 0.3s;
}

.auth-logo img:hover { transform: scale(1.1); }

/* ===== FORMS ===== */
.form {
  display: none; flex-direction: column;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.form.active { display: flex; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.form h2 {
  font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 2px;
}

.subtitle {
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.4;
}

/* ===== FORM HEADER ===== */
.form-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 6px;
}

.back-icon {
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--glass);
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all 0.2s;
}

.back-icon:hover {
  background: rgba(0,102,255,0.1); border-color: var(--primary);
  color: var(--primary-light);
}

/* ===== OPTION BUTTONS ===== */
.option-btn {
  width: 100%; padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--glass);
  font-size: 0.92rem; font-weight: 500; color: var(--text);
  cursor: pointer; display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(4px);
}

.option-btn:hover {
  border-color: var(--primary);
  background: rgba(0,102,255,0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,102,255,0.12);
}

.option-btn:active { transform: translateY(0); }

.btn-icon { width: 22px; height: 22px; }
.btn-icon-text { font-size: 1.3rem; width: 26px; text-align: center; }

.google-btn:hover { border-color: #4285f4; background: rgba(66,133,244,0.06); }
.mfa-btn:hover { border-color: var(--accent); background: rgba(255,107,53,0.06); }

/* ===== INNER TABS ===== */
.inner-tabs {
  display: flex;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 3px;
  margin-bottom: 18px; margin-top: 14px;
}

.inner-tab {
  flex: 1; padding: 9px 14px; background: transparent;
  border: none; font-size: 0.82rem; color: var(--text-muted);
  cursor: pointer; border-radius: 8px; font-weight: 500;
  transition: all 0.25s;
}

.inner-tab.active {
  background: var(--primary);
  color: var(--text); font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,102,255,0.3);
}

.inner-tab:hover:not(.active) { color: var(--text-secondary); }

/* ===== INNER FORMS ===== */
.inner-form { display: none; flex-direction: column; animation: slideUp 0.25s ease; }
.inner-form.active { display: flex; }

/* ===== INPUTS ===== */
.input-group { margin-bottom: 12px; }

input {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text); font-size: 0.9rem;
  outline: none; transition: all 0.3s;
}

input::placeholder { color: var(--text-muted); }

input:focus {
  border-color: var(--border-focus);
  background: rgba(0,102,255,0.03);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.08);
}

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
  width: 100%; padding: 14px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--text); font-size: 0.92rem; font-weight: 600;
  cursor: pointer; margin-top: 6px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0,102,255,0.25);
  letter-spacing: 0.2px;
}

.submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 8px 24px rgba(0,102,255,0.35);
  transform: translateY(-2px);
}

.submit-btn:active { transform: translateY(0); }

.bio-submit {
  background: linear-gradient(135deg, #6c63ff 0%, #4834d4 100%);
  box-shadow: 0 4px 16px rgba(108,99,255,0.25);
}

.bio-submit:hover {
  background: linear-gradient(135deg, #7c74ff 0%, #5a4ae0 100%);
  box-shadow: 0 8px 24px rgba(108,99,255,0.35);
}

/* ===== QR SECTION ===== */
.qr-section {
  text-align: center; margin-bottom: 16px; padding: 16px;
  background: rgba(255,255,255,0.02);
  border-radius: 16px; border: 1px solid var(--border);
}

.qr-image {
  width: 160px; height: 160px; border-radius: 12px;
  border: 2px solid var(--primary); margin: 8px auto; display: block;
  box-shadow: 0 4px 20px rgba(0,102,255,0.15);
}

/* ===== MESSAGES ===== */
.message {
  margin-top: 12px; font-size: 0.8rem; min-height: 16px;
  color: var(--error); text-align: center; font-weight: 500;
}

/* ===== GOVT BADGE ===== */
.govt-badge {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; color: var(--text-muted); text-align: center;
  letter-spacing: 0.5px;
}

/* ===== GLOW EFFECTS ===== */
.right-panel::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,102,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.right-panel::after {
  content: '';
  position: absolute; bottom: -150px; left: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,107,53,0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .container { flex-direction: column; }
  .left-panel { width: 100%; min-height: 28vh; padding: 30px; }
  .left-content h1 { font-size: 1.8rem; }
  .auth-card { width: 100%; max-width: 420px; }
}

@media (max-width: 480px) {
  .left-panel { min-height: 22vh; padding: 20px; }
  .left-content h1 { font-size: 1.5rem; }
  .auth-card { padding: 68px 22px 26px; }
  .option-btn { padding: 13px 16px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ===== SELECTION ===== */
::selection { background: rgba(0,102,255,0.3); color: white; }

/* ===== PROJECT NAME ===== */
.project-name {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #4a3f8a 0%, #8b3a62 50%, #a04040 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
  padding: 0;
}

.theme-toggle:hover {
  background: rgba(0,102,255,0.1);
  border-color: var(--primary);
  transform: rotate(20deg);
}

/* ===== LIGHT THEME ===== */
body.light {
  --bg-dark: #f4f6fa;
  --bg-card: rgba(255,255,255,0.98);
  --bg-input: #f8f9fc;
  --border: rgba(0,0,0,0.1);
  --border-focus: rgba(0,102,255,0.4);
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --text-secondary: #374151;
  --glass: rgba(0,0,0,0.02);
  --error: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
}

body.light {
  background: #f4f6fa;
}

body.light .right-panel {
  background: #f4f6fa;
}

body.light .right-panel::before,
body.light .right-panel::after {
  opacity: 0.3;
}

body.light .auth-card {
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.06);
}

body.light .auth-card::before {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

body.light .project-name {
  background: linear-gradient(135deg, #0044cc 0%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light .form h2 { color: #111827; }
body.light .subtitle { color: #6b7280; }

body.light input {
  background: #f8f9fc;
  border: 1.5px solid #e5e7eb;
  color: #111827;
}

body.light input::placeholder { color: #9ca3af; }

body.light input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0,102,255,0.08);
}

body.light .option-btn {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  color: #374151;
}

body.light .option-btn:hover {
  background: #f0f4ff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,102,255,0.08);
}

body.light .google-btn:hover { border-color: #ea4335; background: #fef7f6; }
body.light .mfa-btn:hover { border-color: var(--accent); background: #fff8f5; }

body.light .left-badges .badge-item {
  background: rgba(0,102,255,0.08); border-color: rgba(0,102,255,0.2);
  color: #1d4ed8;
}

body.light .left-socials .social-icon-sm {
  background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); color: #374151;
}

body.light .inner-tabs {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

body.light .inner-tab { color: #6b7280; }
body.light .inner-tab.active {
  background: var(--primary);
  color: #ffffff;
}

body.light .back-icon {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
}

body.light .back-icon:hover {
  background: #f0f4ff;
  border-color: var(--primary);
  color: var(--primary);
}

body.light .submit-btn {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #ffffff;
}

body.light .message { color: #dc2626; }

body.light .govt-badge { color: #9ca3af; }

body.light .theme-toggle {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
}

body.light .theme-toggle:hover {
  background: #f0f4ff;
  border-color: var(--primary);
}

body.light .qr-section {
  background: #f8f9fc;
  border: 1px solid #e5e7eb;
}

body.light .qr-image {
  border-color: var(--primary);
}


/* ===== DIVIDER ===== */
.divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  position: relative;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.divider::before, .divider::after {
  content: '';
  height: 1px;
  background: var(--border);
  width: 42%;
  position: absolute;
  top: 50%;
}

.divider::before { left: 0; }
.divider::after { right: 0; }


/* ===== LIGHT THEME LEFT PANEL ANIMATED BACKGROUND ===== */
body.light .left-panel {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 50%, #1a3a6b 100%);
}

body.light .video-overlay {
  background: linear-gradient(135deg, rgba(15,39,68,0.92) 0%, rgba(30,58,95,0.85) 50%, rgba(15,39,68,0.9) 100%);
}

body.light .left-content h1 { color: #ffffff; }
body.light .left-content h4 { color: #ff8c42; }
body.light .headline { color: rgba(255,255,255,0.8); }

/* Floating particles animation for light theme */
body.light .left-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(3px 3px at 60% 20%, rgba(100,180,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 50%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(2px 2px at 10% 80%, rgba(100,180,255,0.2) 0%, transparent 100%),
    radial-gradient(3px 3px at 70% 85%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 50% 50%, rgba(100,200,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 30% 10%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 90% 15%, rgba(100,180,255,0.25) 0%, transparent 100%),
    radial-gradient(3px 3px at 15% 55%, rgba(255,255,255,0.15) 0%, transparent 100%);
  animation: floatParticles 20s linear infinite;
  pointer-events: none;
}

@keyframes floatParticles {
  0% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-10px) translateX(5px); }
  50% { transform: translateY(-5px) translateX(-5px); }
  75% { transform: translateY(-15px) translateX(3px); }
  100% { transform: translateY(0) translateX(0); }
}

/* Glowing orbs */
body.light .left-panel::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 2;
  animation: pulseOrb 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

/* Network grid lines */
body.light .left-badges .badge-item {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #ffffff;
}

body.light .left-socials .social-icon-sm {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}
