/* DevilisDragon Auth Styles - Copied from DevilisDragon_Web */

/* Base Variables */
:root {
  --dd-bg: #0a0a0f;
  --dd-bg-secondary: #1a1a24;
  --dd-primary: #3b82f6;
  --dd-secondary: #8b5cf6;
  --dd-accent: #06b6d4;
  --dd-text: #f8fafc;
  --dd-text-muted: #94a3b8;
  --dd-border: rgba(255, 255, 255, 0.1);
  --dd-input-bg: rgba(15, 23, 42, 0.8);
  --dd-glass-bg: rgba(26, 26, 36, 0.7);
}

/* ==================== ANIMATIONS ==================== */

/* Fade in animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Gradient border animation */
@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 30px rgba(139, 92, 246, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }
}

/* ==================== REALISTIC STAR ANIMATIONS ==================== */
/* Mimics real atmospheric scintillation (twinkling) effect */

/* Subtle atmospheric shimmer - like real stars through atmosphere */
@keyframes starScintillate {
  0%, 100% { opacity: 0.7; }
  10% { opacity: 0.9; }
  20% { opacity: 0.5; }
  30% { opacity: 1; }
  40% { opacity: 0.6; }
  50% { opacity: 0.85; }
  60% { opacity: 0.4; }
  70% { opacity: 0.95; }
  80% { opacity: 0.55; }
  90% { opacity: 0.8; }
}

/* Rapid micro-flicker like atmospheric turbulence */
@keyframes starFlicker {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  5% { opacity: 1; transform: scale(1.05); }
  10% { opacity: 0.6; transform: scale(0.98); }
  15% { opacity: 0.9; transform: scale(1.02); }
  20% { opacity: 0.5; transform: scale(0.97); }
  25% { opacity: 1; transform: scale(1.03); }
  30% { opacity: 0.7; transform: scale(1); }
  35% { opacity: 0.95; transform: scale(1.04); }
  40% { opacity: 0.55; transform: scale(0.99); }
  45% { opacity: 0.85; transform: scale(1.01); }
  50% { opacity: 0.65; transform: scale(0.98); }
  55% { opacity: 1; transform: scale(1.05); }
  60% { opacity: 0.5; transform: scale(0.97); }
  65% { opacity: 0.9; transform: scale(1.02); }
  70% { opacity: 0.6; transform: scale(1); }
  75% { opacity: 0.95; transform: scale(1.03); }
  80% { opacity: 0.7; transform: scale(0.99); }
  85% { opacity: 0.4; transform: scale(0.96); }
  90% { opacity: 0.85; transform: scale(1.01); }
  95% { opacity: 1; transform: scale(1.04); }
}

/* Gentle pulse for brighter stars */
@keyframes starPulse {
  0%, 100% { opacity: 0.9; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
}

/* Subtle glow variation */
@keyframes starGlow {
  0%, 100% { 
    box-shadow: 0 0 2px currentColor, 0 0 4px currentColor;
    opacity: 0.8;
  }
  50% { 
    box-shadow: 0 0 4px currentColor, 0 0 8px currentColor, 0 0 12px currentColor;
    opacity: 1;
  }
}

/* Bright star with diffraction spikes effect */
@keyframes starBrightPulse {
  0%, 100% { 
    opacity: 0.9;
    box-shadow: 0 0 3px #fff, 0 0 6px #fff;
  }
  25% { 
    opacity: 1;
    box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px rgba(255,255,255,0.5);
  }
  50% { 
    opacity: 0.85;
    box-shadow: 0 0 4px #fff, 0 0 8px #fff;
  }
  75% { 
    opacity: 1;
    box-shadow: 0 0 6px #fff, 0 0 12px #fff, 0 0 20px rgba(255,255,255,0.3);
  }
}

/* Very slow drift - stars don't move much but atmosphere causes tiny shifts */
@keyframes starDrift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(0.5px, -0.3px); }
  50% { transform: translate(-0.3px, 0.5px); }
  75% { transform: translate(0.4px, 0.2px); }
}

