:root {
  --accent: #ff3b3b;
  --text: #ececf2;
  --bg-red-dark: #2a0004;
  --bg-red: #7a0013;
  --bg-bright: #d1002f;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --muted: #c7c7d0;
  --card-radius: 18px;
  --transition: 280ms cubic-bezier(.2, .9, .2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, system-ui, Arial, sans-serif;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
}

/* Site Loader */
.site-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2a0004, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.site-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.loader-logo {
  width: 250px;
  height: 170px;
  animation: spinAndPulse 1.5s ease-in-out infinite, bounce 1.2s ease-in-out infinite;
  position: relative;
}
.loader-logo::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 42, 81, 0.3), transparent);
  filter: blur(10px);
  z-index: -1;
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes spinAndPulse {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes glowPulse {
  0% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(1); }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Dynamic Background */
#dynamic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #1a0000 0%, #0a0000 100%);
}
.light-trail {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(255, 42, 81, 0.4), transparent);
  animation: moveTrail 10s linear infinite;
}
.trail-1 { width: 100%; height: 2px; top: 20%; }
.trail-2 { width: 100%; height: 2px; top: 50%; animation-delay: 2s; }
.trail-3 { width: 100%; height: 2px; top: 80%; animation-delay: 4s; }
.spiral-trail {
  position: absolute;
  width: 200px;
  height: 200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.spiral-inner {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 42, 81, 0.3);
  border-radius: 50%;
  animation: spinSpiral 15s linear infinite;
}
.lens-flare {
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 42, 81, 0.2), transparent);
  top: 30%;
  left: 70%;
  animation: flarePulse 5s ease-in-out infinite;
}
@keyframes moveTrail {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes spinSpiral {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes flarePulse {
  0% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.5); opacity: 0.4; }
  100% { transform: scale(1); opacity: 0.2; }
}

/* General Styles */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
header { position: sticky; top: 0; z-index: 80; }
.navbar {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.16));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 14px 0;
}
.navbar:after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  pointer-events: none;
  z-index: -1;
  filter: blur(18px);
  opacity: 0.6;
  background: linear-gradient(90deg, rgba(255, 42, 81, 0.10), rgba(255, 255, 255, 0.04));
  animation: glowSlow 6s ease-in-out infinite;
}
@keyframes glowSlow {
  0% { transform: scale(0.995); opacity: 0.55; }
  50% { transform: scale(1.01); opacity: 0.8; }
  100% { transform: scale(0.995); opacity: 0.55; }
}
.navbar .container { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  flex-wrap: nowrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 106px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
}
.brand .title { font-weight: 800; font-size: 18px; }
nav.nav-links { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  flex-grow: 1; 
  justify-content: center; 
  position: relative;
}
nav.nav-links ul { 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  display: flex; 
  gap: 12px; 
  align-items: center; 
}
nav.nav-links li { position: relative; }
nav.nav-links a { 
  color: var(--muted); 
  text-decoration: none; 
  font-weight: 600; 
  padding: 8px 12px; 
  transition: color var(--transition); 
}
nav.nav-links a:hover { color: var(--text); }
nav.nav-links .dropdown { 
  position: relative; 
}
nav.nav-links .dropdown-content { 
  position: absolute; 
  top: 100%; 
  left: 0; 
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px; 
  display: none; 
  flex-direction: column; 
  min-width: 160px; 
  z-index: 10; 
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); 
}
nav.nav-links li:hover .dropdown-content { display: flex; }
nav.nav-links .dropdown-content a { 
  padding: 10px 15px; 
  color: var(--muted); 
  display: block; 
}
nav.nav-links .dropdown-content a:hover { 
  color: var(--text); 
  background: rgba(255, 42, 81, 0.1); 
}
.auth-buttons { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
}
.menu-toggle { display: none; flex-direction: column; cursor: pointer; }
.bar { width: 25px; height: 3px; background-color: var(--text); margin: 4px 0; transition: 0.4s; }
.auth-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent), #b3002a);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 42, 81, 0.2);
  transition: transform var(--transition), box-shadow var(--transition);
  font-family: Poppins, sans-serif;
  text-decoration: none;
  position: relative;
}
.auth-btn:hover { transform: translateY(-4px); background: linear-gradient(45deg, #ff6a6a, var(--accent)); }
.auth-btn:before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 10px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 42, 81, 0.12), rgba(255, 255, 255, 0.06));
  filter: blur(10px);
  opacity: 0.85;
  transition: opacity .25s ease, transform .25s ease;
}
.auth-btn:hover:before { transform: scale(1.04); opacity: 1; }

