/* ==========================================================================
   IPTV VSHOP - Apple iOS Design System
   Inspired by Apple iOS & macOS Design Philosophy
   ========================================================================== */

:root {
  --bg-primary: #07080b;
  --bg-secondary: #0d0f14;
  --bg-tertiary: #131620;
  
  --glass-surface: rgba(18, 21, 28, 0.65);
  --glass-surface-hover: rgba(26, 30, 42, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.16);
  --glass-border-focus: rgba(10, 132, 255, 0.4);

  --apple-blue: #0A84FF;
  --apple-blue-hover: #0071E3;
  --apple-purple: #BF5AF2;
  --apple-green: #30D158;
  --apple-cyan: #64D2FF;
  --apple-orange: #FF9F0A;

  --text-primary: #FFFFFF;
  --text-secondary: #98989F;
  --text-muted: #636366;

  --squircle-sm: 16px;
  --squircle-md: 22px;
  --squircle-lg: 28px;
  --squircle-xl: 36px;
}

/* Reset & Base Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Glows & Apple Mesh Gradients */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  transition: transform 8s ease-in-out;
}

.orb-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #0A84FF 0%, rgba(10, 132, 255, 0) 70%);
  top: -150px;
  left: 20%;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #BF5AF2 0%, rgba(191, 90, 242, 0) 70%);
  top: 40%;
  right: -100px;
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #0071E3 0%, rgba(0, 113, 227, 0) 70%);
  bottom: -200px;
  left: 10%;
  animation: floatOrb 25s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, -40px) scale(0.95); }
}

/* Apple iOS Glassmorphism Card System */
.glass-panel {
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--squircle-lg);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

.glass-panel-static {
  background: var(--glass-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--squircle-lg);
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

/* Floating Glass Navbar */
.glass-nav {
  background: rgba(12, 14, 20, 0.75);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* Dynamic Frosted Glass Pill Badges */
.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Apple iOS Segmented Control */
.segmented-control {
  background: rgba(22, 25, 34, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 4px;
  display: inline-flex;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.segment-btn {
  position: relative;
  z-index: 2;
  padding: 8px 22px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 9999px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  white-space: nowrap;
}

.segment-btn:hover {
  color: #FFFFFF;
}

.segment-btn.active {
  color: #FFFFFF;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* iOS Best Value Metallic & Iridescent Card Highlight */
.best-value-card {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 28, 42, 0.85) 0%, rgba(14, 16, 24, 0.95) 100%);
  border: 1px solid rgba(10, 132, 255, 0.4);
  box-shadow: 0 20px 60px -15px rgba(10, 132, 255, 0.25), 0 0 0 1px rgba(10, 132, 255, 0.2);
}

.best-value-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--squircle-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.8), rgba(191, 90, 242, 0.6), rgba(48, 209, 88, 0.4), rgba(10, 132, 255, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Apple Buttons */
.btn-apple-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #0A84FF 0%, #0071E3 100%);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 18px rgba(10, 132, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-apple-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, #1f8eff 0%, #0077ef 100%);
}

.btn-apple-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-apple-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  color: #FFFFFF;
  font-weight: 500;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-apple-glass:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-apple-glass:active {
  transform: translateY(0) scale(0.98);
}

/* WhatsApp Glowing Button */
.btn-whatsapp-glow {
  background: linear-gradient(180deg, #25D366 0%, #1EBE5D 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-whatsapp-glow:hover {
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.6);
  background: linear-gradient(180deg, #2ae16e 0%, #22ce65 100%);
}

/* Bento Box Grid Utilities */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

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

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

/* Device Mockup Styling */
.tv-frame {
  position: relative;
  background: #000;
  border-radius: 24px;
  border: 4px solid #1c1d22;
  box-shadow: 0 30px 100px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.tv-stand {
  width: 160px;
  height: 12px;
  background: linear-gradient(90deg, #2a2c34 0%, #4a4d59 50%, #2a2c34 100%);
  margin: 0 auto;
  border-radius: 0 0 8px 8px;
}

/* Pulse Indicators */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--apple-green);
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--apple-green);
  opacity: 0.6;
  animation: pulseAnimation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* iOS Accordion Item */
.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 350px;
  opacity: 1;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #07080b;
}

::-webkit-scrollbar-thumb {
  background: #252834;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #373b4d;
}

/* Floating WhatsApp Widget */
.floating-wa-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #25D366, #128C7E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-wa-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.6);
}
