/* ==========================================================================
   ✨ ANIMATA & MAGIC UI ANIMATION ENGINE
   High-performance, GPU-accelerated micro-interactions, spotlights & border trails
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Animated Border Trail (Border Beam)
   A continuous glowing light beam tracing the perimeter of cards and buttons
   -------------------------------------------------------------------------- */
.animata-border-trail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg, 8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface-card, rgba(25, 27, 36, 0.75));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.animata-border-trail::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 250%;
  height: 250%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    transparent 0 310deg,
    var(--accent-glow, #38bdf8) 345deg,
    var(--accent-primary, #6366f1) 360deg
  );
  animation: border-trail-spin 6s linear infinite;
  z-index: -2;
  pointer-events: none;
}

.animata-border-trail::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  background: inherit;
  border-radius: calc(var(--radius-lg, 8px) - 1.5px);
  z-index: -1;
}

@keyframes border-trail-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Fast accent border beam for active / high-priority items */
.border-beam-active::before {
  animation-duration: 3.5s;
  background: conic-gradient(
    from 0deg,
    transparent 0 290deg,
    #ec4899 320deg,
    #8b5cf6 345deg,
    #3b82f6 360deg
  );
}

/* --------------------------------------------------------------------------
   2. Interactive Spotlight Card (Mouse-Following Radial Gradient)
   -------------------------------------------------------------------------- */
.spotlight-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg, 8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-card, rgba(23, 25, 35, 0.7));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --mouse-x: -999px;
  --mouse-y: -999px;
}

.spotlight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.5),
              0 0 24px -4px rgba(99, 102, 241, 0.25);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Spotlight inner radial glow overlay */
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1);
  background: radial-gradient(
    520px circle at var(--mouse-x) var(--mouse-y),
    rgba(99, 102, 241, 0.16),
    transparent 45%
  );
  z-index: 1;
}

.spotlight-card:hover::before {
  opacity: 1;
}

/* Secondary spotlight variant (Cyan / Emerald tone) */
.spotlight-cyan::before {
  background: radial-gradient(
    500px circle at var(--mouse-x) var(--mouse-y),
    rgba(56, 189, 248, 0.18),
    transparent 45%
  );
}

.spotlight-amber::before {
  background: radial-gradient(
    500px circle at var(--mouse-x) var(--mouse-y),
    rgba(245, 158, 11, 0.16),
    transparent 45%
  );
}

/* Spotlight Card Children Layer */
.spotlight-card > * {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   3. Shimmer Text & Badge Effects
   -------------------------------------------------------------------------- */
.animata-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.7) 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer-swipe 4s linear infinite;
}

@keyframes shimmer-swipe {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

.animata-badge-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
  transition: background-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animata-badge-glow:hover {
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  transform: scale(1.02);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.3);
  }
}

/* --------------------------------------------------------------------------
   4. Ambient Glowing Mesh Orbs (Background Atmosphere)
   -------------------------------------------------------------------------- */
.ambient-glow-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.45;
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  contain: strict;
}

.ambient-orb-1 {
  top: -10%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366f1 0%, rgba(99, 102, 241, 0) 70%);
  animation: orb-float-1 16s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  top: 25%;
  right: 5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #38bdf8 0%, rgba(56, 189, 248, 0) 70%);
  animation: orb-float-2 20s ease-in-out infinite alternate;
}

.ambient-orb-3 {
  bottom: 10%;
  left: 20%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
  animation: orb-float-3 18s ease-in-out infinite alternate;
}

@keyframes orb-float-1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(60px, 40px, 0) scale(1.1); }
  100% { transform: translate3d(-40px, 80px, 0) scale(0.95); }
}

@keyframes orb-float-2 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-70px, -50px, 0) scale(1.15); }
  100% { transform: translate3d(30px, 60px, 0) scale(0.9); }
}

@keyframes orb-float-3 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(50px, -60px, 0) scale(1.08); }
  100% { transform: translate3d(-50px, -20px, 0) scale(0.92); }
}

/* --------------------------------------------------------------------------
   5. Interactive Pill Tabs Engine
   -------------------------------------------------------------------------- */