/* Color temperature shift - mimics atmospheric refraction */
@keyframes starColorShift {
  0%, 100% { filter: hue-rotate(0deg) brightness(1); }
  25% { filter: hue-rotate(5deg) brightness(1.1); }
  50% { filter: hue-rotate(-5deg) brightness(0.9); }
  75% { filter: hue-rotate(3deg) brightness(1.05); }
}

@keyframes shootingStar {
  0% { 
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% { 
    transform: translateX(300px) translateY(300px);
    opacity: 0;
  }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.15; }
  25% { transform: translate(20px, -10px) scale(1.1); opacity: 0.2; }
  50% { transform: translate(-10px, 20px) scale(0.9); opacity: 0.1; }
  75% { transform: translate(-20px, -20px) scale(1.05); opacity: 0.18; }
}

/* Shimmer effect for logo */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Auth page body */
body.dd-auth-page {
  --dd-auth-card-max: 480px;
  --dd-auth-card-pad: clamp(1.25rem, 4vw, 1.5rem);
  --dd-auth-input-height: 3rem;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a24 50%, #0f0f1a 100%);
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  margin: 0;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-text-size-adjust: 100%;
}

body.dd-auth-page *,
body.dd-auth-page *::before,
body.dd-auth-page *::after {
  box-sizing: border-box;
}

/* Stars container */
.dd-stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Individual star styles - realistic sizes and colors */
.dd-star {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* Tiny dim stars - most common */
.dd-star.tiny {
  width: 1px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
}

/* Small stars */
.dd-star.small {
  width: 1px;
  height: 1px;
  background: #fff;
  box-shadow: 0 0 1px #fff;
}

/* Medium stars */
.dd-star.medium {
  width: 2px;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 2px #fff, 0 0 4px rgba(255,255,255,0.5);
}

/* Bright stars */
.dd-star.bright {
  width: 2px;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 10px rgba(255,255,255,0.4);
}

/* Very bright stars - rare */
.dd-star.brilliant {
  width: 3px;
  height: 3px;
  background: #fff;
  box-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 15px rgba(255,255,255,0.5), 0 0 25px rgba(255,255,255,0.2);
}

/* Star colors - realistic stellar classification */
/* Blue-white (hot stars like Rigel) */
.dd-star.blue-white {
  background: #caf0f8;
  box-shadow: 0 0 3px #caf0f8, 0 0 6px #90e0ef, 0 0 10px rgba(144,224,239,0.4);
}

/* White (like Sirius) */
.dd-star.white {
  background: #fff;
}

/* Yellow-white (like our Sun from far) */
.dd-star.yellow-white {
  background: #fffde7;
  box-shadow: 0 0 3px #fffde7, 0 0 6px #fff9c4, 0 0 10px rgba(255,249,196,0.4);
}

/* Orange (like Arcturus) */
.dd-star.orange {
  background: #ffcc80;
  box-shadow: 0 0 3px #ffcc80, 0 0 6px #ffb74d, 0 0 10px rgba(255,183,77,0.4);
}

/* Red (like Betelgeuse) */
.dd-star.red {
  background: #ef9a9a;
  box-shadow: 0 0 3px #ef9a9a, 0 0 6px #e57373, 0 0 10px rgba(229,115,115,0.4);
}

/* ==================== BURNING STARS ==================== */
/* Fiery stars with flame-like glow */

@keyframes starBurn {
  0%, 100% { 
    box-shadow: 0 0 4px #ff6b35, 0 0 8px #ff4500, 0 0 15px #ff6b35, 0 0 25px rgba(255,69,0,0.4);
    filter: brightness(1);
  }
  15% { 
    box-shadow: 0 0 6px #ffa500, 0 0 12px #ff6b35, 0 0 20px #ff4500, 0 0 35px rgba(255,165,0,0.5);
    filter: brightness(1.3);
  }
  30% { 
    box-shadow: 0 0 3px #ff4500, 0 0 6px #ff6b35, 0 0 12px #ffa500, 0 0 20px rgba(255,69,0,0.3);
    filter: brightness(0.9);
  }
  45% { 
    box-shadow: 0 0 8px #ffcc00, 0 0 15px #ffa500, 0 0 25px #ff6b35, 0 0 40px rgba(255,204,0,0.5);
    filter: brightness(1.5);
  }
  60% { 
    box-shadow: 0 0 4px #ff6b35, 0 0 10px #ff4500, 0 0 18px #ffa500, 0 0 28px rgba(255,107,53,0.4);
    filter: brightness(1.1);
  }
  75% { 
    box-shadow: 0 0 5px #ffa500, 0 0 10px #ffcc00, 0 0 20px #ff6b35, 0 0 32px rgba(255,165,0,0.45);
    filter: brightness(1.4);
  }
  90% { 
    box-shadow: 0 0 3px #ff4500, 0 0 8px #ff6b35, 0 0 14px #ffa500, 0 0 22px rgba(255,69,0,0.35);
    filter: brightness(1);
  }
}

@keyframes starFlame {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    opacity: 0.9;
  }
  10% { 
    transform: scale(1.15) rotate(5deg);
    opacity: 1;
  }
  20% { 
    transform: scale(0.95) rotate(-3deg);
    opacity: 0.85;
  }
  30% { 
    transform: scale(1.2) rotate(8deg);
    opacity: 1;
  }
  40% { 
    transform: scale(1.05) rotate(-5deg);
    opacity: 0.9;
  }
  50% { 
    transform: scale(1.25) rotate(10deg);
    opacity: 1;
  }
  60% { 
    transform: scale(0.9) rotate(-8deg);
    opacity: 0.8;
  }
  70% { 
    transform: scale(1.18) rotate(6deg);
    opacity: 1;
  }
  80% { 
    transform: scale(1.08) rotate(-4deg);
    opacity: 0.95;
  }
  90% { 
    transform: scale(1.12) rotate(3deg);
    opacity: 0.88;
  }
}

