/* ==========================================================================
   DORAEMON CLOUD — DEDICATED ADDICTIVE UI MODULE (public/ui/doraemon_ui.css)
   - Interactive Mouse/Touch Spotlight Cards
   - Animated Conic Shimmer Borders on Hero & Featured Plans
   - Staggered Scroll-Reveal Motion
   - Floating Glassmorphic Mobile Thumb-Dock
   - Interactive Plan Tier Switcher & Billing Cycle Toggle
   ========================================================================== */

/* 1. Ambient Aurora Mesh Backdrop */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 55vh;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(45% 65% at 22% 20%, rgba(16, 185, 129, 0.17), transparent 70%),
    radial-gradient(40% 60% at 78% 15%, rgba(6, 182, 212, 0.13), transparent 72%);
  filter: blur(42px);
  animation: dhAuroraDrift 14s ease-in-out infinite alternate;
}
html[data-theme="light"] body::before {
  opacity: 0.45;
}
@keyframes dhAuroraDrift {
  0% { transform: translate3d(-2%, 0, 0) scale(1); }
  100% { transform: translate3d(2%, 3%, 0) scale(1.06); }
}

/* 2. Interactive Spotlight Hover Effect on Every Card */
.vps-card, .vps-plan, .vps-spec-card, .panel, .auth-card, .vps-strip-item {
  position: relative;
  overflow: hidden;
}
.vps-card::after, .vps-plan::after, .vps-spec-card::after, .vps-strip-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(52, 211, 153, 0.14),
    transparent 65%
  );
}
.vps-card:hover::after, .vps-plan:hover::after, .vps-spec-card:hover::after, .vps-strip-item:hover::after {
  opacity: 1;
}

/* 3. Shimmer Top-Edge Accent on Featured / Hero Cards */
.vps-plan.featured::before, .vps-spec-card::before, .auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #34d399, #22d3ee, transparent);
  background-size: 200% 100%;
  animation: dhShimmerLine 3.6s linear infinite;
}
@keyframes dhShimmerLine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 4. Interactive Billing Cycle Toggle (Monthly vs Quarterly Save) */
.dh-billing-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(15, 22, 35, 0.85);
  border: 1px solid var(--border);
  margin: 0 auto 28px;
}
html[data-theme="light"] .dh-billing-wrap {
  background: #ede9e0;
}
.dh-bill-btn {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dh-bill-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #02140c;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.30);
}

/* 5. Interactive Cloud Spec Preview Tabs (Hero Right Card) */
.dh-tabs-mini {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: rgba(3, 5, 8, 0.55);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
}
html[data-theme="light"] .dh-tabs-mini {
  background: #f1ede5;
}
.dh-tab-mini {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.dh-tab-mini.active {
  background: var(--em-soft);
  color: var(--em-hi);
  border: 1px solid var(--border-em);
}

/* 6. Scroll Reveal Animations */
.dh-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.dh-reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* 7. Tactile Button Press Ripple */
.vps-btn, .btn {
  position: relative;
  overflow: hidden;
}
.dh-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.28);
  animation: dhRippleAnim 0.55s ease-out forwards;
  pointer-events: none;
}
@keyframes dhRippleAnim {
  to { transform: scale(3.6); opacity: 0; }
}

/* 8. Floating Mobile Thumb-Dock (Only on Mobile <= 768px) */
.dh-mobile-dock {
  display: none;
}
@media (max-width: 768px) {
  body { padding-bottom: 78px; }
  .dh-mobile-dock {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 80;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 6px;
    border-radius: 18px;
    background: rgba(8, 12, 20, 0.88);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(16, 185, 129, 0.30);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.60);
  }
  html[data-theme="light"] .dh-mobile-dock {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(5, 150, 105, 0.28);
  }
  .dh-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 12px;
    transition: all 0.16s ease;
  }
  .dh-dock-item.active, .dh-dock-item:hover {
    color: var(--em-hi);
    background: var(--em-soft);
  }
  .dh-dock-item img {
    width: 19px;
    height: 19px;
    filter: invert(0.82);
  }
  html[data-theme="light"] .dh-dock-item img {
    filter: invert(0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before, .vps-plan.featured::before, .vps-spec-card::before, .auth-card::before { animation: none !important; }
  .dh-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
