:root {
  --background: #000000; /* True black for a premium, crisp app feel */
  --foreground: #ffffff;
  --primary: #00F0FF; /* Vibrant Cyan */
  --primary-glow: rgba(0, 240, 255, 0.4);
  --secondary: #0055FF; /* Electric Blue */
  --secondary-glow: rgba(0, 85, 255, 0.4);
  --accent: #10b981; /* Bright green for call-to-actions */
  --text-muted: #A1A1AA; /* Brighter gray for crisper readability */
  --glass-bg: rgba(255, 255, 255, 0.05); /* Brighter glass */
  --glass-border: rgba(255, 255, 255, 0.12); /* Sharper borders */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
}

html {
  /* Removed scroll-behavior: smooth as it causes rendering lag with complex backgrounds on some systems */
  scroll-padding-top: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 0;
}

/* Optimized Aurora Background - Removed expensive filter: blur() */
body::before, body::after {
  content: '';
  position: fixed;
  width: 120vw;
  height: 120vh;
  top: -10vh;
  left: -10vw;
  z-index: -1;
  pointer-events: none;
  /* Removed blur filter as gradients are naturally soft and much cheaper to render */
  display: none; 
}

@media (min-width: 1024px) {
  body::before, body::after {
    display: block;
  }
}

body::before {
  /* Increased gradient spread for natural softness without blur filter */
  background: radial-gradient(circle at 50% 50%, rgba(0, 85, 255, 0.12), transparent 75%);
  animation: auroraOrbit1 25s ease-in-out infinite alternate;
}

body::after {
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.1), transparent 75%);
  animation: auroraOrbit2 30s ease-in-out infinite alternate-reverse;
}

@keyframes auroraOrbit1 {
  0% { transform: translate(-15%, -15%) scale(1); }
  100% { transform: translate(15%, 15%) scale(1.2); }
}

@keyframes auroraOrbit2 {
  0% { transform: translate(15%, -10%) scale(1.2); }
  100% { transform: translate(-15%, 15%) scale(1); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 40px 0;
  position: relative;
}

/* Redesigned Section Separator (iPhone Gesture Bar style) */
section:not(:first-of-type)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}


