/* Modern Neumorphic Design System - 2025 */
/* Color palette optimized for Gen Z with vibrant gradients */

/* ==================== ZOOM & ACCESSIBILITY SUPPORT ==================== */

/* Enable proper browser zoom and text scaling */
html {
  font-size: 100%; /* Base font size - enables proper rem scaling */
  -webkit-text-size-adjust: 100%; /* Prevent iOS Safari auto text size adjustment */
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Enable smooth zoom transitions */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure body respects user zoom settings */
body {
  /* Don't set fixed font-size, let it inherit from html */
  /* This allows browser zoom to work properly */
  min-height: 100vh;
  position: relative;
}

/* Ensure all containers respect zoom */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ==================== END ZOOM SUPPORT ==================== */

:root {
  /* shadcn/ui + Modern Design System Color Palette */
  /* Exact colors from shadcn/ui, Tailwind, Linear, Vercel */

  /* Base Backgrounds - Layered approach (gray bg + white cards) */
  --background: #fafafa;            /* Zinc-50 - Main page background */
  --foreground: #09090b;            /* Zinc-950 - Primary text */

  --card: #ffffff;                  /* White - Card background */
  --card-foreground: #09090b;       /* Zinc-950 - Card text */

  --muted: #f4f4f5;                 /* Zinc-100 - Muted backgrounds */
  --muted-foreground: #71717a;      /* Zinc-500 - Muted text */

  --popover: #ffffff;               /* White - Popover background */
  --popover-foreground: #09090b;    /* Zinc-950 - Popover text */

  /* Accent Colors */
  --primary: #18181b;               /* Zinc-900 - Primary buttons */
  --primary-foreground: #fafafa;    /* Zinc-50 - Primary button text */

  --secondary: #f4f4f5;             /* Zinc-100 - Secondary buttons */
  --secondary-foreground: #18181b;  /* Zinc-900 - Secondary button text */

  --accent: #f4f4f5;                /* Zinc-100 - Accent background */
  --accent-foreground: #18181b;     /* Zinc-900 - Accent text */

  /* Borders & Inputs */
  --border: #e4e4e7;                /* Zinc-200 - Borders */
  --input: #e4e4e7;                 /* Zinc-200 - Input borders */
  --ring: #18181b;                  /* Zinc-900 - Focus rings */

  /* Status Colors - Using Tailwind palette */
  --success: #10b981;               /* Green-500 */
  --warning: #f59e0b;               /* Amber-500 */
  --destructive: #ef4444;           /* Red-500 */
  --info: #3b82f6;                  /* Blue-500 */

  /* Gradients for visual interest */
  --gradient-primary: linear-gradient(135deg, #18181b 0%, #3f3f46 100%);
  --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);

  /* Shadows - Subtle and realistic */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Radius */
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Neumorphic Variables - Muted Design */
  --neo-bg-light: #f4f4f5;           /* Zinc-100 - Subtle background */
  --neo-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --neo-shadow-light-hover: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.08);
  --neo-shadow-light-inset: inset 0 1px 3px rgba(0, 0, 0, 0.06);

  /* Muted accent colors */
  --gray-600: #52525b;               /* Zinc-600 */
  --gray-900: #18181b;               /* Zinc-900 */
  --gray-100: #f4f4f5;               /* Zinc-100 */
  --gray-400: #a1a1aa;               /* Zinc-400 */
}

html.dark {
  /* Dark Mode - shadcn/ui palette */
  --background: #09090b;            /* Zinc-950 */
  --foreground: #fafafa;            /* Zinc-50 */

  --card: #18181b;                  /* Zinc-900 */
  --card-foreground: #fafafa;       /* Zinc-50 */

  --muted: #27272a;                 /* Zinc-800 */
  --muted-foreground: #a1a1aa;      /* Zinc-400 */

  --popover: #18181b;               /* Zinc-900 */
  --popover-foreground: #fafafa;    /* Zinc-50 */

  --primary: #fafafa;               /* Zinc-50 */
  --primary-foreground: #18181b;    /* Zinc-900 */

  --secondary: #27272a;             /* Zinc-800 */
  --secondary-foreground: #fafafa;  /* Zinc-50 */

  --accent: #27272a;                /* Zinc-800 */
  --accent-foreground: #fafafa;     /* Zinc-50 */

  --border: #27272a;                /* Zinc-800 */
  --input: #27272a;                 /* Zinc-800 */
  --ring: #d4d4d8;                  /* Zinc-300 */

  /* Neumorphic Variables - Dark Mode */
  --neo-bg-dark: #18181b;            /* Zinc-900 */
  --neo-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4);
  --neo-shadow-light-hover: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
  --neo-shadow-light-inset: inset 0 1px 3px rgba(0, 0, 0, 0.4);

  /* Muted colors for dark mode */
  --gray-600: #71717a;               /* Zinc-500 */
  --gray-900: #fafafa;               /* Zinc-50 */
  --gray-100: #27272a;               /* Zinc-800 */
  --gray-400: #a1a1aa;               /* Zinc-400 */
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed nav */
}