@keyframes starEmber {
  0%, 100% { 
    background: #ff6b35;
    box-shadow: 0 0 5px #ff4500, 0 0 10px #ff6b35, 0 0 20px rgba(255,69,0,0.5);
  }
  25% { 
    background: #ffa500;
    box-shadow: 0 0 8px #ffcc00, 0 0 15px #ffa500, 0 0 25px rgba(255,165,0,0.6);
  }
  50% { 
    background: #ffcc00;
    box-shadow: 0 0 10px #fff, 0 0 20px #ffcc00, 0 0 30px rgba(255,204,0,0.7);
  }
  75% { 
    background: #ff8c00;
    box-shadow: 0 0 6px #ffa500, 0 0 12px #ff6b35, 0 0 22px rgba(255,140,0,0.55);
  }
}

/* Burning star base */
.dd-star.burning {
  background: #ff6b35;
  border-radius: 50%;
}

.dd-star.burning.small {
  width: 2px;
  height: 2px;
  animation: starBurn 1.5s ease-in-out infinite, starFlame 2s ease-in-out infinite;
}

.dd-star.burning.medium {
  width: 3px;
  height: 3px;
  animation: starBurn 1.2s ease-in-out infinite, starFlame 1.8s ease-in-out infinite, starEmber 3s ease-in-out infinite;
}

.dd-star.burning.large {
  width: 4px;
  height: 4px;
  animation: starBurn 1s ease-in-out infinite, starFlame 1.5s ease-in-out infinite, starEmber 2.5s ease-in-out infinite;
}

/* Extra intense burning star */
.dd-star.burning.intense {
  width: 5px;
  height: 5px;
  background: #ffcc00;
  animation: starBurn 0.8s ease-in-out infinite, starFlame 1.2s ease-in-out infinite, starEmber 2s ease-in-out infinite;
  box-shadow: 0 0 10px #ff6b35, 0 0 20px #ff4500, 0 0 30px #ffa500, 0 0 50px rgba(255,69,0,0.6);
}