.animata-tab-group {
  position: relative;
  display: inline-flex;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px;
  border-radius: 9999px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.animata-tab-pill {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  border-radius: 9999px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.45);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), width 220ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.animata-tab-btn {
  position: relative;
  z-index: 2;
  border: none;
  background: transparent;
  color: #94a3b8;
  padding: 0.65rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.animata-tab-btn:hover {
  color: #f8fafc;
}

.animata-tab-btn.is-active {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   6. Button Glow & Ripple Micro-interactions
   -------------------------------------------------------------------------- */
.animata-btn-glow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 600;
  border-radius: var(--radius-md, 6px);
  padding: 0.8rem 1.6rem;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px -2px rgba(99, 102, 241, 0.5);
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background-position 200ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.animata-btn-glow:hover {
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -4px rgba(139, 92, 246, 0.7);
  border-color: rgba(255, 255, 255, 0.4);
}

.animata-btn-glow:active {
  transform: scale(0.96);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Secondary Button with Border Glow */
.animata-btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-md, 6px);
  padding: 0.8rem 1.5rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animata-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.animata-btn-ghost:active {
  transform: scale(0.96);
}

/* --------------------------------------------------------------------------
   7. Card Float & Icon Bounce
   -------------------------------------------------------------------------- */
.animata-card-float {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animata-card-float:hover {
  transform: translateY(-6px);
}

.animata-icon-bounce {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.spotlight-card:hover .animata-icon-bounce {
  transform: scale(1.18) rotate(4deg);
}

/* --------------------------------------------------------------------------
   8. Expandable Accordion Carousel (animata/carousel/expandable.tsx)
   -------------------------------------------------------------------------- */
.animata-expandable-carousel {
  display: flex;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  width: 100%;
  height: clamp(320px, 42vw, 520px);
  padding: 0.5rem;
  border-radius: var(--radius-xl, 10px);
  background: rgba(10, 14, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.animata-expandable-carousel::-webkit-scrollbar {
  height: 5px;
}

.animata-expandable-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}

.expandable-card {
  flex: 1 1 clamp(52px, 7vw, 75px);
  min-width: clamp(52px, 7vw, 75px);
  height: 100%;
  position: relative;
  border-radius: var(--radius-lg, 8px);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #090d16;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              filter 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 200ms cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.expandable-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.expandable-card.is-active {
  flex: 4 1 clamp(260px, 48vw, 540px);
  min-width: clamp(260px, 48vw, 540px);
  border-color: var(--accent-glow, #38bdf8);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.7),
              0 0 24px -4px rgba(56, 189, 248, 0.35);
}

.animata-expandable-carousel:hover .expandable-card:not(.is-active):not(:hover) {
  filter: brightness(0.65) blur(0.5px);
  opacity: 0.85;
}

.expandable-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.expandable-card.is-active .expandable-media,
.expandable-card:hover .expandable-media {
  transform: scale(1.05);
}

.expandable-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 8, 15, 0.1) 0%,
    rgba(5, 8, 15, 0.45) 55%,
    rgba(5, 8, 15, 0.92) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1rem, 2vw, 1.8rem);
  z-index: 2;
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Inactive Card Vertical Label */
.expandable-vertical-title {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center center;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  transition: opacity 200ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 3;
}

.expandable-card.is-active .expandable-vertical-title {
  opacity: 0;
}

/* Active Caption & Wave Reveal */
.expandable-caption-box {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 680px;
}

.expandable-card.is-active .expandable-caption-box {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.expandable-title {
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.expandable-desc {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 0.9rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.expandable-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Wave Reveal Text Effect */
.wave-reveal-text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  animation: wave-reveal-up 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wave-reveal-up {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   9. Bento Feature Grid (animata/bento-grid/gradient.tsx)
   -------------------------------------------------------------------------- */
.animata-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
  width: 100%;
}

.bento-col-8 { grid-column: span 8; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .bento-col-8 { grid-column: span 12; }
  .bento-col-4 { grid-column: span 6; }
  .bento-col-6 { grid-column: span 12; }
}

@media (max-width: 640px) {
  .bento-col-4 { grid-column: span 12; }
}

.bento-card {
  position: relative;
  border-radius: var(--radius-xl, 10px);
  background: rgba(18, 24, 38, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: clamp(1.4rem, 2.5vw, 2.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 16px 40px -15px rgba(0, 0, 0, 0.45);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.65),
              0 0 30px -4px rgba(99, 102, 241, 0.25);
}

.bento-gradient-highlight {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.2;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-glow, #38bdf8), transparent 70%);
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-gradient-highlight {
  opacity: 0.35;
}

/* --------------------------------------------------------------------------
   10. Glowing Card with Multi-Stop Gradients (animata/card/glowing-card.tsx)
   -------------------------------------------------------------------------- */
.animata-glowing-card {
  --from-color: #4158D0;
  --via-color: #C850C0;
  --to-color: #FFCC70;
  position: relative;
  border-radius: var(--radius-xl, 10px);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--from-color), var(--via-color), var(--to-color));
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5),
              0 0 25px -5px var(--via-color);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.animata-glowing-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.65),
              0 0 40px -2px var(--via-color);
}

.glowing-card-inner {
  background: rgba(15, 20, 34, 0.9);
  border-radius: calc(var(--radius-xl, 10px) - 1.5px);
  padding: clamp(1.4rem, 2.5vw, 2.2rem);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   11. Shining Sweep Button (animata/button/shining-button)
   -------------------------------------------------------------------------- */
.animata-btn-shining {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 600;
  border-radius: var(--radius-md, 6px);
  padding: 0.75rem 1.6rem;
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animata-btn-shining::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: linear-gradient(
    65deg,
    transparent 20%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 80%
  );
  transform: translateX(-100%);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.animata-btn-shining:hover::after {
  transform: translateX(100%);
}

.animata-btn-shining:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.65);
}

.animata-btn-shining:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

/* --------------------------------------------------------------------------
   12. Reduced Motion Accessibility Support (WCAG 2.2)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .animata-border-trail::before,
  .animata-shimmer,
  .ambient-orb,
  .pulse-dot,
  .wave-reveal-text span {
    animation: none !important;
  }

  .spotlight-card,
  .animata-card-float,
  .animata-btn-glow,
  .animata-btn-ghost,
  .animata-btn-shining,
  .animata-tab-pill,
  .animata-icon-bounce,
  .expandable-card,
  .animata-glowing-card,
  .bento-card {
    transition: none !important;
    transform: none !important;
  }

  .spotlight-card::before,
  .animata-btn-shining::after {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   13. Admin Studio Scanner & Web Modifier (Modern Behance/Apple Glassmorphic)
   -------------------------------------------------------------------------- */
.admin-nav-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(10, 15, 26, 0.7);
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 4px;
}

.admin-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.admin-tab-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-tab-pill.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 15px -3px rgba(56, 189, 248, 0.3);
}

.admin-tab-pill:active {
  transform: scale(0.96);
}

.scanner-live-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  letter-spacing: 0.05em;
}

/* Scanner Workspace Split Grid */
.admin-scanner-grid {
  display: grid;
  grid-template-columns: clamp(340px, 35%, 460px) 1fr;
  gap: 0;
  min-height: 720px;
}

@media (max-width: 980px) {
  .admin-scanner-grid {
    grid-template-columns: 1fr;
  }
}

.scanner-tree-pane {
  background: rgba(11, 16, 28, 0.7);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(1.2rem, 2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 980px) {
  .scanner-tree-pane {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.scanner-editor-pane {
  padding: clamp(1.2rem, 2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(15, 20, 32, 0.4);
  min-width: 0;
}

/* Breadcrumbs Navigation */
.scanner-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.crumb-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background-color 200ms cubic-bezier(0.16, 1, 0.3, 1), color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.crumb-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
}

.crumb-sep {
  color: #475569;
}

/* File & Folder List Items */
.scanner-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 200ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  gap: 0.75rem;
}

.scanner-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
}

.scanner-item.is-selected {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 4px 18px -4px rgba(56, 189, 248, 0.25);
}

.scanner-item-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.scanner-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scanner-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: #94a3b8;
  white-space: nowrap;
}

/* Type Color Badges */
.badge-type {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-type-folder  { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-type-html    { background: rgba(249, 115, 22, 0.18); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.35); }
.badge-type-php     { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.badge-type-js      { background: rgba(234, 179, 8, 0.18);  color: #fde047; border: 1px solid rgba(234, 179, 8, 0.35); }
.badge-type-css     { background: rgba(14, 165, 233, 0.18); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.35); }
.badge-type-json    { background: rgba(236, 72, 153, 0.18); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.badge-type-image   { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-type-video   { background: rgba(139, 92, 246, 0.18); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }
.badge-type-other   { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); }
.badge-type-backup  { background: rgba(100, 116, 139, 0.25); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.4); }

/* Code Editor Surface */
.editor-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: rgba(9, 13, 22, 0.9);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

.editor-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(15, 22, 36, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.editor-body-split {
  display: flex;
  flex: 1;
  min-height: 480px;
  position: relative;
}

.editor-gutters {
  width: 52px;
  background: rgba(8, 12, 20, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem 0.4rem;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.5rem;
  text-align: right;
  user-select: none;
  overflow: hidden;
}

.editor-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.5rem;
  padding: 1rem;
  resize: none;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.editor-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
  background: rgba(10, 15, 26, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  color: #94a3b8;
}

/* Sandbox Live Preview Container */
.preview-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: rgba(12, 17, 28, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.preview-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(15, 22, 36, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 0.5rem;
}

.preview-viewport-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060911;
  padding: 1rem;
  overflow: auto;
}

.preview-iframe-device {
  width: 100%;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #ffffff;
  transition: width 220ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.preview-iframe-device.mode-tablet {
  width: 768px;
}

.preview-iframe-device.mode-mobile {
  width: 375px;
}

/* ==========================================================================
   14. Animata Extended Components Suite (Design.md Compliant)
   Sourced from codse/animata: Shooting Stars, 3D Tilt, Ripple, Glitch, Shiny
   ========================================================================== */

/* --- 14.1 Cosmic Shooting Stars Canvas (animata/background/shooting-stars) --- */
.shooting-stars-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.shooting-star {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(56, 189, 248, 0.8) 50%, #ffffff 100%);
  border-radius: 9999px;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
  opacity: 0;
  transform: rotate(-45deg);
  animation: shooting-star-fly 7s ease-in-out infinite;
}

.shooting-star:nth-child(1) {
  top: 15%;
  right: 20%;
  width: 120px;
  animation-delay: 0s;
  animation-duration: 6s;
}

.shooting-star:nth-child(2) {
  top: 35%;
  right: 45%;
  width: 90px;
  animation-delay: 2.2s;
  animation-duration: 7.5s;
}

.shooting-star:nth-child(3) {
  top: 60%;
  right: 15%;
  width: 140px;
  animation-delay: 4.5s;
  animation-duration: 8s;
}

@keyframes shooting-star-fly {
  0% {
    transform: translate(0, 0) rotate(-45deg) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translate(-60px, 60px) rotate(-45deg) scale(1);
  }
  25% {
    transform: translate(-280px, 280px) rotate(-45deg) scale(0.6);
    opacity: 0;
  }
  100% {
    transform: translate(-280px, 280px) rotate(-45deg) scale(0);
    opacity: 0;
  }
}

/* --- 14.2 3D Mouse Parallax Tilt Card (animata/card/tilted-card) --- */
.animata-tilt-card {
  position: relative;
  perspective: 1000px;
  border-radius: var(--radius-smooth, 8px);
  background: var(--surface-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--stroke-translucent, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.animata-tilt-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 45px -10px rgba(56, 189, 248, 0.15), 0 0 1px 1px rgba(255, 255, 255, 0.1);
}

.animata-tilt-card .tilt-inner {
  transform: translateZ(24px);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

/* --- 14.3 Water Ripple Button (animata/button/ripple-button) --- */
.animata-ripple-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-smooth, 8px);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animata-ripple-btn:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.animata-ripple-btn:active {
  transform: scale(0.96);
}

.animata-ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 70%);
  transform: scale(0);
  pointer-events: none;
  animation: ripple-spread 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ripple-spread {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- 14.4 Cyber Glitch Text (animata/text/glitch-text) --- */
.animata-glitch-text {
  position: relative;
  display: inline-block;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.animata-glitch-text::before,
.animata-glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  opacity: 0;
  pointer-events: none;
}

.animata-glitch-text:hover::before {
  opacity: 0.8;
  color: #00f0ff;
  transform: translate(-2px, -1px);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: glitch-anim-1 240ms cubic-bezier(0.16, 1, 0.3, 1) infinite alternate-reverse;
}

.animata-glitch-text:hover::after {
  opacity: 0.8;
  color: #ec4899;
  transform: translate(2px, 1px);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: glitch-anim-2 240ms cubic-bezier(0.16, 1, 0.3, 1) infinite alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: polygon(0 15%, 100% 15%, 100% 40%, 0 40%); }
  50% { clip-path: polygon(0 50%, 100% 50%, 100% 75%, 0 75%); }
  100% { clip-path: polygon(0 25%, 100% 25%, 100% 60%, 0 60%); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: polygon(0 60%, 100% 60%, 100% 90%, 0 90%); }
  50% { clip-path: polygon(0 20%, 100% 20%, 100% 45%, 0 45%); }
  100% { clip-path: polygon(0 75%, 100% 75%, 100% 100%, 0 100%); }
}

/* --- 14.5 Metallic Holographic Shiny Card (animata/card/github-card-shiny) --- */
.animata-shiny-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-smooth, 8px);
  background: var(--surface-glass, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--stroke-translucent, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animata-shiny-card .shiny-glare {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(56, 189, 248, 0.22) 50%,
    rgba(168, 85, 247, 0.22) 60%,
    transparent 80%
  );
  transform: rotate(-25deg) translateY(-100%);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  opacity: 0;
}

.animata-shiny-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.6);
}

.animata-shiny-card:hover .shiny-glare {
  transform: rotate(-25deg) translateY(0%);
  opacity: 1;
}

/* --- 14.6 Animated Flowing Gradient Text (animata/text/animated-gradient-text) --- */
.animata-gradient-text {
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 35%, #c084fc 70%, #38bdf8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-flow 5s linear infinite;
  display: inline-block;
  font-weight: 800;
  letter-spacing: -0.035em;
}

@keyframes gradient-flow {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@import url("animata-library.css");
