@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* Apple iOS Spring Timing Function */
:root {
  --ios-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ios-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ios-squircle: 22px;
  
  /* Default Theme: Neon Indigo */
  --primary-glow: #6366f1;
  --secondary-glow: #a855f7;
  --accent-color: #06b6d4;
  --theme-gradient: linear-gradient(135deg, #6366f1, #a855f7);
}

[data-theme="cyan"] {
  --primary-glow: #06b6d4;
  --secondary-glow: #3b82f6;
  --accent-color: #10b981;
  --theme-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);
}

[data-theme="pink"] {
  --primary-glow: #ec4899;
  --secondary-glow: #f43f5e;
  --accent-color: #fb923c;
  --theme-gradient: linear-gradient(135deg, #ec4899, #f43f5e);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Plus Jakarta Sans', 'SF Pro Text', 'SF Pro Display', sans-serif;
  background-color: #050609;
  color: #f1f5f9;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.5s var(--ios-spring);
}

/* Cyber Grid & iOS Lighting */
.cyber-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 25%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black 40%, transparent 85%);
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
  animation: orbFloat 16s ease-in-out infinite alternate;
  transition: background 0.7s var(--ios-spring);
}

.orb-1 {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, var(--primary-glow) 0%, rgba(99, 102, 241, 0.15) 55%, transparent 75%);
  filter: blur(100px);
  opacity: 0.55;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--secondary-glow) 0%, rgba(236, 72, 153, 0.15) 55%, transparent 75%);
  filter: blur(110px);
  opacity: 0.45;
  bottom: 8%;
  right: -100px;
  animation-duration: 20s;
  animation-delay: -6s;
}

.orb-3 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent-color) 0%, rgba(6, 182, 212, 0.12) 55%, transparent 75%);
  filter: blur(90px);
  opacity: 0.4;
  top: 45%;
  left: -140px;
  animation-duration: 18s;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(calc(-50% + 40px), 35px) scale(1.1); }
  100% { transform: translate(calc(-50% - 35px), -20px) scale(0.95); }
}

/* iOS Spring Interactive Scaling (Haptic feel) */
.ios-pressable {
  transition: transform 0.22s var(--ios-bounce), box-shadow 0.25s var(--ios-spring), filter 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.ios-pressable:active {
  transform: scale(0.94) !important;
  filter: brightness(0.92);
}

/* DYNAMIC ISLAND GIMMICK */
.dynamic-island-container {
  position: sticky;
  top: 12px;
  z-index: 100;
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;
}

.dynamic-island {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  height: 38px;
  min-width: 210px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 35px -8px rgba(0, 0, 0, 0.9),
              0 0 0 1px rgba(0, 0, 0, 0.6),
              0 0 20px rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.5s var(--ios-bounce);
  overflow: hidden;
  will-change: width, height, border-radius;
}

.dynamic-island:hover {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 40px -6px rgba(0, 0, 0, 0.95),
              0 0 25px rgba(99, 102, 241, 0.25);
}

/* Expanded Dynamic Island State */
.dynamic-island.is-expanded {
  height: 145px;
  width: 92%;
  max-width: 480px;
  border-radius: 32px;
  padding: 16px 20px;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background: rgba(8, 9, 14, 0.96);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95),
              0 0 40px rgba(99, 102, 241, 0.2);
}

/* Equalizer bar animation for island */
.eq-bar {
  width: 3px;
  height: 14px;
  background: #10b981;
  border-radius: 9999px;
  animation: eqPulse 1s ease-in-out infinite alternate;
}
.eq-bar:nth-child(2) { animation-delay: 0.2s; height: 18px; }
.eq-bar:nth-child(3) { animation-delay: 0.4s; height: 10px; }
.eq-bar:nth-child(4) { animation-delay: 0.15s; height: 16px; }

@keyframes eqPulse {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Glass Panels with iOS Frosted Glass Depth */
.glass-panel {
  background: rgba(14, 17, 27, 0.76);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.8),
              inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* Interactive Spotlight Squircle Cards */
.spotlight-card {
  position: relative;
  background: rgba(17, 21, 34, 0.74);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.65),
              inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: transform 0.35s var(--ios-spring),
              box-shadow 0.35s var(--ios-spring),
              border-color 0.35s ease;
  overflow: hidden;
  cursor: pointer;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    450px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.12),
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

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