/* Shooting star - realistic meteor with curved path and fade-in */
@keyframes shootingStar {
  0% { 
    transform: translate(0, 0) rotate(var(--shoot-angle, 45deg)) scale(0.3);
    opacity: 0;
    filter: blur(2px);
  }
  5% {
    opacity: 0.3;
    filter: blur(1px);
  }
  15% { 
    transform: translate(60px, 50px) rotate(var(--shoot-angle, 45deg)) scale(0.7);
    opacity: 0.7;
    filter: blur(0.5px);
  }
  30% { 
    transform: translate(140px, 100px) rotate(calc(var(--shoot-angle, 45deg) + 5deg)) scale(1);
    opacity: 1;
    filter: blur(0);
  }
  50% { 
    transform: translate(240px, 160px) rotate(calc(var(--shoot-angle, 45deg) + 8deg)) scale(1.1);
    opacity: 1;
  }
  70% { 
    transform: translate(340px, 230px) rotate(calc(var(--shoot-angle, 45deg) + 10deg)) scale(1);
    opacity: 0.9;
  }
  85% {
    opacity: 0.5;
  }
  100% { 
    transform: translate(450px, 320px) rotate(calc(var(--shoot-angle, 45deg) + 12deg)) scale(0.8);
    opacity: 0;
  }
}

@keyframes trailGrow {
  0% { 
    width: 0; 
    opacity: 0;
  }
  15% { 
    width: 60px; 
    opacity: 0.5;
  }
  30% { 
    width: 150px; 
    opacity: 0.9;
  }
  50% {
    width: 200px;
    opacity: 1;
  }
  80% { 
    width: 200px; 
    opacity: 0.7;
  }
  100% { 
    width: 200px; 
    opacity: 0;
  }
}

@keyframes trailCore {
  0% { 
    width: 0; 
    opacity: 0;
  }
  20% { 
    width: 40px; 
    opacity: 0.6;
  }
  35% { 
    width: 100px; 
    opacity: 1;
  }
  60% {
    width: 140px;
    opacity: 1;
  }
  85% { 
    width: 140px; 
    opacity: 0.5;
  }
  100% { 
    width: 140px; 
    opacity: 0;
  }
}

.dd-shooting-star {
  position: absolute;
  width: 5px;
  height: 5px;
  background: radial-gradient(circle, #fff 0%, rgba(200,220,255,0.8) 40%, transparent 70%);
  border-radius: 50%;
  box-shadow: 
    0 0 6px 3px #fff, 
    0 0 15px 6px rgba(255,255,255,0.7),
    0 0 30px 12px rgba(200,220,255,0.4);
  animation: shootingStar 2.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* Main trail - long gradient fade */
.dd-shooting-star::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 3px;
  background: linear-gradient(
    90deg, 
    rgba(255,255,255,1) 0%,
    rgba(255,255,255,0.85) 8%,
    rgba(220,235,255,0.65) 20%,
    rgba(200,220,255,0.45) 35%,
    rgba(180,200,255,0.25) 55%,
    rgba(150,180,255,0.1) 75%,
    rgba(120,150,255,0.03) 90%,
    transparent 100%
  );
  transform-origin: right center;
  transform: translateX(-200px) translateY(-0.5px);
  border-radius: 3px 0 0 3px;
  animation: trailGrow 2.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* Secondary inner trail - brighter core that also fades in */
.dd-shooting-star::after {
  content: '';
  position: absolute;
  width: 140px;
  height: 2px;
  background: linear-gradient(
    90deg, 
    rgba(255,255,255,1) 0%,
    rgba(230,245,255,0.95) 10%,
    rgba(200,225,255,0.75) 25%,
    rgba(170,200,255,0.5) 45%,
    rgba(140,175,255,0.25) 65%,
    rgba(110,150,255,0.08) 85%,
    transparent 100%
  );
  transform-origin: right center;
  transform: translateX(-140px) translateY(0px);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 0 6px rgba(150,180,255,0.6);
  animation: trailCore 2.2s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* Animated star background - fallback */
body.dd-auth-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.8), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.9), transparent),
    radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 230px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 300px 200px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 350px 150px, rgba(255,255,255,0.8), transparent),
    radial-gradient(2px 2px at 420px 60px, rgba(255,255,255,0.5), transparent);
  background-repeat: repeat;
  background-size: 500px 500px;
  animation: twinkle1 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* Gradient orb effects */