/* Ensure hero section is accessible for scroll */
#hero-section {
  scroll-margin-top: 0;
}

/* Body background - layered design */
body {
  background: var(--background);
  color: var(--foreground);
  transition: background 0.3s ease, color 0.3s ease;
}

/* ==================== HERO SECTION MODERNIZATION ==================== */

.hero {
  position: relative;
  padding: 6rem 0.5rem;
  overflow: hidden;
  background: var(--background);
}

html.dark .hero {
  background: var(--background);
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-left {
  flex: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #1f2937 !important;
}

.hero-title .accent {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

html.dark .hero-title {
  color: #f3f4f6 !important;
}

html.dark .hero-title .accent {
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
  background-size: 200% 200%;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground) !important;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Modern CTA Buttons with Neumorphism */
.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cta-primary {
  background: var(--primary);
  color: var(--primary-foreground) !important;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.cta-primary i,
.cta-primary span {
  color: var(--primary-foreground) !important;
}

html.dark .cta-primary {
  background: var(--card);
  color: var(--card-foreground) !important;
  border-color: var(--ring);
}

html.dark .cta-primary i,
html.dark .cta-primary span {
  color: var(--card-foreground) !important;
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  opacity: 0.9;
}

.cta-primary:active {
  transform: translateY(0);
}

.cta-secondary {
  background: var(--card);
  color: var(--card-foreground) !important;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.cta-secondary i,
.cta-secondary span {
  color: var(--card-foreground) !important;
}

.cta-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--muted);
}

/* Hero Stats with Neumorphic Cards */
.hero-stats {
  margin-top: 3rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  background: var(--neo-bg-light);
  padding: 1.5rem 2rem;
  border-radius: 1.5rem;
  box-shadow: var(--neo-shadow-light);
  transition: all 0.3s ease;
}

html.dark .stat {
  background: var(--neo-bg-dark);
}

.stat:hover {
  box-shadow: var(--neo-shadow-light-hover);
  transform: translateY(-4px);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #4b5563 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

html.dark .stat-label {
  color: #9ca3af !important;
}

/* ==================== EXAMPLES SECTION ==================== */

.examples-section {
  background: var(--muted);
  padding: 5rem 0.5rem;
  margin-bottom: 3rem;
}

html.dark .examples-section {
  background: var(--background);
}

.examples-section .container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.examples-content {
  display: flex;
  justify-content: center;
}

.examples-section .api-showcase {
  max-width: 900px;
  width: 100%;
}

/* ==================== NEUMORPHIC INPUT CARDS ==================== */

.input-section,
.results-section,
.url-results-section {
  background: var(--neo-bg-light);
  border-radius: 2rem;
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: var(--neo-shadow-light);
  transition: all 0.3s ease;
}

html.dark .input-section,
html.dark .results-section,
html.dark .url-results-section {
  background: var(--neo-bg-dark);
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--muted-foreground);
  font-size: 1.125rem;
}

/* Toggle Buttons with Neumorphism */
.input-mode-toggle {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  background: var(--neo-bg-light);
  padding: 0.5rem;
  border-radius: 1.5rem;
  box-shadow: var(--neo-shadow-light-inset);
}

html.dark .input-mode-toggle {
  background: var(--neo-bg-dark);
}

.toggle-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  border-radius: 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.toggle-btn:hover {
  color: var(--gray-900);
}

html.dark .toggle-btn {
  color: var(--gray-400);
}

html.dark .toggle-btn:hover {
  color: var(--gray-100);
}

.toggle-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  box-shadow: var(--neo-shadow-light);
}

.toggle-btn.active i {
  color: white !important;
}

.toggle-btn.active span {
  color: white !important;
}

/* Form Groups with Neumorphic Inputs */
.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1f2937 !important;
  font-size: 1rem;
}

