body {
  background-color: #f8fafc;
  color: #0f172a;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

#phone-profile-screen::-webkit-scrollbar,
.phone-view-scroll::-webkit-scrollbar {
  display: none;
}
#phone-profile-screen,
.phone-view-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.phone-tab-content {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card-premium {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-card-premium:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 35px -8px rgba(0, 0, 0, 0.6);
}

.neon-glow-avatar {
  box-shadow: 0 0 15px -3px rgba(99, 102, 241, 0.5);
}

@keyframes scaleInSuccess {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-success-scale {
  animation: scaleInSuccess 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes blob-slow {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
  100% { transform: translate(0px, 0px) scale(1); }
}
@keyframes blob-reverse {
  0% { transform: translate(0px, 0px) scale(1.05); }
  50% { transform: translate(-40px, 40px) scale(0.9); }
  100% { transform: translate(20px, -20px) scale(1.05); }
}
@keyframes pulseSubtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.blob-blur {
  filter: blur(80px);
  will-change: transform;
}

.perspective-container {
  perspective: 1200px;
  -webkit-perspective: 1200px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tap-source-card {
  position: relative;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  border-radius: 1.25rem;
  user-select: none;
  cursor: pointer;
}

.tap-source-card.layout-horizontal {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1.586;
}

.tap-source-card.layout-vertical {
  width: 250px;
  height: 395px;
}

.tap-source-card-front,
.tap-source-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: background 0.5s ease, border-color 0.5s ease, padding 0.3s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.tap-source-card.layout-horizontal .tap-source-card-front,
.tap-source-card.layout-horizontal .tap-source-card-back {
  padding: 1.75rem;
}

.tap-source-card.layout-vertical .tap-source-card-front,
.tap-source-card.layout-vertical .tap-source-card-back {
  padding: 2.25rem 1.5rem;
}

.tap-source-card-front {
  z-index: 2;
  transform: rotateY(0deg);
  -webkit-transform: rotateY(0deg);
}

.tap-source-card-back {
  z-index: 1;
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.card-finish-pvc {
  background: linear-gradient(135deg, #18181b 0%, #09090b 60%, #020205 100%) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.card-finish-metal {
  background: linear-gradient(135deg, #1f1f23 0%, #0c0c0e 50%, #17171a 100%) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  background-size: cover;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 6px),
    linear-gradient(135deg, #1f1f23 0%, #0c0c0e 50%, #17171a 100%) !important;
}

.card-grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-size: 20px 20px;
  background-image: linear-gradient(to right, #ffffff 1px, transparent 1px), linear-gradient(to bottom, #ffffff 1px, transparent 1px);
  pointer-events: none;
  border-radius: 1.25rem;
}

.card-shine {
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: skewX(-25deg);
  transition: 0.75s;
}
.tap-source-card:hover .card-shine {
  left: 200%;
}

.tap-source-card.layout-vertical .card-content-wrapper {
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  height: 100%;
}

.tap-source-card.layout-vertical .card-header {
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.tap-source-card.layout-vertical .card-logo-container {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tap-source-card.layout-vertical .card-logo-container span {
  text-align: center;
}

.tap-source-card.layout-vertical .card-logo-container span.font-display {
  font-size: 13px !important;
  letter-spacing: 0.15em !important;
}

.tap-source-card.layout-vertical .card-middle {
  margin: auto 0;
  flex-direction: column;
  gap: 1rem;
}

.tap-source-card.layout-vertical .card-footer {
  width: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
}

.tap-source-card.layout-vertical .card-holder {
  text-align: center;
  width: 100%;
}

.tap-source-card.layout-vertical .card-action-tag {
  margin-top: 0.25rem;
}

.tap-source-card.layout-vertical .back-content-wrapper {
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  align-items: center;
  text-align: center;
}

.tap-source-card.layout-vertical .back-footer {
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

@media (max-width: 400px) {
  .tap-source-card.layout-horizontal {
    font-size: 11px;
  }
  .tap-source-card.layout-horizontal .source-card-name {
    font-size: 12.5px !important;
  }
  .tap-source-card.layout-horizontal .source-card-title {
    font-size: 8px !important;
  }
  .tap-source-card.layout-horizontal .card-logo-container span.font-display {
    font-size: 9px !important;
  }
}

/* ═══════════════════════════════════════════════
   FUTURISTIC PREMIUM UI ENHANCEMENTS
   ═══════════════════════════════════════════════ */

/* --- Subtle Animated Dot Grid Background --- */
.futuristic-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -5;
  overflow: hidden;
}
.futuristic-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridFloat 60s linear infinite;
  opacity: 0.5;
}
html.dark .futuristic-bg::before {
  background-image: radial-gradient(circle, rgba(99,102,241,0.12) 1px, transparent 1px);
}
.futuristic-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.04) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.03) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(52,211,153,0.03) 0%, transparent 50%);
}
html.dark .futuristic-bg::after {
  background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,0.07) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(236,72,153,0.05) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(52,211,153,0.05) 0%, transparent 50%);
}
@keyframes gridFloat {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -10px) rotate(0.5deg); }
  50% { transform: translate(-5px, 5px) rotate(-0.3deg); }
  75% { transform: translate(8px, -5px) rotate(0.4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* --- Glassmorphism tiers --- */
.glass-premium {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
html.dark .glass-premium {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
}

.glass-deep {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}
html.dark .glass-deep {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-card-futuristic {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
html.dark .glass-card-futuristic {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.glass-card-futuristic:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.02);
  transform: translateY(-2px);
}
html.dark .glass-card-futuristic:hover {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25), 0 0 30px rgba(99, 102, 241, 0.03);
}

/* --- Glowing Gradient Border --- */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(236,72,153,0.2), rgba(99,102,241,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: opacity 0.4s ease;
  opacity: 0;
}
html.dark .gradient-border::before {
  background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(236,72,153,0.3), rgba(52,211,153,0.2));
}
.gradient-border:hover::before {
  opacity: 1;
}

/* --- Animated Gradient Border (always visible) --- */
.gradient-border-active {
  position: relative;
}
.gradient-border-active::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(236,72,153,0.3), rgba(99,102,241,0.4));
  background-size: 200% 200%;
  animation: gradientBorderShimmer 4s ease-in-out 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;
}
@keyframes gradientBorderShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- CTA Glow Pulse --- */
.cta-glow {
  position: relative;
  overflow: hidden;
}
.cta-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(236,72,153,0.15), rgba(99,102,241,0.2));
  background-size: 200% 200%;
  animation: glowPulse 3s ease-in-out infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.cta-glow:hover::after {
  opacity: 1;
}
@keyframes glowPulse {
  0%, 100% { background-position: 0% 50%; filter: blur(8px); }
  50% { background-position: 100% 50%; filter: blur(12px); }
}

/* --- Scroll Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.2s; }
.reveal-delay-4 { transition-delay: 0.28s; }

/* --- Shimmer Text Effect --- */
.text-shimmer {
  background: linear-gradient(90deg, #6366f1 0%, #a855f7 25%, #6366f1 50%, #a855f7 75%, #6366f1 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 4s linear infinite;
}
@keyframes shimmerText {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Interactive card lift --- */
.card-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.02);
}
html.dark .card-lift:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), 0 0 40px rgba(99, 102, 241, 0.04);
}

