/* Premium Geometric Background - Inspired by Soft Pastel Polygon Design */
:root {
  /* Light Mode (Default - Matches Reference Image) */
  --geo-bg: #ffffff;
  --geo-accent-1: rgba(200, 230, 230, 0.6); /* Soft Teal */
  --geo-accent-2: rgba(180, 210, 230, 0.5); /* Soft Blue */
  --geo-accent-3: rgba(200, 220, 240, 0.5); /* Pale Lavender-Blue */
  --geo-accent-4: rgba(170, 210, 210, 0.4); /* Mint/Sage */
  --geo-dot: rgba(150, 200, 200, 0.7); /* Small dots */
  --card-glass: rgba(255, 255, 255, 0.85);
  --card-border: rgba(200, 220, 230, 0.5);
  --text-primary: #1a2a3a;
  --text-secondary: #5a6a7a;
}

[data-theme="dark"] {
  /* Dark Mode - Elegant Dark with Glowing Shapes */
  --geo-bg: #0f1520;
  --geo-accent-1: rgba(100, 150, 180, 0.15); /* Muted Blue Glow */
  --geo-accent-2: rgba(80, 130, 170, 0.12); /* Deep Blue */
  --geo-accent-3: rgba(120, 100, 160, 0.1); /* Purple Hint */
  --geo-accent-4: rgba(60, 140, 140, 0.12); /* Teal Glow */
  --geo-dot: rgba(150, 200, 220, 0.4);
  --card-glass: rgba(20, 30, 45, 0.9);
  --card-border: rgba(100, 150, 180, 0.2);
  --text-primary: #e8f0f8;
  --text-secondary: #a0b0c0;
}

body {
  background: var(--geo-bg);
  transition: background 0.6s ease, color 0.6s ease;
  overflow: hidden;
  padding-top: 0 !important; /* Override auth_modern.css navbar spacing */
}

/* Canvas Container */
.geo-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

/* Base Shape Styling */
.geo-shape {
  position: absolute;
  transition: opacity 0.6s ease;
}

/* Pentagon - Using CSS Clip-path */
.geo-pentagon {
  width: 250px;
  height: 250px;
  background: var(--geo-accent-1);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

/* Large Pentagon */
.geo-pentagon.large {
  width: 400px;
  height: 400px;
  background: var(--geo-accent-2);
}

/* Circle */
.geo-circle {
  border-radius: 50%;
  background: var(--geo-dot);
}

.geo-circle.small {
  width: 30px;
  height: 30px;
}

.geo-circle.medium {
  width: 60px;
  height: 60px;
}

/* Triangle */
.geo-triangle {
  width: 0;
  height: 0;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 140px solid var(--geo-accent-3);
  background: transparent !important;
}

/* Parallelogram / Slanted Rectangle */
.geo-parallelogram {
  width: 300px;
  height: 200px;
  background: var(--geo-accent-4);
  transform: skewX(-15deg);
}

/* Large Square */
.geo-square {
  width: 350px;
  height: 350px;
  background: var(--geo-accent-1);
  border-radius: 8px;
}

/* Animations */
@keyframes floatAndRotate {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-30px) rotate(5deg);
  }
  50% {
    transform: translateY(-15px) rotate(0deg);
  }
  75% {
    transform: translateY(-40px) rotate(-5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes orbitSlow {
  0% {
    transform: rotate(0deg) translateX(30px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(30px) rotate(-360deg);
  }
}

@keyframes driftHorizontal {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(50px) rotate(10deg);
  }
}

@keyframes gentlePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Apply animations via JS-added classes */
.anim-float {
  animation: floatAndRotate 20s ease-in-out infinite;
}
.anim-orbit {
  animation: orbitSlow 60s linear infinite;
}
.anim-drift {
  animation: driftHorizontal 25s ease-in-out infinite;
}
.anim-pulse {
  animation: gentlePulse 15s ease-in-out infinite;
}
.anim-spin {
  animation: spinSlow 40s linear infinite;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Auth Container Overrides */
.auth-page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  position: relative;
  z-index: 10;
}

.auth-container {
  background: var(--card-glass) !important;
  border: 1px solid var(--card-border) !important;
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
  max-width: 440px;
  padding: 45px;
  transition: background 0.4s ease, border 0.4s ease;
}

/* Smooth color transitions for all text elements */
.auth-header h1,
.auth-header p,
.form-label,
.checkbox-wrapper label,
.auth-footer,
.auth-footer a,
.form-input,
.divider,
.divider span,
.divider::before,
.divider::after,
.forgot-link {
  transition: color 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}

[data-theme="dark"] .auth-header h1 {
  color: var(--text-primary);
}

[data-theme="dark"] .auth-header p,
[data-theme="dark"] .form-label,
[data-theme="dark"] .checkbox-wrapper label,
[data-theme="dark"] .auth-footer {
  color: var(--text-secondary);
}

[data-theme="dark"] .form-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

[data-theme="dark"] .form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .form-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .divider span {
  color: var(--text-secondary);
  background: var(--card-glass);
}

[data-theme="dark"] .divider::before,
[data-theme="dark"] .divider::after {
  background: rgba(255, 255, 255, 0.1);
}

.mascot-image {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 3px solid var(--card-border);
}

/* ZOOSH Logo Styling */
.logo-container {
  text-align: center;
  margin-bottom: 24px;
}

.logo-link {
  text-decoration: none;
}

.zoosh-logo-text {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent; /* Fallback */
  letter-spacing: -1px;
  display: inline-block;
}

/* Mobile Responsive - Full screen form, no card panel */
@media (max-width: 600px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain; /* Prevent ALL overscroll bounce */
    padding-top: 0 !important; /* Remove global navbar spacing */
  }

  .auth-page-container {
    position: relative;
    padding: 60px 0 0 0; /* Space for theme toggle at top */
    min-height: 100vh;
    background: transparent;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Start from top, don't center vertically */
  }

  [data-theme="dark"] .auth-page-container {
    background: transparent;
  }

  .form-input {
    background: rgba(255, 255, 255, 0.9) !important;
  }

  [data-theme="dark"] .form-input {
    background: rgba(30, 40, 55, 0.9) !important;
  }

  .auth-container {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
    padding: 0px 25px 25px 25px; /* No top padding */
    background: transparent !important;
  }

  [data-theme="dark"] .auth-container {
    background: transparent !important;
  }

  .mascot-container {
    margin-top: 0;
  }

  .mascot-image {
    width: 70px;
    height: 70px;
  }

  .auth-header h1 {
    font-size: 24px;
  }

  /* Shapes as background - visible behind content */
  .geo-canvas {
    opacity: 0.5;
    z-index: -1;
  }

  [data-theme="dark"] .geo-canvas {
    opacity: 0.3; /* More visible in dark mode */
  }

  .geo-shape {
    opacity: 1;
  }

  .theme-toggle {
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}