body.dd-auth-page::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
  z-index: 0;
  animation: float 8s ease-in-out infinite;
}

/* Glass card – outer is just the 3D/perspective container; inner has the look so glow flips with the card */
.dd-auth-card {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* Inner card: glass background, blue glow and gradient border (flip with the card). No overflow:hidden so 3D flip works. */
.dd-auth-card .dd-auth-card-inner {
  background: rgba(26, 26, 36, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid transparent;
  border-radius: 1rem;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.4s ease-out;
}

/* Animated gradient border on the flipping inner card */
.dd-auth-card .dd-auth-card-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4, #8b5cf6, #3b82f6);
  background-size: 300% 300%;
  animation: gradientBorder 4s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Header */
.dd-auth-header {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

.dd-auth-logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4, #8b5cf6, #3b82f6);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  animation: shimmer 3s linear infinite;
}

.dd-auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.dd-auth-subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

.dd-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeInLeft 0.5s ease-out both;
}

/* Staggered form group animations */
.dd-form-group:nth-child(1) { animation-delay: 0.1s; }
.dd-form-group:nth-child(2) { animation-delay: 0.2s; }
.dd-form-group:nth-child(3) { animation-delay: 0.3s; }
.dd-form-group:nth-child(4) { animation-delay: 0.4s; }
.dd-form-group:nth-child(5) { animation-delay: 0.5s; }

.dd-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #f8fafc;
}

/* Transparent input with embossed (recessed) effect */
.dd-form-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  color: #ffffff !important;
  transition: all 0.2s ease;
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.35),
    inset -1px -1px 3px rgba(255, 255, 255, 0.06);
}

.dd-form-input::placeholder {
  color: #94a3b8;
}

.dd-form-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.3),
    inset -1px -1px 3px rgba(255, 255, 255, 0.08),
    0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.35) !important;
}

/* Autofill fix - keep transparent embossed look */
.dd-form-input:-webkit-autofill,
.dd-form-input:-webkit-autofill:hover,
.dd-form-input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 30px rgba(15, 23, 42, 0.4) inset,
    inset 2px 2px 6px rgba(0, 0, 0, 0.35),
    inset -1px -1px 3px rgba(255, 255, 255, 0.06) !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Password toggle */
.dd-password-wrapper {
  position: relative;
}

.dd-password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.dd-password-toggle:hover {
  color: #ffffff;
}

/* Remember me row */
.dd-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  animation: fadeInLeft 0.5s ease-out 0.35s both;
}

.dd-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #94a3b8;
  cursor: pointer;
}

.dd-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}


/* Submit button */
.dd-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: none;
  border-radius: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  animation: slideInFromBottom 0.5s ease-out 0.4s both;
  position: relative;
  overflow: hidden;
}

/* Button shine effect */
.dd-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.dd-submit-btn:hover::before {
  left: 100%;
}

.dd-submit-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.5), 0 0 20px rgba(139, 92, 246, 0.3);
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.dd-submit-btn:active {
  transform: translateY(-1px) scale(1.01);
}

.dd-submit-btn:disabled {
  background: #475569;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  animation: none;
}

/* Footer */
.dd-auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  animation: fadeIn 0.5s ease-out 0.5s both;
}

.dd-auth-footer p {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}

.dd-auth-footer .dd-link {
  font-weight: 500;
  margin-left: 0.25rem;
}

.dd-copyright {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 1rem !important;
}

/* Error message */
.dd-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #f87171;
  font-size: 0.875rem;
}