/* --- 3D Tilt Hover --- */
.tilt-hover {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Premium divider --- */
.divider-premium {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), rgba(236,72,153,0.15), rgba(99,102,241,0.2), transparent);
}

/* --- Animated badge pulse --- */
.badge-futuristic {
  position: relative;
  overflow: hidden;
}
.badge-futuristic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  animation: badgeShimmer 3s ease-in-out infinite;
}
@keyframes badgeShimmer {
  0% { transform: translateX(-100%); }
  50%, 100% { transform: translateX(100%); }
}

/* --- Subtle Scale on Active --- */
.btn-scale:active {
  transform: scale(0.97) !important;
}

/* --- Smooth Section Transitions --- */
.section-premium {
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Floating dots accent --- */
.dot-accent {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6366f1;
  display: inline-block;
  animation: dotPulse 2s ease-in-out infinite;
}
html.dark .dot-accent {
  background: #818cf8;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* --- Phone Simulator Dark Mode Enhancement --- */
html.dark #phone-awaiting-screen {
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
}
html.dark .phone-view-scroll {
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
}

/* --- Input focus glow --- */
.input-futuristic:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 1px 2px rgba(0,0,0,0.02);
}
html.dark .input-futuristic:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 1px 2px rgba(0,0,0,0.1);
}
