/* Custom CSS for AURA 3D Premium Login & Registration Template */

/* ========================================== */
/* 1. Theme Presets (Data Attribute Scoped)   */
/* ========================================== */

/* Preset 1: Cyber Neon Violet (Default) */
:root, [data-color-theme="neon"] {
  --bg-gradient-1: #070a12;
  --bg-gradient-2: #0f172a;
  --glass-bg: rgba(15, 23, 42, 0.82);
  --glass-border: rgba(139, 92, 246, 0.28);
  --glass-border-focus: rgba(217, 70, 239, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 45px rgba(139, 92, 246, 0.25);
  --input-bg: rgba(30, 41, 59, 0.75);
  --accent-glow: rgba(139, 92, 246, 0.45);
  --accent-primary: #8b5cf6;
  --accent-secondary: #d946ef;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

/* Preset 2: Electric Cyan & Gold */
[data-color-theme="cyan"] {
  --bg-gradient-1: #050811;
  --bg-gradient-2: #0d1527;
  --glass-bg: rgba(13, 21, 39, 0.82);
  --glass-border: rgba(6, 182, 212, 0.28);
  --glass-border-focus: rgba(16, 185, 129, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 45px rgba(6, 182, 212, 0.25);
  --input-bg: rgba(20, 30, 55, 0.8);
  --accent-glow: rgba(6, 182, 212, 0.45);
  --accent-primary: #06b6d4;
  --accent-secondary: #10b981;
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #10b981 50%, #f59e0b 100%);
}

/* Preset 3: Sunset Crimson & Rose Gold */
[data-color-theme="crimson"] {
  --bg-gradient-1: #120509;
  --bg-gradient-2: #240b15;
  --glass-bg: rgba(36, 11, 21, 0.82);
  --glass-border: rgba(244, 63, 94, 0.28);
  --glass-border-focus: rgba(251, 113, 133, 0.7);
  --text-main: #fff1f2;
  --text-muted: #fda4af;
  --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 45px rgba(244, 63, 94, 0.25);
  --input-bg: rgba(45, 15, 28, 0.8);
  --accent-glow: rgba(244, 63, 94, 0.45);
  --accent-primary: #f43f5e;
  --accent-secondary: #fb7185;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #e11d48 50%, #fbbf24 100%);
}

/* Preset 4: Emerald Matrix & Mint */
[data-color-theme="emerald"] {
  --bg-gradient-1: #03120c;
  --bg-gradient-2: #082419;
  --glass-bg: rgba(8, 36, 25, 0.82);
  --glass-border: rgba(16, 185, 129, 0.28);
  --glass-border-focus: rgba(52, 211, 153, 0.7);
  --text-main: #ecfdf5;
  --text-muted: #6ee7b7;
  --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9), 0 0 45px rgba(16, 185, 129, 0.25);
  --input-bg: rgba(12, 45, 32, 0.8);
  --accent-glow: rgba(16, 185, 129, 0.45);
  --accent-primary: #10b981;
  --accent-secondary: #84cc16;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 50%, #84cc16 100%);
}

[data-theme="light"] {
  --bg-gradient-1: #f8fafc;
  --bg-gradient-2: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(15, 23, 42, 0.12);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12), 0 0 35px rgba(99, 102, 241, 0.18);
  --input-bg: rgba(241, 245, 249, 0.95);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body {
  background: radial-gradient(circle at 50% 50%, var(--bg-gradient-2) 0%, var(--bg-gradient-1) 100%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Canvas */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Main Container Perspective */
.card-perspective-container {
  perspective: 1200px;
  perspective-origin: center center;
  z-index: 10;
  position: relative;
  width: 100%;
  max-width: 480px;
}

/* 3D Interactive Card Wrapper */
.card-3d-wrapper {
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

/* 3D Flip Animation Trigger Class */
.card-3d-wrapper.is-flipping {
  transform: rotateY(90deg) scale(0.92) !important;
  opacity: 0.7;
}

/* Glassmorphism Card Base */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--card-shadow);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Animated Border Glow Accent */
.glass-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--accent-gradient);
  border-radius: 1.5rem;
  z-index: -1;
  opacity: 0.35;
  filter: blur(14px);
  transition: opacity 0.4s ease;
}

.glass-card:hover::before {
  opacity: 0.65;
}

/* View Container Visibility */
.auth-view {
  width: 100%;
  border-radius: 1.5rem;
}

.auth-view.active-view {
  display: block;
  opacity: 1;
  pointer-events: auto;
  animation: viewFadeIn 0.4s ease forwards;
}

.auth-view.inactive-view {
  display: none;
  opacity: 0;
  pointer-events: none;
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Form Inputs Styling */
.custom-input-group {
  position: relative;
}

.custom-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: 0.75rem;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.custom-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.custom-input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
}

.custom-input:focus + .custom-input-icon,
.custom-input-group:focus-within .custom-input-icon {
  color: var(--accent-primary);
}

/* Interactive Primary Button */
.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.85rem 1.5rem;
  border: none;
  cursor: pointer;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px var(--accent-glow);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 15px 30px -5px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
}

/* Button Shimmer */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.8s ease;
}

.btn-primary:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* Social Buttons */
.btn-social {
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--glass-border-focus);
  transform: translateY(-2px);
}

/* Password Strength Meter */
.strength-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 0.4s ease, background-color 0.4s ease;
}

/* OTP 6-Digit Inputs */
.otp-input {
  width: 3rem;
  height: 3.4rem;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--input-bg);
  border: 2px solid var(--glass-border);
  border-radius: 0.75rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.3s ease;
}

.otp-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: scale(1.05);
}

/* Floating Glass Badges & Pills */
.glass-pill {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Theme Switcher Quick Pills */
.theme-picker-pill {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-picker-pill:hover {
  transform: scale(1.2);
}

.theme-picker-pill.active-theme {
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast.toast-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--card-shadow);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}