/* Validation error */
.dd-validation-error {
  color: #f87171;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Responsive: tablet and small desktop */
@media (max-width: 768px) {
  body.dd-auth-page {
    padding: 12px;
  }

  .dd-auth-card {
    max-width: 100%;
    padding: 2rem 1.5rem;
    margin: 0 12px;
  }

  .dd-auth-logo {
    font-size: 2.25rem;
  }

  .dd-auth-title {
    font-size: 1.35rem;
  }

  .dd-form-input,
  .dd-submit-btn {
    min-height: 44px;
  }

  .dd-auth-tab {
    min-height: 44px;
    padding: 0.875rem 0.75rem;
  }

  .dd-password-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Responsive: mobile */
@media (max-width: 576px) {
  body.dd-auth-page {
    padding: 10px;
    align-items: flex-start;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .dd-auth-card {
    padding: 1.5rem 1.25rem;
    margin: 0 8px;
  }

  .dd-auth-logo {
    font-size: 2rem;
  }

  .dd-auth-title {
    font-size: 1.25rem;
  }

  .dd-auth-subtitle {
    font-size: 0.8125rem;
  }

  .dd-form-input,
  .dd-submit-btn {
    min-height: 44px;
    font-size: 16px;
  }

  .dd-submit-btn {
    padding: 0.875rem 1rem;
  }

  .dd-auth-tab {
    min-height: 44px;
    padding: 0.75rem 0.5rem;
    font-size: 0.8125rem;
  }

  .dd-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Responsive: small mobile */
@media (max-width: 480px) {
  .dd-auth-card {
    padding: 1.25rem 1rem;
    margin: 0 6px;
  }

  .dd-auth-logo {
    font-size: 1.75rem;
  }

  .dd-auth-tabs {
    margin-bottom: 1.25rem;
  }
}

/* Nav tabs for login/register */
.dd-auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.5s ease-out 0.15s both;
}

.dd-auth-tab {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  text-align: center;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.dd-auth-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

.dd-auth-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

/* Active tab glow */
.dd-auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Input focus animation - keep embossed look */
.dd-form-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.3),
    inset -1px -1px 3px rgba(255, 255, 255, 0.08),
    0 0 0 3px rgba(59, 130, 246, 0.2),
    0 0 20px rgba(59, 130, 246, 0.1);
  background: rgba(15, 23, 42, 0.35) !important;
  transform: translateY(-1px);
}

/* Link hover animation */
.dd-link {
  font-size: 0.875rem;
  color: #3b82f6;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

/* ==================== SIMPLE AUTH CARD (Main UI login — no 3D flip layer) ==================== */
.dd-auth-card--simple {
  width: 100%;
  max-width: var(--dd-auth-card-max, 480px);
  position: relative;
  z-index: 1;
}

.dd-auth-card--simple .dd-auth-card-surface {
  position: relative;
  background: rgba(26, 26, 36, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  padding: var(--dd-auth-card-pad, clamp(1.5rem, 4vw, 2.5rem));
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.55);
  animation: zoomIn 0.4s ease-out;
  overflow: hidden;
}

.dd-auth-card--simple .dd-auth-card-surface::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4, #8b5cf6, #3b82f6);
  background-size: 300% 300%;
  animation: gradientBorder 4s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.dd-auth-card--simple .dd-auth-view {
  display: none;
  flex-direction: column;
  gap: 0;
}

.dd-auth-card--simple .dd-auth-view.active {
  display: flex;
}

.dd-auth-card--simple .dd-auth-tab {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.dd-auth-card--simple .dd-link-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.dd-form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .dd-form-row-2col {
    grid-template-columns: 1fr;
  }
}

.dd-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

.dd-link:hover {
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.dd-link:hover::after {
  width: 100%;
}

/* Two column row for name fields */
.dd-form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  animation: fadeInUp 0.5s ease-out 0.1s both;
}

@media (max-width: 480px) {
  .dd-form-row-2col {
    grid-template-columns: 1fr;
  }
}

/* Hint text */
.dd-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: block;
}

/* Terms checkbox styling */
.dd-checkbox-label .dd-link {
  font-size: inherit;
}

/* Inline links in checkbox labels */
.dd-checkbox-label span {
  line-height: 1.4;
}

/* Animation for the whole card on signup page */
.dd-auth-card {
  transition: all 0.3s ease;
}

/* Smooth height transition when switching between login/signup */
.dd-auth-form {
  transition: all 0.3s ease;
}
