/* ======================================= */
/* === UXMAILS "NEBULA SMOKE" LOGIN === */
/* ======================================= */

:root {
  --primary: #0ea5e9;
  --text-white: #ffffff;
  --text-muted: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(0, 0, 0, 0.3);
}

body {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #0f172a; /* Deep dark base */
  color: var(--text-white);
  overflow: hidden; /* No scrollbars for the animation */
  height: 100vh;
  position: relative;
}

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

/* ================================= */
/* === ✅ ANIMATED SMOKE ENGINE === */
/* ================================= */

.smoke-background {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  overflow: hidden;
  background: #020617; /* Very dark blue/black base */
}

.smoke-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px); /* This creates the smoke effect */
  opacity: 0.6;
  animation: floatSmoke 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

/* Define 8-10 Colors floating around */
.color-1 { background: #4f46e5; width: 600px; height: 600px; top: -100px; left: -100px; animation-duration: 25s; } /* Indigo */
.color-2 { background: #db2777; width: 500px; height: 500px; top: 20%; right: -100px; animation-duration: 18s; animation-delay: -5s;} /* Pink */
.color-3 { background: #0ea5e9; width: 400px; height: 400px; bottom: -50px; left: 20%; animation-duration: 22s; animation-delay: -10s;} /* Sky Blue */
.color-4 { background: #7c3aed; width: 450px; height: 450px; bottom: 10%; right: 10%; animation-duration: 28s; } /* Violet */
.color-5 { background: #059669; width: 300px; height: 300px; top: 40%; left: 40%; animation-duration: 30s; opacity: 0.4; } /* Emerald */
.color-6 { background: #ea580c; width: 350px; height: 350px; top: 10%; left: 30%; animation-duration: 24s; opacity: 0.5; } /* Orange */
.color-7 { background: #dc2626; width: 400px; height: 400px; bottom: 0; right: 40%; animation-duration: 20s; opacity: 0.4; } /* Red */
.color-8 { background: #22d3ee; width: 200px; height: 200px; top: 50%; right: 50%; animation-duration: 15s; } /* Cyan */

@keyframes floatSmoke {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 40px) scale(1.1); }
  100% { transform: translate(-30px, -50px) scale(0.95); }
}

/* Glass Overlay to smooth everything out */
.glass-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(100px); /* Extreme blur to blend colors into smoke */
}

/* ================================= */
/* === CENTERED CARD === */
/* ================================= */

.login-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 1rem;
}

.login-card-glass {
  width: 100%;
  max-width: 400px;
  background: rgba(30, 41, 59, 0.4); /* See-through dark */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px); /* Frost effect */
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.5s ease-out;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Header --- */
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-circle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: #0f172a;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.login-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
}

.login-header p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Inputs --- */
.input-group {
  margin-bottom: 1.25rem;
}

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

.input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  z-index: 2;
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
}

.toggle-password {
  position: absolute;
  right: 1rem;
  color: #94a3b8;
  cursor: pointer;
}

/* --- Login Button --- */
.btn-glow {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(90deg, #0ea5e9, #2563eb);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
  margin-top: 0.5rem;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
  background: linear-gradient(90deg, #38bdf8, #3b82f6);
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.1);
}
.divider span { padding: 0 10px; }

/* --- Discord Button --- */
.btn-discord {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0.8rem;
  background: rgba(88, 101, 242, 0.15); /* Transparent Blurple */
  border: 1px solid #5865F2;
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-discord:hover {
  background: #5865F2;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
}

/* --- Footer --- */
.login-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}
.highlight {
  color: var(--primary);
  font-weight: 600;
}

/* --- Error Message --- */
.error-message {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: #fca5a5;
  padding: 0.8rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

/* --- Toggle Button Position --- */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 40px; 
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(5px);
}
/* For this theme, Dark Mode is default, Light mode adds opacity to background */
body:not(.dark-mode) .smoke-background {
    opacity: 0.5;
    background: #f1f5f9;
}
body:not(.dark-mode) .login-card-glass {
    background: rgba(255, 255, 255, 0.75);
    color: #1e293b;
}
body:not(.dark-mode) .login-header h2 { color: #1e293b; }
body:not(.dark-mode) input { 
    background: rgba(255,255,255,0.8); 
    color: #000;
    border-color: #ccc;
}
body:not(.dark-mode) .input-icon { color: #666; }