html.dark .form-group label {
  color: #e5e7eb !important;
}

/* Neumorphic input styling for Shoelace components */
sl-input::part(base),
sl-textarea::part(base) {
  background: var(--neo-bg-light);
  border: none;
  box-shadow: var(--neo-shadow-light-inset);
  border-radius: 1rem;
  transition: all 0.3s ease;
  color: #1f2937 !important;
}

html.dark sl-input::part(base),
html.dark sl-textarea::part(base) {
  background: var(--neo-bg-dark);
  color: #f3f4f6 !important;
}

/* Input text color */
sl-input::part(input),
sl-textarea::part(textarea) {
  color: #1f2937 !important;
  font-weight: 500;
}

html.dark sl-input::part(input),
html.dark sl-textarea::part(textarea) {
  color: #f3f4f6 !important;
}

sl-input::part(base):focus,
sl-textarea::part(base):focus {
  box-shadow: var(--neo-shadow-light-inset),
              0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Modern Analyze Button */
sl-button.analyze-btn::part(base) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 1rem;
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  box-shadow: var(--neo-shadow-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

sl-button.analyze-btn::part(base):hover {
  transform: translateY(-2px);
  box-shadow: var(--neo-shadow-light-hover);
}

sl-button.analyze-btn::part(base):active {
  transform: translateY(0);
}

/* Example Buttons with Subtle Neumorphism */
.example-btn {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  color: var(--card-foreground) !important;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.example-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  background: var(--muted);
  border-color: var(--ring);
}

/* ==================== MODERN PROGRESS BAR ==================== */

.progress-container {
  background: var(--neo-bg-light);
  border-radius: 2rem;
  padding: 3rem;
  margin: 2rem 0;
  box-shadow: var(--neo-shadow-light);
  text-align: center;
}

html.dark .progress-container {
  background: var(--neo-bg-dark);
}

.progress-animation-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  min-height: 180px;
}

/* Motion-powered animation container */
.motion-animation {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--neo-shadow-light);
}

.motion-animation::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--neo-bg-light);
}

html.dark .motion-animation::before {
  background: var(--neo-bg-dark);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}

.progress-percentage {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

sl-progress-bar::part(base) {
  height: 12px;
  border-radius: 1rem;
  background: var(--neo-bg-light);
  box-shadow: var(--neo-shadow-light-inset);
}

html.dark sl-progress-bar::part(base) {
  background: var(--neo-bg-dark);
}

sl-progress-bar::part(indicator) {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* ==================== RESULT CARDS MODERNIZATION ==================== */

.result-card,
.url-result-card {
  background: var(--neo-bg-light);
  border-radius: 2rem;
  padding: 2.5rem;
  box-shadow: var(--neo-shadow-light);
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html.dark .result-card,
html.dark .url-result-card {
  background: var(--neo-bg-dark);
}

.result-card:hover,
.url-result-card:hover {
  box-shadow: var(--neo-shadow-light-hover);
  transform: translateY(-4px);
}

.result-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.status-indicator {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--neo-shadow-light);
  flex-shrink: 0;
}

.status-indicator.safe {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.status-indicator.malicious {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
}

.result-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

html.dark .result-info h3 {
  color: var(--gray-100);
}

/* Badges with modern styling */
sl-badge::part(base) {
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================== SHIMMER LOADING EFFECT ==================== */

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.skeleton {
  animation: shimmer 2s infinite;
  background: linear-gradient(
    90deg,
    var(--neo-bg-light) 0%,
    rgba(102, 126, 234, 0.1) 50%,
    var(--neo-bg-light) 100%
  );
  background-size: 1000px 100%;
}

html.dark .skeleton {
  background: linear-gradient(
    90deg,
    var(--neo-bg-dark) 0%,
    rgba(102, 126, 234, 0.15) 50%,
    var(--neo-bg-dark) 100%
  );
  background-size: 1000px 100%;
}

/* ==================== MICRO-INTERACTIONS ==================== */

/* Ripple effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  width: 20px;
  height: 20px;
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* Floating animation for blobs */
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  33% { transform: translateY(-20px) translateX(10px); }
  66% { transform: translateY(10px) translateX(-10px); }
}

.blob {
  animation: float 8s ease-in-out infinite;
}

/* Pulse animation for important elements */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ==================== FEATURE CARDS ==================== */

.feature-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  border: 1px solid var(--border);
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--ring);
}

.feature-card i {
  font-size: 3rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--card-foreground);
}