/* Auth Section */
.auth-section {
  padding: 60px 0;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-container {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 40px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  max-width: 450px;
  width: 100%;
  position: relative;
  transition: transform var(--transition);
}
.auth-container:before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--card-radius) + 8px);
  background: linear-gradient(90deg, rgba(255, 42, 81, 0.06), rgba(255, 255, 255, 0.02));
  filter: blur(12px);
  opacity: 0.8;
  z-index: -1;
}
.auth-container.tilt:hover {
  transform: translateY(-12px) rotateX(6deg);
}
.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}
.auth-tab {
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  font-family: Poppins, sans-serif;
}
.auth-tab.active {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}
.auth-tab:hover {
  color: var(--text);
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: Inter, system-ui, Arial, sans-serif;
  font-size: 14px;
}
.auth-form input:focus {
  outline: 2px solid rgba(255, 42, 81, 0.18);
}
.auth-form button {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--accent), #b3002a);
  border: none;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 42, 81, 0.2);
  transition: transform var(--transition), background var(--transition);
  font-family: Poppins, sans-serif;
  position: relative;
}
.auth-form button:hover {
  transform: translateY(-6px);
  background: linear-gradient(45deg, #ff6a6a, var(--accent));
}
.auth-form button:before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 42, 81, 0.12), rgba(255, 255, 255, 0.06));
  filter: blur(12px);
  opacity: 0.85;
  transition: opacity .25s ease, transform .25s ease;
  z-index: -1;
}
.auth-form button:hover:before {
  transform: scale(1.04);
  opacity: 1;
}
.auth-form .forgot-password {
  text-align: right;
  margin-top: 10px;
}
.auth-form .forgot-password a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}
.auth-form .forgot-password a:hover {
  color: #ff6a6a;
}
.auth-error {
    display: none;
    color: red;
    margin-bottom: 15px;
    font-size: 14px;
}
.auth-error.show {
    display: block;
}

/* Popup Message */
.popup-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 20px 40px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  font-family: Poppins, sans-serif;
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.popup-message.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.popup-message:before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: calc(var(--card-radius) + 8px);
  background: linear-gradient(90deg, rgba(255, 42, 81, 0.06), rgba(255, 255, 255, 0.02));
  filter: blur(12px);
  opacity: 0.8;
  z-index: -1;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 16px;
  right: 16px;
  background: linear-gradient(180deg, var(--accent), #b3002a);
  color: var(--text);
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 8px 24px rgba(255, 42, 81, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2.2s ease-in-out infinite;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 40px rgba(255, 42, 81, 0.3);
}
.whatsapp-float i { line-height: 56px; }
.whatsapp-float:before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 42, 81, 0.12), rgba(255, 255, 255, 0.06));
  filter: blur(10px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  z-index: -1;
}
.whatsapp-float:hover:before {
  transform: scale(1.04);
  opacity: 0.85;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* Entrance Animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms cubic-bezier(.2, .9, .2, 1), transform 650ms cubic-bezier(.2, .9, .2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container { max-width: 960px; }
}
@media (max-width: 980px) {
  .auth-section { padding: 40px 0; }
  .auth-container { padding: 30px; }
  .navbar .container { 
    flex-wrap: wrap; 
    position: relative; 
    align-items: center; 
  }
  nav.nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    width: 100%;
    border-radius: 0 0 12px 12px;
    z-index: 1;
  }
  nav.nav-links.active { display: flex; }
  nav.nav-links ul { 
    flex-direction: column; 
    align-items: center; 
    width: 100%; 
  }
  nav.nav-links li { width: 100%; text-align: center; }
  nav.nav-links a { 
    display: block; 
    padding: 12px; 
  }
  .auth-buttons {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 20px;
  }
  .auth-buttons.active { display: flex; }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 2;
  }
  .menu-toggle.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
  .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
  .menu-toggle.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }
}
@media (max-width: 768px) {
  .container { max-width: 720px; }
  .auth-container { padding: 25px; }
  .auth-tabs { gap: 15px; }
  .auth-tab { font-size: 16px; }
  .auth-form input { padding: 10px 12px; }
  .auth-form button { padding: 10px 16px; font-size: 14px; }
  .popup-message { font-size: 16px; padding: 15px 30px; }
}
@media (max-width: 600px) {
  .container { max-width: 100%; padding: 0 15px; }
  .auth-container { padding: 20px; }
  .auth-tabs { gap: 10px; }
  .auth-tab { font-size: 14px; }
  .whatsapp-float { width: 60px; height: 60px; font-size: 30px; bottom: 10px; right: 10px; }
  .whatsapp-float i { line-height: 50px; }
  .popup-message { font-size: 14px; padding: 12px 25px; }
}
@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .auth-container { padding: 15px; }
  .auth-tab { font-size: 13px; }
  .auth-form input { font-size: 13px; }
  .auth-form button { font-size: 13px; }
  .whatsapp-float { width: 60px; height: 60px; font-size: 30px; bottom: 10px; right: 10px; }
  .whatsapp-float i { line-height: 40px; }
  .brand .logo { width: 150px; height: 32px; }
  .brand .title { font-size: 16px; }
  .loader-logo { width: 40px; height: 40px; }
  .popup-message { font-size: 13px; padding: 10px 20px; }
}