.gradient-text {
  background: linear-gradient(135deg, #00F0FF 0%, #0055FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Glassmorphism styling */
.glass-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              opacity 0.4s ease, 
              border-color 0.4s ease;
  backface-visibility: hidden; /* Prevent flickering */
  -webkit-backface-visibility: hidden;
}

/* Lowered blur for better frame rates */
@media (min-width: 1024px) {
  .glass-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

.glass-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

/* Navbar - Floating Pill Shape */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  z-index: 1000;
  background: rgba(3, 3, 5, 0.85); /* More solid for mobile performance */
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  backface-visibility: hidden;
}

@media (min-width: 1024px) {
  .navbar {
    background: rgba(3, 3, 5, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 0 30px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: white;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  gap: 12px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: translateX(-100%);
  transition: 0.6s ease;
  z-index: -1;
}

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

.btn-primary {
  background: rgba(0, 240, 255, 0.1);
  color: #fff;
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  background: var(--primary);
  color: #000;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.6);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border-color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(255,255,255,0.1);
}

.hero-btn {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border: 1px solid #10B981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), inset 0 0 15px rgba(16, 185, 129, 0.1);
}

.hero-btn:hover {
  background: #10B981;
  color: #000;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.6);
  transform: translateY(-4px) scale(1.02);
}

.badge {
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer - Rounded Elegant Shape */
footer {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  padding: 40px 40px 20px;
  margin: 30px auto 20px;
  max-width: 1200px;
  width: 95%;
  border-radius: 30px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 20px;
}

.footer-col h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: white;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.pulse {
  animation: pulse-glow 2s infinite;
}

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

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: #475569; /* Lighter slate gray for better visibility */
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary); /* Glows blue on hover */
}

/* Table of contents styling for PHP conversion */
.toc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

.toc-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateX(5px);
}

.toc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* Targeted Homepage Responsiveness */
@media (max-width: 768px) {
  /* Hero Section */
  #home-hero-card {
    grid-template-columns: 1fr !important;
    padding: 25px 20px !important;
    gap: 30px !important;
    text-align: center;
  }
  
  #home-hero-card h1 {
    font-size: 2rem !important;
  }

  #home-hero-card .btn {
    width: 100% !important;
  }

  /* Grid Stackers */
  .feature-grid, 
  .footer-grid, 
  .toc-container,
  #subscription div[style*="grid-template-columns"],
  .technical-summary-grid,
  .deep-dive-grid,
  .comparison-dashboard,
  #ios-hero-grid,
  .ios-specs-grid,
  .ios-ai-grid,
  .ios-features-grid,
  .ios-requirements-grid,
  .ios-pricing-grid,
  .pc-stats-grid,
  .pc-comparison-grid,
  .pc-shortcuts-main-grid,
  .pc-shortcuts-sub-grid,
  .pc-features-grid,
  .pc-optimization-grid,
  .pc-hardware-grid,
  .pc-install-grid,
  .blog-recommended-grid,
  .blog-layout-grid,
  .blog-card-grid,
  .dl-specs-grid {
    grid-template-columns: 1fr !important;
  }

  /* Footer responsiveness */
  footer {
    padding: 30px 20px !important;
    margin: 20px auto !important;
    border-radius: 20px !important;
    text-align: center;
  }

  .footer-grid {
    gap: 30px !important;
    margin-bottom: 30px !important;
  }

  .footer-col {
    padding-right: 0 !important;
  }

  .footer-col div[style*="display: flex"] {
    justify-content: center !important;
  }

  .footer-description {
    padding-right: 0 !important;
    font-size: 1rem !important;
  }

  .footer-copyright-bar {
    border-radius: 20px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
  }

  .footer-copyright-content {
    flex-direction: column !important;
    gap: 15px !important;
    text-align: center;
  }

  .dl-page-container {
    display: flex !important;
    flex-direction: column !important;
  }

  .dl-main-grid {
    display: contents !important;
  }

  .dl-title-block {
    order: 2;
    margin-top: 20px;
  }

  .dl-main-grid > div:first-child {
    order: 3;
  }

  .dl-main-grid > div:last-child {
    order: 1;
    margin-bottom: 20px;
  }

  .dl-main-grid > div[style*="position: sticky"] {
    position: static !important;
  }

  /* Blog Typography and UI tweaks */
  .blog-card-grid {
    gap: 20px !important;
  }
  
  .blog-card-grid > div:first-child {
    height: 220px !important;
  }
  
  .article-content {
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
  }

  .blog-post-title {
    font-size: 2.2rem !important;
  }

  .post-actions {
    right: 20px !important;
    bottom: -20px !important;
  }
  
  .post-actions .glass-btn {
    width: 50px !important;
    height: 50px !important;
  }

  #ios-hero-grid,
  #pc-hero-content {
    text-align: center;
    gap: 30px !important;
  }

  #ios-hero-grid h1,
  #pc-hero-content h1,
  .dl-hero-title {
    font-size: 2.2rem !important;
    line-height: 1.2 !important;
  }

  .terminal-box {
    padding: 20px !important;
  }
  
  .terminal-box div,
  .dl-hash-box {
    font-size: 0.85rem !important;
    word-break: break-all;
    white-space: normal;
    white-space: normal;
  }

  #ios-hero-grid div[style*="display: flex; gap: 20px"],
  #pc-hero-content div[style*="display: flex; gap: 20px"] {
    flex-direction: column !important;
    align-items: center !important;
  }

  #ios-hero-grid a.btn,
  #pc-hero-content a.btn {
    width: 100% !important;
    max-width: 300px;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #ios-hero-grid div[style*="rotate"] {
    transform: rotate(0deg) !important;
    margin-top: 20px;
  }

  .pc-shortcuts-main-grid {
    gap: 40px !important;
  }

  .pc-stats-grid > div {
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  /* Reduce top padding for hero section container */
  div[style*="padding-top: 80px"][style*="padding-bottom: 40px"] {
    padding-top: 40px !important;
    padding-bottom: 30px !important;
  }

  .ios-specs-grid > div {
    border-left: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
  }

  .ios-pricing-grid {
    gap: 30px !important;
  }

  .comparison-dashboard {
    padding: 15px !important;
  }

  .comparison-dashboard > div:first-child {
    flex-direction: row !important;
    overflow-x: auto !important;
    padding-bottom: 15px !important;
  }

  .comp-tab-btn {
    min-width: 200px !important;
  }

  /* Slider Fixes */
  .slide img {
    height: auto !important;
    max-height: 50vh !important;
  }

  /* Section Headings */
  section h2 {
    font-size: 2.2rem !important;
  }
  
  .nav-links {
    display: none;
  }
  
  .container {
    padding: 0 15px;
  }

  /* Mobile Nav Components */
  .mobile-menu-btn {
    display: flex !important;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
  }

  .mobile-nav {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    width: 90%;
    background: rgba(3, 3, 5, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 20px;
    gap: 10px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  }

  .mobile-nav.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
  }

  .mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    transition: all 0.3s ease;
  }

  .mobile-nav a:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary);
  }

  /* Fixed Stacking for Deep Dive */
  .deep-dive-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }

  .deep-dive-grid > div:not(.glass-card) {
    order: 1 !important;
  }

  .deep-dive-grid > .glass-card {
    order: 2 !important;
  }
}

/* Hide mobile components globally for desktop */
.mobile-nav { display: none; }
.mobile-menu-btn { display: none; }

/* Markdown-like content styles */
.content-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.content-section h3 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

.content-section p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.content-section ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

/* Custom Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 30px;
  height: 30px;
  background: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  z-index: 9999;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.15s ease;
  mix-blend-mode: screen;
}

.cursor-glow.active {
  transform: translate(-50%, -50%) scale(2.5);
  background: rgba(0, 85, 255, 0.4);
  box-shadow: 0 0 40px rgba(0, 85, 255, 0.9), inset 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Mobile Tap Ripple */
.tap-ripple {
  position: fixed;
  width: 30px;
  height: 30px;
  background: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1);
  z-index: 9998;
  animation: rippleAnim 0.6s ease-out forwards;
}

@keyframes rippleAnim {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* Image Slider Hide Scrollbar */
.slider::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .cursor-glow {
    display: none !important;
  }
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 54px;
  height: 54px;
  background: rgba(10, 15, 25, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #00F0FF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-8px);
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 15px 30px rgba(0, 240, 255, 0.2);
}

.progress-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.progress-rect {
  fill: none;
  stroke: #00F0FF;
  stroke-width: 3;
  stroke-linecap: round;
  /* Transition removed for smoother JS-driven updates */
}

.scroll-top-btn i {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
  }
}

