/* ============================================
   Calibra - Login Page Premium Animations
   ============================================ */

/* ---------- Optimized Background (Subtle & Elegant) ---------- */
.mesh-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.08), transparent 25%),
    radial-gradient(circle at 50% 50%, #ffffff 0%, #f4f4f5 100%);
  z-index: 0;
}

/* Eliminated heavy mesh-blob animations for performance */

/* ---------- Grid Dot Pattern Overlay ---------- */
/* Dot Pattern Removed for Ultra-Clean Look */

/* ---------- Shimmer Badge ---------- */
@keyframes shimmer-sweep {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(200%);
  }
}

.shimmer-badge {
  position: relative;
  overflow: hidden;
}

.shimmer-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.4) 50%,
      transparent 100%);
  width: 50%;
  animation: shimmer-sweep 3s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- Staggered Text Reveal ---------- */
@keyframes text-clip-reveal {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }

  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

.text-reveal {
  animation: text-clip-reveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

.text-reveal-d1 {
  animation-delay: 0.1s;
}

.text-reveal-d2 {
  animation-delay: 0.3s;
}

.text-reveal-d3 {
  animation-delay: 0.5s;
}

.text-reveal-d4 {
  animation-delay: 0.7s;
}

/* ---------- Typing Cursor Blink ---------- */
@keyframes cursor-blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: currentColor;
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}

/* ---------- NEW: Glossy Crystal Glassmorphism (Optimized) ---------- */
.glass-crystal {
  position: relative;
  /* Cleaner, clearer glass base */
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
  backdrop-filter: blur(12px) saturate(140%);
  /* Reduced blur */
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-radius: 2rem;

  /* Thick Glass Edge Effect (Bevel) - Refined for Subtlety */
  border: 1px solid rgba(255, 255, 255, 0.4);
  /* Lighter border */
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.05),
    /* Softer shadow */
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    /* Inner rim */
    inset 0 1px 20px rgba(255, 255, 255, 0.3);
  /* Inner glow volume */

  overflow: hidden;
  will-change: transform, opacity;
}

/* Top Sharp Highlight (Specular Reflection) */
.glass-crystal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 1), transparent);
  box-shadow: 0 1px 5px rgba(255, 255, 255, 0.8);
  z-index: 2;
  opacity: 0.9;
}

/* Caustic/Prism Edge Glow */
.glass-crystal::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.02);
  /* Subtle depth at bottom */
  pointer-events: none;
  z-index: 1;
}


/* ---------- Card Entrance from Bottom ---------- */
@keyframes card-entrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-enter {
  animation: card-entrance 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
}

.card-enter-d1 {
  animation-delay: 0.2s;
}

.card-enter-d2 {
  animation-delay: 0.4s;
}

/* ---------- Glow Pulse on Submit Button ---------- */
@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.0);
  }

  50% {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3), 0 0 60px rgba(124, 58, 237, 0.15);
  }
}

/* ---------- Gemstone Button (Glossy Dark Crystal) ---------- */
.btn-gemstone {
  position: relative;
  background: radial-gradient(circle at 50% 0%, #3f3f46, #18181b);
  /* Zinc-700 to Zinc-900 */
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-gemstone:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-gemstone:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Button Gloss Sheen */
.btn-gemstone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* ---------- Deep Crystal Input (Flattened & Clean) ---------- */
/* ---------- Deep Crystal Input (Ultra Clean) ---------- */
.input-crystal {
  background: rgba(255, 255, 255, 0.25);
  /* Lighter/Cleaner */
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: none;
  /* No shadow for maximum cleanliness */
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.input-crystal:focus {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.03),
    0 0 0 3px rgba(37, 99, 235, 0.1),
    0 0 15px rgba(37, 99, 235, 0.15);
}

/* ---------- Proficiency Orb Visualization ---------- */
.orb-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

@keyframes orb-pulse-glow {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }

  50% {
    transform: scale(1.05);
    filter: brightness(1.2);
  }
}

/* Solid Crystal Block Orb */
.orb-core-glass {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  position: relative;
  z-index: 10;

  /* Thick Glass Base */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  /* Less blur for crystal clear look */
  -webkit-backdrop-filter: blur(12px);

  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.15),
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    /* Outer rim */
    inset 0 0 40px rgba(255, 255, 255, 0.4);
  /* Inner volume */

  animation: orb-pulse-glow 4s ease-in-out infinite;
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

/* Sharp Specular Highlight (The "C" shine) */
.orb-core-glass::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 40%;
  height: 30%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
  filter: blur(2px);
  z-index: 2;
  opacity: 0.9;
  pointer-events: none;
}

/* Secondary Reflection (Bottom Right) */
.orb-core-glass::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 50%;
  height: 25%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
  z-index: 2;
  opacity: 0.6;
  pointer-events: none;
  transform: rotate(-30deg);
}

@keyframes text-rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.orb-ring {
  position: absolute;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.1);
  /* Thicker rings, like glass tubes */
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.orb-ring-1 {
  width: 260px;
  height: 260px;
  /* Border handled inline for dynamic color */
  animation: rotate-ring-1 40s linear infinite;
}

.orb-ring-2 {
  width: 340px;
  height: 340px;
  /* Border handled inline for dynamic color */
  animation: rotate-ring-2 60s linear infinite reverse;
}

.orb-ring-3 {
  width: 400px;
  height: 400px;
  /* Border handled inline */
  border-radius: 50%;
  animation: rotate-ring-3 50s linear infinite;
}

@keyframes rotate-ring-1 {
  0% {
    transform: rotateX(60deg) rotateY(-10deg) rotateZ(0deg);
  }

  100% {
    transform: rotateX(60deg) rotateY(-10deg) rotateZ(360deg);
  }
}

@keyframes rotate-ring-2 {
  0% {
    transform: rotateX(70deg) rotateY(20deg) rotateZ(0deg);
  }

  100% {
    transform: rotateX(70deg) rotateY(20deg) rotateZ(360deg);
  }
}

@keyframes rotate-ring-3 {
  0% {
    transform: rotateZ(0deg);
  }

  100% {
    transform: rotateZ(360deg);
  }
}

/* Orb Icons & Float Animations Removed for Performance */

/* ---------- Footer Fade In ---------- */
.footer-fade {
  animation: fadeInUp 0.5s ease-out 1.2s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Area Name Morph Transition ---------- */
.area-name-morph {
  display: inline-block;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Grid Container Tilt ---------- */
@keyframes grid-entrance {
  0% {
    opacity: 0;
    transform: rotate(6deg) scale(0.85) translateY(40px);
  }

  100% {
    opacity: 1;
    transform: rotate(3deg) scale(1) translateY(0);
  }
}

.grid-entrance {
  animation: grid-entrance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
  opacity: 0;
}

/* ---------- Navbar entrance ---------- */
@keyframes nav-slide-down {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-entrance {
  animation: nav-slide-down 0.6s ease-out forwards;
}

/* ---------- Slow Float Animation ---------- */
@keyframes float-slow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

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

/* ---------- Solid Panel (Sidebar) ---------- */
.glass-panel {
  background: #ffffff;
  border-right: 1px solid #e4e4e7;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
}