.feature-card p {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
  .input-section,
  .results-section,
  .url-results-section {
    padding: 2rem 0.5rem;
    border-radius: 1.5rem;
  }

  .result-card,
  .url-result-card {
    padding: 1.5rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .cta-primary,
  .cta-secondary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .progress-container {
    padding: 2rem 0.5rem;
  }

  .hero {
    padding: 4rem 0.25rem;
  }

  .examples-section {
    padding: 3rem 0.25rem;
  }
}

/* ==================== BACK TO HERO LINK ==================== */

.back-to-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea !important;
  border-radius: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.back-to-hero-link:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.4);
  transform: translateX(-4px);
}

.back-to-hero-link i {
  color: #667eea !important;
  transition: transform 0.3s ease;
}

.back-to-hero-link:hover i {
  transform: translateX(-4px);
}

html.dark .back-to-hero-link {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa !important;
  border-color: rgba(167, 139, 250, 0.3);
}

html.dark .back-to-hero-link:hover {
  background: rgba(167, 139, 250, 0.25);
  border-color: rgba(167, 139, 250, 0.5);
}

html.dark .back-to-hero-link i {
  color: #a78bfa !important;
}

/* ==================== BACK TO TOP BUTTON ==================== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--neo-shadow-light);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--neo-shadow-light-hover);
}

.back-to-top:active {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
}

/* ==================== ACCESSIBILITY ==================== */

/* Focus visible styles */
*:focus-visible {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* ===================================
   MOTION PROGRESS ANIMATION STYLES
   =================================== */

.motion-animation {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  display: block;
}

.motion-animation svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.2));
}

.motion-circle-bg {
  color: var(--primary-500, #667eea);
  opacity: 0.15;
}

html.dark .motion-circle-bg {
  color: #667eea;
  opacity: 0.25;
}

.motion-circle-progress {
  transition: stroke-dashoffset 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.6));
}

.motion-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse-icon 2s ease-in-out infinite;
}

html.dark .motion-icon {
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes pulse-icon {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

/* Rotating glow effect for the circle */
@keyframes rotate-glow {
  0% {
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.6)) hue-rotate(0deg);
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.6)) hue-rotate(360deg);
  }
}

.motion-circle-progress {
  animation: rotate-glow 3s linear infinite;
}

/* Progress container styling */
.progress-container {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  border: 1px solid var(--border);
}

.progress-container[style*="display: block"] {
  opacity: 1;
  transform: translateY(0);
}

.progress-animation-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

/* ===================================
   COMPONENT COLOR INHERITANCE
   =================================== */

/* Ensure all components inherit from design system */
.section-header p,
p {
  color: var(--muted-foreground);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--foreground);
}

.text-muted {
  color: var(--muted-foreground);
}

.text-foreground {
  color: var(--foreground);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .motion-icon {
    animation: none;
  }

  .motion-circle-progress {
    animation: none;
  }
}

/* ============================================================================
   Authentication Pages Styles
   ============================================================================ */

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--background);
}

/* Auth Card */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-xl);
}

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

.auth-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.auth-header p {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
}

/* Message Box */
.auth-message {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
}

.auth-message-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--destructive);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-message-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

html.dark .auth-message-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

html.dark .auth-message-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

/* OAuth Buttons */
.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
}

.oauth-btn:hover {
  background: var(--muted);
  border-color: var(--ring);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.oauth-btn i {
  font-size: 1.125rem;
}

.oauth-google:hover {
  border-color: #4285f4;
}

.oauth-github:hover {
  border-color: #333;
}

html.dark .oauth-github:hover {
  border-color: #fff;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 1rem;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.1);
}

html.dark .form-input:focus {
  box-shadow: 0 0 0 3px rgba(212, 212, 216, 0.1);
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

/* Checkbox */
.form-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
}

.form-checkbox label {
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

/* Password Requirements */
.password-requirements {
  margin-top: 0.25rem;
}

.password-requirements small {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.password-requirements i {
  font-size: 0.875rem;
  color: var(--info);
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
  background: var(--ring);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer Links */
.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.auth-footer p {
  margin: 0.5rem 0;
  color: var(--muted-foreground);
}

.auth-footer a {
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: var(--ring);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }
}