.spotlight-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 22px 45px -10px rgba(0, 0, 0, 0.85),
              0 0 30px -5px var(--hover-glow, rgba(99, 102, 241, 0.35));
}

.spotlight-card:active {
  transform: scale(0.95) !important;
}

/* Brand Specific Glow Colors */
.card-tiktok { --hover-glow: rgba(255, 0, 127, 0.4); }
.card-tiktok:hover { border-color: rgba(255, 0, 127, 0.45); }

.card-telegram { --hover-glow: rgba(0, 162, 255, 0.4); }
.card-telegram:hover { border-color: rgba(0, 162, 255, 0.45); }

.card-roblox { --hover-glow: rgba(255, 60, 60, 0.4); }
.card-roblox:hover { border-color: rgba(255, 80, 80, 0.45); }

/* TikTok Icon Glitch & Spring */
.tiktok-icon-wrap {
  position: relative;
  transition: transform 0.35s var(--ios-bounce);
}
.spotlight-card:hover .tiktok-icon-wrap {
  transform: scale(1.18);
  filter: drop-shadow(-2px 0 0 rgba(0, 242, 254, 0.9)) drop-shadow(2px 0 0 rgba(254, 44, 85, 0.9));
}

/* Roblox Logo Styling */
.roblox-svg-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
  transition: transform 0.4s var(--ios-bounce), filter 0.3s ease;
}
.spotlight-card:hover .roblox-svg-icon {
  transform: scale(1.2) rotate(14deg);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.95));
}

/* Profile Avatar Dynamic Ring */
.avatar-container {
  position: relative;
  border-radius: 9999px;
  padding: 3.5px;
  background: conic-gradient(from 0deg, var(--primary-glow), var(--secondary-glow), var(--accent-color), #ec4899, var(--primary-glow));
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.55), 0 0 70px rgba(236, 72, 153, 0.25);
  animation: rotateGradient 6s linear infinite;
  transition: transform 0.35s var(--ios-bounce);
}

.avatar-container:hover {
  transform: scale(1.06);
}

@keyframes rotateGradient {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* Primary SIUAMXD Button with Fluid Spring */
.glass-btn-primary {
  position: relative;
  background: linear-gradient(135deg, #ff3366 0%, #ff5e36 50%, #ff9900 100%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 12px 35px -5px rgba(255, 75, 43, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: all 0.35s var(--ios-spring);
  overflow: hidden;
}

.glass-btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: shineSweep 4s infinite ease-in-out;
}

@keyframes shineSweep {
  0%, 65% { left: -150%; }
  100% { left: 200%; }
}

.glass-btn-primary:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 18px 45px -5px rgba(255, 75, 43, 0.8),
              0 0 35px rgba(255, 75, 43, 0.45);
  filter: brightness(1.1);
}

.glass-btn-primary:active {
  transform: scale(0.95) !important;
}

/* Floating Like & Flame Particles Gimmick */
.floating-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-size: 24px;
  will-change: transform, opacity;
  animation: floatUpFade 1.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  filter: drop-shadow(0 0 8px rgba(255, 80, 80, 0.8));
}

@keyframes floatUpFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
  }
  30% {
    transform: translate(calc(-50% + var(--dx, 0px)), -70px) scale(1.3) rotate(var(--rot, 15deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), -150px) scale(1.8) rotate(var(--rot, 30deg));
  }
}

/* iOS Toast Notification */
.ios-toast {
  position: fixed;
  top: 65px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px) scale(0.9);
  background: rgba(22, 25, 38, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: all 0.4s var(--ios-bounce);
}

.ios-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Video Frame Container */
.video-container {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #090b12;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.85),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.35s var(--ios-spring);
}

.video-container:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9),
              0 0 30px -5px rgba(99, 102, 241, 0.3);
  transform: translateY(-3px);
}

.video-iframe {
  width: 100%;
  height: 580px;
  border: none;
}

/* Entrance Animations */
.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: iosFadeUp 0.75s var(--ios-bounce) forwards;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }

@keyframes iosFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bottom Floating Dock */
.bottom-dock {
  background: rgba(14, 18, 30, 0.86);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px -5px rgba(0, 0, 0, 0.85),
              0 0 25px rgba(99, 102, 241, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
