/* 
========================================
ULTRA ADVANCED GLASSMORPHISM NEWS WEBSITE
COMPLEX STYLING & ANIMATION SYSTEM
========================================
*/

/* Advanced Font Loading & Typography System */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

/* Ultra Advanced CSS Custom Properties System */
:root {
  /* Glassmorphism Color Palette */
  --glass-primary: rgba(255, 255, 255, 0.08);
  --glass-secondary: rgba(255, 255, 255, 0.12);
  --glass-tertiary: rgba(255, 255, 255, 0.16);
  --glass-quaternary: rgba(255, 255, 255, 0.04);
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-shadow: rgba(0, 0, 0, 0.3);
  --glass-deep-shadow: rgba(0, 0, 0, 0.6);

  /* Dynamic Color System */
  --primary-black: #0a0a0a;
  --primary-dark: #121212;
  --secondary-dark: #1a1a1a;
  --tertiary-dark: #242424;
  --accent-dark: #2a2a2a;
  --surface-dark: #161616;
  --surface-elevated: #1f1f1f;
  --surface-floating: #252525;

  /* Advanced Border System */
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --border-glass-strong: 1px solid rgba(255, 255, 255, 0.2);
  --border-glass-subtle: 1px solid rgba(255, 255, 255, 0.05);
  --border-glow: 1px solid rgba(59, 130, 246, 0.3);
  --border-glow-strong: 1px solid rgba(59, 130, 246, 0.6);

  /* Dynamic Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-tertiary: #8a8a8a;
  --text-muted: #666666;
  --text-ghost: rgba(255, 255, 255, 0.4);
  --text-highlight: #f0f9ff;

  /* Complex Accent Color System */
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-blue-dark: #1d4ed8;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-violet: #8b5cf6;
  --accent-violet-light: #a78bfa;
  --accent-orange: #f97316;
  --accent-red: #ef4444;
  --accent-yellow: #eab308;
  --accent-pink: #ec4899;

  /* Advanced Gradient System */
  --gradient-primary: linear-gradient(
    135deg,
    #0a0a0a 0%,
    #1a1a1a 50%,
    #0a0a0a 100%
  );
  --gradient-surface: linear-gradient(
    145deg,
    #121212 0%,
    #1f1f1f 50%,
    #161616 100%
  );
  --gradient-glass: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  --gradient-accent: linear-gradient(
    135deg,
    #3b82f6 0%,
    #1d4ed8 50%,
    #06b6d4 100%
  );
  --gradient-accent-reverse: linear-gradient(
    315deg,
    #3b82f6 0%,
    #1d4ed8 50%,
    #06b6d4 100%
  );
  --gradient-rainbow: linear-gradient(
    135deg,
    #3b82f6,
    #8b5cf6,
    #ec4899,
    #f97316,
    #eab308,
    #10b981,
    #06b6d4
  );
  --gradient-text: linear-gradient(135deg, #ffffff 0%, #b3b3b3 100%);
  --gradient-text-accent: linear-gradient(
    135deg,
    #60a5fa 0%,
    #22d3ee 50%,
    #34d399 100%
  );
  --gradient-mesh: radial-gradient(
      circle at 20% 80%,
      rgba(120, 119, 198, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 119, 198, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(120, 219, 255, 0.3) 0%,
      transparent 50%
    );

  /* Complex Shadow System */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.37);
  --shadow-glass-strong: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-glow-strong: 0 0 40px rgba(59, 130, 246, 0.6);
  --shadow-glow-xl: 0 0 60px rgba(59, 130, 246, 0.4);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-inner-strong: inset 0 4px 8px rgba(0, 0, 0, 0.2);

  /* Advanced Blur System */
  --blur-sm: blur(4px);
  --blur-md: blur(8px);
  --blur-lg: blur(12px);
  --blur-xl: blur(16px);
  --blur-2xl: blur(24px);
  --blur-3xl: blur(32px);

  /* Border Radius System */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;

  /* Advanced Transition System */
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-elastic: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-spring: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Typography System */
  --font-primary: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --font-display: "Orbitron", "Inter", sans-serif;
  --font-body: "Space Grotesk", "Inter", sans-serif;

  /* Z-Index System */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* Advanced Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-primary);
  background: var(--primary-black);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Ultra Advanced Background System */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-mesh);
  opacity: 0.6;
  z-index: -3;
  animation: meshMove 20s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(59, 130, 246, 0.15) 1px,
    transparent 0
  );
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -2;
  animation: gridMove 60s linear infinite;
  opacity: 0.3;
}

/* Glassmorphism Container System */
.glass-container {
  background: var(--glass-primary);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}

.glass-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
}

.glass-container-strong {
  background: var(--glass-secondary);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border: var(--border-glass-strong);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-glass-strong);
}

.glass-surface {
  background: var(--glass-tertiary);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: var(--border-glass-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Advanced Container System */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

.container-fluid {
  width: 100%;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Ultra Advanced Header System */
header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--glass-primary);
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  border-bottom: var(--border-glass);
  transition: var(--transition-normal);
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-blue),
    transparent
  );
  opacity: 0;
  transition: var(--transition-normal);
}

header.scrolled::before {
  opacity: 1;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.logo {
  position: relative;
  z-index: 10;
}

.logo h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-text-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
  position: relative;
  letter-spacing: -0.02em;
  transition: var(--transition-normal);
}

/* Align icon + brand name cleanly in header */
.logo h1 a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  display: inline-block;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.logo h1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transition: var(--transition-normal);
  transform: translateY(-2px);
}

.logo h1:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Advanced Time Display */
.nav-time {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--glass-quaternary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: var(--border-glass-subtle);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.nav-time::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(59, 130, 246, 0.2),
    transparent
  );
  transition: left 1s ease-in-out;
}

.nav-time:hover::before {
  left: 100%;
}

.nav-time:hover {
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Ultra Advanced Hero Section */
.hero-section {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--gradient-surface);
  border-bottom: var(--border-glass);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 340deg,
    rgba(59, 130, 246, 0.1) 360deg
  );
  animation: heroRotate 20s linear infinite;
  z-index: 1;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(10, 10, 10, 0.8) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  margin-bottom: 2rem;
  background: var(--gradient-text-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  letter-spacing: -0.02em;
  position: relative;
  animation: titleReveal 2s ease-out 0.5s both;
}

.hero-content h1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2),
    rgba(139, 92, 246, 0.2)
  );
  filter: blur(20px);
  transform: scale(1.1);
  z-index: -1;
  opacity: 0.5;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

.hero-content p {
  font-family: var(--font-body);
  font-size: 1.5rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
  animation: textSlideUp 1.5s ease-out 0.8s both;
  position: relative;
}

.hero-content p::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  animation: lineExpand 1s ease-out 2s both;
}

/* Advanced Search Section */
.search-section {
  padding: 3rem 0;
  background: var(--secondary-dark);
  border-bottom: var(--border-glass);
  position: relative;
  overflow: hidden;
}

.search-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-violet),
    transparent
  );
  animation: searchGlow 4s ease-in-out infinite;
}

.search-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  animation: searchReveal 1s ease-out 1.2s both;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--glass-secondary);
  border: var(--border-glass-strong);
  border-radius: var(--radius-2xl);
  padding: 1rem 2rem;
  backdrop-filter: var(--blur-xl);
  -webkit-backdrop-filter: var(--blur-xl);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
  gap: 1rem;
}

.search-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
}

.search-wrapper::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-2xl);
  z-index: -1;
  opacity: 0;
  transition: var(--transition-normal);
}

.search-wrapper:focus-within::after {
  opacity: 0.3;
  animation: borderPulse 2s ease-in-out infinite;
}

.search-wrapper:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-xl);
}

#searchInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 1rem 0;
  color: var(--text-primary);
  font-size: 1.2rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: var(--transition-normal);
  position: relative;
}

#searchInput::placeholder {
  color: var(--text-muted);
  font-style: italic;
  transition: var(--transition-normal);
}

#searchInput:focus::placeholder {
  color: var(--text-ghost);
  transform: translateY(-2px);
}

#searchBtn {
  background: var(--gradient-accent);
  border: none;
  padding: 1.25rem 2rem;
  border-radius: var(--radius-xl);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
}

#searchBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

#searchBtn:hover::before {
  left: 100%;
}

#searchBtn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-glow-strong);
}

#searchBtn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Ultra Advanced Category System */
.categories-section {
  padding: 4rem 0;
  background: var(--tertiary-dark);
  border-bottom: var(--border-glass);
  position: relative;
  overflow: hidden;
}

.categories-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 70%,
      rgba(59, 130, 246, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(139, 92, 246, 0.05) 0%,
      transparent 50%
    );
  animation: categoryFlow 15s ease-in-out infinite alternate;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -20px;
  right: -20px;
  bottom: -10px;
  background: var(--gradient-accent);
  opacity: 0.1;
  filter: blur(30px);
  border-radius: var(--radius-2xl);
  animation: titleGlow 4s ease-in-out infinite;
}

.section-subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.category-tile {
  background: var(--glass-primary);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.category-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: var(--transition-elastic);
  transform-origin: left;
}

.category-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(59, 130, 246, 0.05) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: var(--transition-normal);
}

.category-tile:hover::before {
  transform: scaleX(1);
}

.category-tile:hover::after {
  opacity: 1;
  animation: ripple 0.6s ease-out;
}

.category-tile:hover {
  background: var(--glass-secondary);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-glow-xl), var(--shadow-2xl);
}

.category-tile.active {
  background: var(--glass-highlight);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(-4px);
}

.category-tile.active::before {
  transform: scaleX(1);
}

.category-icon {
  font-size: 1.25rem;
  color: var(--accent-blue);
  transition: var(--transition-elastic);
  position: relative;
  z-index: 2;
}

.category-tile:hover .category-icon {
  transform: scale(1.2) rotate(5deg);
  color: var(--accent-cyan);
  text-shadow: 0 0 20px currentColor;
}

.category-name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  transition: var(--transition-normal);
  position: relative;
  z-index: 2;
}

.category-tile:hover .category-name {
  color: var(--text-highlight);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Ultra Advanced News Grid System */
.news-section {
  padding: 4rem 0;
  background: var(--primary-dark);
  position: relative;
  overflow: hidden;
}

.news-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(59, 130, 246, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(139, 92, 246, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 50%,
      rgba(16, 185, 129, 0.02) 0%,
      transparent 50%
    );
  animation: newsFlow 20s ease-in-out infinite;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
  z-index: 10;
}

.news-card {
  background: var(--glass-primary);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  height: fit-content;
}

.news-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-2xl);
  z-index: -1;
  opacity: 0;
  transition: var(--transition-normal);
}

.news-card:hover::after {
  opacity: 0.2;
}

.news-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow-xl), var(--shadow-2xl);
}

.news-image-container {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
  filter: brightness(0.9) contrast(1.1);
}

.news-card:hover img {
  transform: scale(1.05);
  filter: brightness(1) contrast(1.2);
}

.news-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 3rem 2rem 2rem;
}

.news-card-content {
  padding: 2rem;
  position: relative;
}

.news-card-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

.news-card h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text-primary);
  transition: var(--transition-normal);
  position: relative;
}

.news-card:hover h3 {
  color: var(--text-highlight);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.news-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  transition: var(--transition-normal);
}

.news-card:hover p {
  color: var(--text-primary);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: var(--border-glass-subtle);
  margin-top: 1rem;
}

.news-source {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: var(--transition-normal);
}

.news-card:hover .news-source {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--accent-blue-light);
}

.news-time {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: var(--transition-normal);
}

.news-card:hover .news-time {
  color: var(--text-secondary);
}

/* Advanced Contact Section */
.contact-section {
  padding: 4rem 0;
  background: var(--secondary-dark);
  border-bottom: var(--border-glass);
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(59, 130, 246, 0.1) 0deg,
    transparent 120deg,
    rgba(139, 92, 246, 0.1) 240deg,
    transparent 360deg
  );
  animation: contactSpin 30s linear infinite;
  opacity: 0.5;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-text-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 10;
}

.contact-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.25rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  background: var(--glass-secondary);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
  min-height: 70px;
  justify-content: center;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: var(--transition-elastic);
  transform-origin: center;
}

.social-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  transition: var(--transition-elastic);
  border-radius: 50%;
}

.social-link:hover::before {
  transform: scaleX(1);
}

.social-link:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

.social-link:hover {
  background: var(--glass-tertiary);
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-8px) scale(1.05);
  box-shadow: var(--shadow-glow-xl);
}

.social-icon {
  font-size: 1.25rem;
  color: var(--accent-blue);
  transition: var(--transition-elastic);
  position: relative;
  z-index: 2;
}

.social-link:hover .social-icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--accent-cyan);
  text-shadow: 0 0 20px currentColor;
}

.social-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition-normal);
  position: relative;
  z-index: 2;
}

.social-link:hover .social-label {
  color: var(--text-highlight);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Ultra Advanced Footer System */
footer {
  background: var(--primary-black);
  border-top: var(--border-glass);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
      45deg,
      rgba(59, 130, 246, 0.02) 0%,
      transparent 25%
    ),
    linear-gradient(-45deg, rgba(139, 92, 246, 0.02) 0%, transparent 25%);
  animation: footerFlow 25s ease-in-out infinite alternate;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
}

.footer-section {
  position: relative;
}

.footer-section h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
}

.footer-section h4::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-normal);
  padding: 0.5rem 0;
  border-left: 2px solid transparent;
  padding-left: 1rem;
  margin-left: -1rem;
  position: relative;
  font-family: var(--font-body);
}

.footer-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: var(--transition-elastic);
}

.footer-links a:hover::before {
  width: 20px;
}

.footer-links a:hover {
  color: var(--accent-blue);
  border-left-color: var(--accent-blue);
  transform: translateX(10px);
}

/* Advanced Newsletter Section */
.newsletter {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.newsletter input {
  flex: 1;
  min-width: 200px;
  background: var(--glass-quaternary);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-normal);
  font-family: var(--font-body);
  position: relative;
}

.newsletter input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.newsletter input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), var(--shadow-glow);
  transform: scale(1.02);
}

.newsletter button {
  background: var(--gradient-accent);
  border: none;
  border-radius: var(--radius-lg);
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-spring);
  font-family: var(--font-body);
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.newsletter button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.newsletter button:hover::before {
  left: 100%;
}

.newsletter button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

.newsletter button:active {
  transform: translateY(0) scale(0.95);
}

.footer-bottom {
  border-top: var(--border-glass);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 10;
}

.footer-legal {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition-normal);
  position: relative;
  font-family: var(--font-mono);
}

.footer-legal a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-blue);
  transition: var(--transition-elastic);
}

.footer-legal a:hover::after {
  width: 100%;
}

.footer-legal a:hover {
  color: var(--accent-blue);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  position: relative;
}

/* Loading States & Animations */
.loading-skeleton {
  background: linear-gradient(
    90deg,
    var(--glass-quaternary) 25%,
    var(--glass-primary) 50%,
    var(--glass-quaternary) 75%
  );
  background-size: 200px 100%;
  animation: shimmer 2s infinite linear;
  border-radius: var(--radius-lg);
}

.loading-pulse {
  animation: pulse 2s infinite ease-in-out;
}

.loading-bounce {
  animation: bounce 2s infinite;
}

.loading-spin {
  animation: spin 2s infinite linear;
}

/* Complex Keyframe Animations */
@keyframes meshMove {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -20px) rotate(90deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(180deg);
  }
  75% {
    transform: translate(-20px, -20px) rotate(270deg);
  }
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

@keyframes heroRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1.1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.3);
  }
}

@keyframes titleReveal {
  0% {
    opacity: 0;
    transform: translateY(50px) rotateX(90deg);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
    filter: blur(0px);
  }
}

@keyframes textSlideUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0px);
  }
}

@keyframes lineExpand {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 60px;
    opacity: 1;
  }
}

@keyframes searchGlow {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes searchReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

@keyframes borderPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes categoryFlow {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes titleGlow {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes newsFlow {
  0%,
  100% {
    transform: translateX(0px) translateY(0px);
  }
  25% {
    transform: translateX(20px) translateY(-10px);
  }
  50% {
    transform: translateX(0px) translateY(20px);
  }
  75% {
    transform: translateX(-20px) translateY(-10px);
  }
}

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

@keyframes contactSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes footerFlow {
  0%,
  100% {
    transform: translateX(0px) scaleY(1);
  }
  50% {
    transform: translateX(20px) scaleY(1.1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes bounce {
  0%,
  20%,
  53%,
  80%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  40%,
  43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Advanced Scroll Animations */

/* Base class used by IntersectionObserver in script.js */
.animate-in {
  /* Disable animate-on-view: keep elements static and visible */
  animation: none !important;
  opacity: 1;
  transform: none;
}

/* ================================================================
   FUTURISTIC MINIMAL UPGRADE LAYER
   Non‑destructive overrides that polish the existing design
   while keeping it smooth, restrained, and performant.
================================================================ */

/* Palette refinements and accents */
:root {
  --neo-accent-1: #00e7ff;
  --neo-accent-2: #3b82f6;
  --neo-accent-3: #10b981;
  --neo-surface: rgba(255,255,255,0.06);
  --neo-surface-2: rgba(255,255,255,0.09);
  --neo-glow: 0 0 0 1px rgba(255,255,255,0.06), 0 8px 40px rgba(0, 231, 255, 0.06);
}

/* Subtle aurora in hero for extra depth (minimal, non-intrusive) */
.hero-section::after {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(0, 231, 255, 0.08), transparent 70%),
              radial-gradient(900px 420px at 80% 10%, rgba(59, 130, 246, 0.08), transparent 65%),
              radial-gradient(1000px 520px at 50% 0%, rgba(16, 185, 129, 0.06), transparent 60%);
}

/* Fluid typography tightening for large headings */
.hero-content h1,
.section-title {
  letter-spacing: -0.01em;
  text-shadow: 0 0 1px rgba(0,0,0,0.15);
}

/* Search: cleaner focus ring and subtle lift */
.search-wrapper {
  background: linear-gradient(180deg, var(--neo-surface), rgba(255,255,255,0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--neo-glow);
}

.search-wrapper:focus-within {
  border-color: rgba(0, 231, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 231, 255, 0.25), 0 18px 60px rgba(0, 231, 255, 0.08);
}

/* Category tiles: gradient ring + restrained hover */
.category-tile {
  background: linear-gradient(180deg, var(--neo-surface), rgba(255,255,255,0.03)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.category-tile:hover,
.category-tile.active {
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 18px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(0, 231, 255, 0.25);
  border-image: linear-gradient(135deg, var(--neo-accent-1), var(--neo-accent-2)) 1;
}

/* News cards: minimal gradient edge + softened hover */
.news-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 300ms cubic-bezier(.2,.7,.2,1), box-shadow 300ms ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 22px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(0, 231, 255, 0.16);
}

/* Buttons: sleeker neon edge, no heavy glow */
.apple-liquid-btn,
.pagination-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)) padding-box,
              linear-gradient(135deg, var(--neo-accent-2), var(--neo-accent-1)) border-box;
  border: 1px solid transparent;
  color: #eafaff;
  text-shadow: 0 0 1px rgba(0,0,0,0.25);
}

.apple-liquid-btn:hover,
.pagination-btn:hover:not(:disabled) {
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 16px 48px rgba(0,231,255,0.12);
}

/* Header time pill: cleaner glass */
.nav-time {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
}

/* Enable container queries for the news grid to keep things tight */
.news-grid { container-type: inline-size; }
@container (max-width: 880px) {
  .news-grid { gap: 1.25rem; }
  .news-card { border-radius: 18px; }
}
@container (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
}

/* Motion safety: keep it smooth for sensitive users */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .animate-in { opacity: 1; transform: none; }
}

/* ================================================================
   FUTURISTIC MINIMAL UPGRADE – FINAL OVERRIDES (end of file)
   Ensures upgraded aesthetics win the cascade.
================================================================ */
:root {
  --neo-accent-1: #00e7ff;
  --neo-accent-2: #3b82f6;
  --neo-accent-3: #10b981;
}

.hero-section::after {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(0, 231, 255, 0.08), transparent 70%),
              radial-gradient(900px 420px at 80% 10%, rgba(59, 130, 246, 0.08), transparent 65%),
              radial-gradient(1000px 520px at 50% 0%, rgba(16, 185, 129, 0.06), transparent 60%);
}

.search-wrapper {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06)) border-box;
  border: 1px solid transparent;
}

.search-wrapper:focus-within {
  border-image: linear-gradient(135deg, var(--neo-accent-1), var(--neo-accent-2)) 1;
  box-shadow: 0 0 0 1px rgba(0, 231, 255, 0.25), 0 18px 60px rgba(0, 231, 255, 0.08);
}

.category-tile {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06)) border-box;
  border: 1px solid transparent;
}

.category-tile:hover,
.category-tile.active {
  border-image: linear-gradient(135deg, var(--neo-accent-1), var(--neo-accent-2)) 1;
}

.news-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06)) border-box;
  border: 1px solid transparent;
}

.news-card:hover {
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 22px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(0, 231, 255, 0.16);
}

.apple-liquid-btn,
.pagination-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)) padding-box,
              linear-gradient(135deg, var(--neo-accent-2), var(--neo-accent-1)) border-box;
  border: 1px solid transparent;
}

.apple-liquid-btn:hover,
.pagination-btn:hover:not(:disabled) {
  box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 16px 48px rgba(0,231,255,0.12);
}

.animate-fade {
  animation: fadeIn 1s ease-out forwards;
}

.animate-slide-left {
  animation: slideInLeft 1s ease-out forwards;
}

.animate-slide-right {
  animation: slideInRight 1s ease-out forwards;
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Staggered Animation Delays */
.category-tile:nth-child(1) {
  animation-delay: 0.1s;
}
.category-tile:nth-child(2) {
  animation-delay: 0.2s;
}
.category-tile:nth-child(3) {
  animation-delay: 0.3s;
}
.category-tile:nth-child(4) {
  animation-delay: 0.4s;
}
.category-tile:nth-child(5) {
  animation-delay: 0.5s;
}
.category-tile:nth-child(6) {
  animation-delay: 0.6s;
}
.category-tile:nth-child(7) {
  animation-delay: 0.7s;
}
.category-tile:nth-child(8) {
  animation-delay: 0.8s;
}

/* Animation delays removed */

.social-link:nth-child(1) {
  animation-delay: 0.1s;
}
.social-link:nth-child(2) {
  animation-delay: 0.2s;
}
.social-link:nth-child(3) {
  animation-delay: 0.3s;
}
.social-link:nth-child(4) {
  animation-delay: 0.4s;
}
.social-link:nth-child(5) {
  animation-delay: 0.5s;
}
.social-link:nth-child(6) {
  animation-delay: 0.6s;
}

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

::-webkit-scrollbar-track {
  background: var(--primary-black);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--glass-primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-black);
  transition: var(--transition-normal);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--glass-secondary);
  box-shadow: var(--shadow-glow);
}

/* Selection Styles */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-highlight);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

::-moz-selection {
  background: rgba(59, 130, 246, 0.3);
  color: var(--text-highlight);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Advanced Responsive Design */
@media (max-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 960px;
  }
  .hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 0;
  }

  .hero-section {
    padding: 4rem 0 3rem;
  }
  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
  .hero-content p {
    font-size: 1.125rem;
  }

  .search-wrapper {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  #searchInput,
  #searchBtn {
    width: 100%;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .category-tile {
    min-height: 70px;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .social-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .social-link {
    padding: 0.75rem 0.5rem;
    min-height: 60px;
    font-size: 0.85rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .newsletter {
    flex-direction: column;
    gap: 1rem;
  }

  .newsletter input,
  .newsletter button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }
  .section-subtitle {
    font-size: 1rem;
  }

  .categories-grid {
    gap: 0.75rem;
  }
  .category-tile {
    min-height: 70px;
    padding: 1rem;
  }

  .category-icon {
    font-size: 1.5rem;
  }
  .category-name {
    font-size: 0.8rem;
  }

  .news-card-content {
    padding: 1.5rem;
  }
  .news-card h3 {
    font-size: 1.125rem;
  }

  .social-grid {
    gap: 0.75rem;
  }
  .social-link {
    padding: 1rem;
    min-height: 80px;
  }

  .social-icon {
    font-size: 1.5rem;
  }
  .social-label {
    font-size: 0.8rem;
  }
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body::before,
  body::after,
  .glass-container::before,
  .category-tile::before,
  .category-tile::after,
  .news-card::before,
  .news-card::after,
  .social-link::before,
  .social-link::after {
    display: none !important;
  }

  .hero-section,
  .search-section,
  .contact-section {
    background: white !important;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-glass: 2px solid #ffffff;
    --glass-primary: rgba(255, 255, 255, 0.2);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body::before,
  body::after {
    display: none !important;
  }
}

/* Enhanced Focus for Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading states for better UX */
.loading-state {
  position: relative;
  overflow: hidden;
}

.loading-state::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: loading-sweep 2s infinite;
}

@keyframes loading-sweep {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Error states */
.error-state {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.1),
    rgba(239, 68, 68, 0.05)
  );
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

/* Success states */
.success-state {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1),
    rgba(16, 185, 129, 0.05)
  );
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

/* Warning states */
.warning-state {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.1),
    rgba(245, 158, 11, 0.05)
  );
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

/* Performance optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* Advanced utility classes */
.text-gradient {
  background: var(--gradient-text-accent);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-morphism {
  background: var(--glass-primary);
  backdrop-filter: var(--blur-lg);
  -webkit-backdrop-filter: var(--blur-lg);
  border: var(--border-glass);
  border-radius: var(--radius-xl);
}

.hover-lift {
  transition: var(--transition-spring);
}

.hover-lift:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.hover-glow {
  transition: var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: var(--shadow-glow-xl);
  border-color: rgba(59, 130, 246, 0.5);
}

/* Additional Complex Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(0px) translateX(20px);
  }
  75% {
    transform: translateY(20px) translateX(10px);
  }
}

/* ========================================
   APPLE LIQUID GLASSMORPHISM SYSTEM
   ======================================== */

/* Ultra Advanced Apple-Style Variables */
:root {
  /* Apple Liquid Glass Colors */
  --apple-glass-ultra: rgba(255, 255, 255, 0.02);
  --apple-glass-light: rgba(255, 255, 255, 0.04);
  --apple-glass-medium: rgba(255, 255, 255, 0.06);
  --apple-glass-strong: rgba(255, 255, 255, 0.08);
  --apple-glass-vibrant: rgba(255, 255, 255, 0.12);
  --apple-glass-translucent: rgba(255, 255, 255, 0.18);

  /* Apple Dynamic Blur System */
  --apple-blur-thin: blur(2px);
  --apple-blur-light: blur(6px);
  --apple-blur-regular: blur(12px);
  --apple-blur-thick: blur(24px);
  --apple-blur-heavy: blur(40px);
  --apple-blur-ultra: blur(60px);

  /* Apple Material Colors */
  --apple-material-dark: rgba(28, 28, 30, 0.85);
  --apple-material-medium: rgba(44, 44, 46, 0.85);
  --apple-material-light: rgba(58, 58, 60, 0.85);
  --apple-material-vibrant: rgba(72, 72, 74, 0.85);

  /* Apple Vibrancy System */
  --apple-vibrancy-primary: rgba(255, 255, 255, 0.85);
  --apple-vibrancy-secondary: rgba(255, 255, 255, 0.7);
  --apple-vibrancy-tertiary: rgba(255, 255, 255, 0.55);
  --apple-vibrancy-quaternary: rgba(255, 255, 255, 0.4);

  /* Apple Shadow System */
  --apple-shadow-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --apple-shadow-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  --apple-shadow-3: 0 10px 20px rgba(0, 0, 0, 0.19),
    0 6px 6px rgba(0, 0, 0, 0.23);
  --apple-shadow-4: 0 14px 28px rgba(0, 0, 0, 0.25),
    0 10px 10px rgba(0, 0, 0, 0.22);
  --apple-shadow-5: 0 19px 38px rgba(0, 0, 0, 0.3),
    0 15px 12px rgba(0, 0, 0, 0.22);

  /* Apple Color Temperature System */
  --apple-warm-filter: sepia(0.1) saturate(1.1) hue-rotate(-5deg)
    brightness(1.05);
  --apple-neutral-filter: sepia(0.05) saturate(1.05) brightness(1.02);
  --apple-cool-filter: sepia(0.05) saturate(1.1) hue-rotate(5deg)
    brightness(0.98);

  /* Apple Transition System */
  --apple-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --apple-ease-in: cubic-bezier(0.42, 0, 1, 1);
  --apple-ease-out: cubic-bezier(0, 0, 0.58, 1);
  --apple-ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
  --apple-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --apple-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Apple Liquid Glassmorphism Base Classes */
.apple-glass-ultra {
  background: var(--apple-glass-ultra);
  backdrop-filter: var(--apple-blur-thin);
  -webkit-backdrop-filter: var(--apple-blur-thin);
  border: 1px solid rgba(255, 255, 255, 0.01);
  box-shadow: var(--apple-shadow-1);
}

.apple-glass-light {
  background: var(--apple-glass-light);
  backdrop-filter: var(--apple-blur-light);
  -webkit-backdrop-filter: var(--apple-blur-light);
  border: 1px solid rgba(255, 255, 255, 0.02);
  box-shadow: var(--apple-shadow-2);
}

.apple-glass-medium {
  background: var(--apple-glass-medium);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--apple-shadow-3);
}

.apple-glass-strong {
  background: var(--apple-glass-strong);
  backdrop-filter: var(--apple-blur-thick);
  -webkit-backdrop-filter: var(--apple-blur-thick);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--apple-shadow-4);
}

.apple-glass-vibrant {
  background: var(--apple-glass-vibrant);
  backdrop-filter: var(--apple-blur-heavy);
  -webkit-backdrop-filter: var(--apple-blur-heavy);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--apple-shadow-5);
}

.apple-glass-translucent {
  background: var(--apple-glass-translucent);
  backdrop-filter: var(--apple-blur-ultra);
  -webkit-backdrop-filter: var(--apple-blur-ultra);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--apple-shadow-5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Apple Material System */
.apple-material-dark {
  background: var(--apple-material-dark);
  backdrop-filter: var(--apple-blur-heavy);
  -webkit-backdrop-filter: var(--apple-blur-heavy);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--apple-shadow-4);
}

.apple-material-medium {
  background: var(--apple-material-medium);
  backdrop-filter: var(--apple-blur-thick);
  -webkit-backdrop-filter: var(--apple-blur-thick);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--apple-shadow-3);
}

.apple-material-light {
  background: var(--apple-material-light);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--apple-shadow-2);
}

.apple-material-vibrant {
  background: var(--apple-material-vibrant);
  backdrop-filter: var(--apple-blur-light);
  -webkit-backdrop-filter: var(--apple-blur-light);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--apple-shadow-1);
}

/* ========================================
   SOPHISTICATED PARTICLE SYSTEMS
   ======================================== */

/* Advanced Particle Container */
.apple-particles-system {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  mix-blend-mode: screen;
}

/* Liquid Particle Classes */
.liquid-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
  opacity: 0.4;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.liquid-particle-xs {
  width: 2px;
  height: 2px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.8) 0%,
    transparent 70%
  );
  animation: liquid-float-xs 15s infinite linear;
}

.liquid-particle-sm {
  width: 4px;
  height: 4px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.7) 0%,
    transparent 70%
  );
  animation: liquid-float-sm 18s infinite linear;
}

.liquid-particle-md {
  width: 6px;
  height: 6px;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.6) 0%,
    transparent 70%
  );
  animation: liquid-float-md 22s infinite linear;
}

.liquid-particle-lg {
  width: 8px;
  height: 8px;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.5) 0%,
    transparent 70%
  );
  animation: liquid-float-lg 26s infinite linear;
}

.liquid-particle-xl {
  width: 12px;
  height: 12px;
  background: radial-gradient(
    circle,
    rgba(236, 72, 153, 0.4) 0%,
    transparent 70%
  );
  animation: liquid-float-xl 30s infinite linear;
}

/* Liquid Particle Animations */
@keyframes liquid-float-xs {
  0% {
    transform: translateY(100vh) translateX(-5px) rotate(0deg) scale(0);
    opacity: 0;
  }
  5% {
    opacity: 0.4;
    transform: translateY(95vh) translateX(0px) rotate(18deg) scale(1);
  }
  95% {
    opacity: 0.4;
    transform: translateY(5vh) translateX(5px) rotate(342deg) scale(1);
  }
  100% {
    transform: translateY(-5vh) translateX(10px) rotate(360deg) scale(0);
    opacity: 0;
  }
}

@keyframes liquid-float-sm {
  0% {
    transform: translateY(100vh) translateX(10px) rotate(0deg) scale(0);
    opacity: 0;
    filter: blur(2px);
  }
  8% {
    opacity: 0.5;
    transform: translateY(92vh) translateX(-5px) rotate(29deg) scale(1);
    filter: blur(1px);
  }
  92% {
    opacity: 0.5;
    transform: translateY(8vh) translateX(-15px) rotate(331deg) scale(1);
    filter: blur(1px);
  }
  100% {
    transform: translateY(-8vh) translateX(-20px) rotate(360deg) scale(0);
    opacity: 0;
    filter: blur(2px);
  }
}

@keyframes liquid-float-md {
  0% {
    transform: translateY(100vh) translateX(-15px) rotate(0deg) scale(0);
    opacity: 0;
    filter: blur(3px) brightness(0.8);
  }
  10% {
    opacity: 0.6;
    transform: translateY(90vh) translateX(10px) rotate(36deg) scale(1);
    filter: blur(1px) brightness(1);
  }
  50% {
    transform: translateY(50vh) translateX(-10px) rotate(180deg) scale(1.2);
    filter: blur(0px) brightness(1.2);
  }
  90% {
    opacity: 0.6;
    transform: translateY(10vh) translateX(25px) rotate(324deg) scale(1);
    filter: blur(1px) brightness(1);
  }
  100% {
    transform: translateY(-10vh) translateX(30px) rotate(360deg) scale(0);
    opacity: 0;
    filter: blur(3px) brightness(0.8);
  }
}

@keyframes liquid-float-lg {
  0% {
    transform: translateY(100vh) translateX(20px) rotate(0deg) scale(0);
    opacity: 0;
    filter: blur(4px) brightness(0.7) saturate(0.8);
  }
  12% {
    opacity: 0.7;
    transform: translateY(88vh) translateX(-15px) rotate(43deg) scale(1);
    filter: blur(2px) brightness(1) saturate(1);
  }
  25% {
    transform: translateY(75vh) translateX(15px) rotate(90deg) scale(1.1);
    filter: blur(1px) brightness(1.1) saturate(1.1);
  }
  50% {
    transform: translateY(50vh) translateX(-25px) rotate(180deg) scale(1.3);
    filter: blur(0px) brightness(1.3) saturate(1.3);
  }
  75% {
    transform: translateY(25vh) translateX(20px) rotate(270deg) scale(1.1);
    filter: blur(1px) brightness(1.1) saturate(1.1);
  }
  88% {
    opacity: 0.7;
    transform: translateY(12vh) translateX(-30px) rotate(317deg) scale(1);
    filter: blur(2px) brightness(1) saturate(1);
  }
  100% {
    transform: translateY(-12vh) translateX(-35px) rotate(360deg) scale(0);
    opacity: 0;
    filter: blur(4px) brightness(0.7) saturate(0.8);
  }
}

@keyframes liquid-float-xl {
  0% {
    transform: translateY(100vh) translateX(-25px) rotate(0deg) scale(0);
    opacity: 0;
    filter: blur(6px) brightness(0.6) saturate(0.7);
  }
  15% {
    opacity: 0.8;
    transform: translateY(85vh) translateX(20px) rotate(54deg) scale(1);
    filter: blur(3px) brightness(0.9) saturate(0.9);
  }
  30% {
    transform: translateY(70vh) translateX(-20px) rotate(108deg) scale(1.1);
    filter: blur(2px) brightness(1) saturate(1);
  }
  45% {
    transform: translateY(55vh) translateX(30px) rotate(162deg) scale(1.2);
    filter: blur(1px) brightness(1.1) saturate(1.1);
  }
  60% {
    transform: translateY(40vh) translateX(-35px) rotate(216deg) scale(1.4);
    filter: blur(0px) brightness(1.4) saturate(1.4);
  }
  75% {
    transform: translateY(25vh) translateX(25px) rotate(270deg) scale(1.2);
    filter: blur(1px) brightness(1.1) saturate(1.1);
  }
  85% {
    opacity: 0.8;
    transform: translateY(15vh) translateX(-40px) rotate(306deg) scale(1);
    filter: blur(3px) brightness(0.9) saturate(0.9);
  }
  100% {
    transform: translateY(-15vh) translateX(-45px) rotate(360deg) scale(0);
    opacity: 0;
    filter: blur(6px) brightness(0.6) saturate(0.7);
  }
}

/* ========================================
   FLOATING GLASS ELEMENTS SYSTEM
   ======================================== */

/* Floating Glass Container */
.apple-floating-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* Base Floating Glass Element */
.apple-floating-element {
  position: absolute;
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* Apple Floating Shapes */
.apple-float-circle {
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 100%
  );
  animation: apple-float-circular 45s infinite ease-in-out;
}

.apple-float-rounded-rect {
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 100%
  );
  animation: apple-float-rectangular 40s infinite ease-in-out;
}

.apple-float-pill {
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  animation: apple-float-pill 35s infinite ease-in-out;
}

.apple-float-hexagon {
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
  background: conic-gradient(
    from 45deg,
    rgba(255, 255, 255, 0.06) 0deg,
    transparent 120deg,
    rgba(255, 255, 255, 0.04) 240deg,
    transparent 360deg
  );
  animation: apple-float-hexagon 50s infinite ease-in-out;
}

.apple-float-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  animation: apple-float-triangle 32s infinite ease-in-out;
}

/* Apple Floating Element Sizes */
.apple-float-xs {
  width: 30px;
  height: 30px;
}
.apple-float-sm {
  width: 50px;
  height: 50px;
}
.apple-float-md {
  width: 80px;
  height: 80px;
}
.apple-float-lg {
  width: 120px;
  height: 120px;
}
.apple-float-xl {
  width: 180px;
  height: 180px;
}
.apple-float-2xl {
  width: 240px;
  height: 240px;
}

/* Apple Floating Animations */
@keyframes apple-float-circular {
  0%,
  100% {
    transform: translateX(0vw) translateY(0vh) scale(1) rotate(0deg);
    opacity: 0.2;
    filter: blur(0px);
  }
  16.66% {
    transform: translateX(15vw) translateY(20vh) scale(1.1) rotate(60deg);
    opacity: 0.4;
    filter: blur(1px);
  }
  33.33% {
    transform: translateX(-5vw) translateY(40vh) scale(0.9) rotate(120deg);
    opacity: 0.3;
    filter: blur(2px);
  }
  50% {
    transform: translateX(25vw) translateY(60vh) scale(1.2) rotate(180deg);
    opacity: 0.5;
    filter: blur(0px);
  }
  66.66% {
    transform: translateX(10vw) translateY(30vh) scale(1.05) rotate(240deg);
    opacity: 0.4;
    filter: blur(1px);
  }
  83.33% {
    transform: translateX(30vw) translateY(10vh) scale(0.95) rotate(300deg);
    opacity: 0.3;
    filter: blur(2px);
  }
}

@keyframes apple-float-rectangular {
  0%,
  100% {
    transform: translateX(0vw) translateY(0vh) rotate(0deg) skew(0deg);
    opacity: 0.25;
  }
  20% {
    transform: translateX(20vw) translateY(15vh) rotate(72deg) skew(2deg);
    opacity: 0.45;
  }
  40% {
    transform: translateX(8vw) translateY(45vh) rotate(144deg) skew(-3deg);
    opacity: 0.35;
  }
  60% {
    transform: translateX(28vw) translateY(65vh) rotate(216deg) skew(4deg);
    opacity: 0.55;
  }
  80% {
    transform: translateX(12vw) translateY(25vh) rotate(288deg) skew(-2deg);
    opacity: 0.3;
  }
}

@keyframes apple-float-pill {
  0%,
  100% {
    transform: translateX(0vw) translateY(0vh) rotate(0deg) scaleX(1) scaleY(1);
    opacity: 0.3;
  }
  25% {
    transform: translateX(18vw) translateY(30vh) rotate(90deg) scaleX(1.2)
      scaleY(0.8);
    opacity: 0.5;
  }
  50% {
    transform: translateX(6vw) translateY(55vh) rotate(180deg) scaleX(0.9)
      scaleY(1.3);
    opacity: 0.4;
  }
  75% {
    transform: translateX(24vw) translateY(20vh) rotate(270deg) scaleX(1.1)
      scaleY(1.1);
    opacity: 0.45;
  }
}

@keyframes apple-float-hexagon {
  0%,
  100% {
    transform: translateX(0vw) translateY(0vh) rotate(0deg) scale(1);
    opacity: 0.2;
    filter: hue-rotate(0deg) brightness(1);
  }
  14.28% {
    transform: translateX(16vw) translateY(22vh) rotate(51.4deg) scale(1.08);
    opacity: 0.38;
    filter: hue-rotate(51.4deg) brightness(1.1);
  }
  28.57% {
    transform: translateX(7vw) translateY(48vh) rotate(102.8deg) scale(0.92);
    opacity: 0.28;
    filter: hue-rotate(102.8deg) brightness(0.9);
  }
  42.85% {
    transform: translateX(26vw) translateY(68vh) rotate(154.2deg) scale(1.15);
    opacity: 0.48;
    filter: hue-rotate(154.2deg) brightness(1.2);
  }
  57.14% {
    transform: translateX(11vw) translateY(38vh) rotate(205.7deg) scale(1.02);
    opacity: 0.35;
    filter: hue-rotate(205.7deg) brightness(1.05);
  }
  71.42% {
    transform: translateX(29vw) translateY(58vh) rotate(257.1deg) scale(0.88);
    opacity: 0.42;
    filter: hue-rotate(257.1deg) brightness(0.95);
  }
  85.71% {
    transform: translateX(19vw) translateY(18vh) rotate(308.5deg) scale(1.06);
    opacity: 0.32;
    filter: hue-rotate(308.5deg) brightness(1.03);
  }
}

@keyframes apple-float-triangle {
  0%,
  100% {
    transform: translateX(0vw) translateY(0vh) rotate(0deg) scaleX(1) scaleY(1);
    opacity: 0.35;
  }
  16.66% {
    transform: translateX(14vw) translateY(26vh) rotate(60deg) scaleX(1.15)
      scaleY(0.85);
    opacity: 0.52;
  }
  33.33% {
    transform: translateX(9vw) translateY(52vh) rotate(120deg) scaleX(0.85)
      scaleY(1.25);
    opacity: 0.4;
  }
  50% {
    transform: translateX(23vw) translateY(72vh) rotate(180deg) scaleX(1.25)
      scaleY(0.95);
    opacity: 0.58;
  }
  66.66% {
    transform: translateX(13vw) translateY(42vh) rotate(240deg) scaleX(0.95)
      scaleY(1.15);
    opacity: 0.45;
  }
  83.33% {
    transform: translateX(27vw) translateY(22vh) rotate(300deg) scaleX(1.05)
      scaleY(1.05);
    opacity: 0.38;
  }
}

/* ========================================
   COMPLEX ANIMATION SEQUENCES
   ======================================== */

/* Apple-Style Page Load Animation */
@keyframes apple-page-load {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    filter: blur(10px) brightness(0.8);
  }
  25% {
    opacity: 0.4;
    transform: scale(0.98) translateY(10px);
    filter: blur(5px) brightness(0.9);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.01) translateY(-2px);
    filter: blur(2px) brightness(1.05);
  }
  75% {
    opacity: 0.9;
    transform: scale(1.005) translateY(1px);
    filter: blur(1px) brightness(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0px);
    filter: blur(0px) brightness(1);
  }
}

/* Apple-Style Text Reveal */
@keyframes apple-text-reveal {
  0% {
    opacity: 0;
    transform: translateY(40px) rotateX(-15deg);
    filter: blur(8px);
    letter-spacing: 2px;
  }
  30% {
    opacity: 0.5;
    transform: translateY(20px) rotateX(-8deg);
    filter: blur(4px);
    letter-spacing: 1px;
  }
  60% {
    opacity: 0.8;
    transform: translateY(5px) rotateX(-2deg);
    filter: blur(1px);
    letter-spacing: 0.5px;
  }
  80% {
    opacity: 0.95;
    transform: translateY(-2px) rotateX(1deg);
    filter: blur(0px);
    letter-spacing: 0.2px;
  }
  100% {
    opacity: 1;
    transform: translateY(0px) rotateX(0deg);
    filter: blur(0px);
    letter-spacing: 0px;
  }
}

/* Apple-Style Card Entrance */
@keyframes apple-card-entrance {
  0% {
    opacity: 0;
    transform: perspective(1000px) rotateY(-30deg) rotateX(15deg)
      translateZ(-100px);
    filter: blur(15px);
    box-shadow: none;
  }
  25% {
    opacity: 0.3;
    transform: perspective(1000px) rotateY(-15deg) rotateX(8deg)
      translateZ(-50px);
    filter: blur(8px);
  }
  50% {
    opacity: 0.6;
    transform: perspective(1000px) rotateY(-5deg) rotateX(3deg)
      translateZ(-20px);
    filter: blur(4px);
  }
  75% {
    opacity: 0.85;
    transform: perspective(1000px) rotateY(2deg) rotateX(-1deg) translateZ(10px);
    filter: blur(1px);
    box-shadow: var(--apple-shadow-3);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateZ(0px);
    filter: blur(0px);
    box-shadow: var(--apple-shadow-4);
  }
}

/* Apple-Style Morphing Container */
@keyframes apple-container-morph {
  0%,
  100% {
    border-radius: 20px 20px 20px 20px;
    transform: rotateZ(0deg) scale(1);
    filter: brightness(1) saturate(1);
  }
  12.5% {
    border-radius: 35px 15px 25px 45px;
    transform: rotateZ(2deg) scale(1.02);
    filter: brightness(1.05) saturate(1.1);
  }
  25% {
    border-radius: 15px 45px 35px 25px;
    transform: rotateZ(-1deg) scale(0.98);
    filter: brightness(0.95) saturate(0.9);
  }
  37.5% {
    border-radius: 50px 20px 40px 30px;
    transform: rotateZ(3deg) scale(1.04);
    filter: brightness(1.08) saturate(1.15);
  }
  50% {
    border-radius: 25px 40px 15px 50px;
    transform: rotateZ(0deg) scale(1.01);
    filter: brightness(1.1) saturate(1.2);
  }
  62.5% {
    border-radius: 40px 30px 50px 20px;
    transform: rotateZ(-2deg) scale(0.99);
    filter: brightness(1.03) saturate(1.05);
  }
  75% {
    border-radius: 30px 25px 45px 35px;
    transform: rotateZ(1deg) scale(1.01);
    filter: brightness(1.02) saturate(1.02);
  }
  87.5% {
    border-radius: 45px 35px 25px 40px;
    transform: rotateZ(-1deg) scale(1.005);
    filter: brightness(1.01) saturate(1.01);
  }
}

/* Apple-Style Pulse Wave */
@keyframes apple-pulse-wave {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: blur(0px) brightness(1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
  }
  25% {
    transform: scale(1.05) rotate(5deg);
    opacity: 0.9;
    filter: blur(0.5px) brightness(1.1);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
  }
  50% {
    transform: scale(1.1) rotate(0deg);
    opacity: 0.8;
    filter: blur(1px) brightness(1.2);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
  }
  75% {
    transform: scale(1.08) rotate(-3deg);
    opacity: 0.85;
    filter: blur(0.8px) brightness(1.15);
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.35);
  }
}

/* Apple-Style Background Flow */
@keyframes apple-background-flow {
  0% {
    background-position: 0% 50%;
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(0deg) brightness(1) saturate(1);
  }
  12.5% {
    background-position: 15% 35%;
    transform: scale(1.02) rotate(3deg);
    filter: hue-rotate(15deg) brightness(1.05) saturate(1.1);
  }
  25% {
    background-position: 35% 20%;
    transform: scale(0.98) rotate(-2deg);
    filter: hue-rotate(30deg) brightness(0.95) saturate(0.9);
  }
  37.5% {
    background-position: 55% 40%;
    transform: scale(1.04) rotate(4deg);
    filter: hue-rotate(45deg) brightness(1.08) saturate(1.15);
  }
  50% {
    background-position: 75% 65%;
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(60deg) brightness(1.1) saturate(1.2);
  }
  62.5% {
    background-position: 90% 80%;
    transform: scale(1.01) rotate(-1deg);
    filter: hue-rotate(75deg) brightness(1.03) saturate(1.05);
  }
  75% {
    background-position: 70% 90%;
    transform: scale(0.99) rotate(2deg);
    filter: hue-rotate(90deg) brightness(0.97) saturate(0.95);
  }
  87.5% {
    background-position: 40% 75%;
    transform: scale(1.005) rotate(-0.5deg);
    filter: hue-rotate(105deg) brightness(1.01) saturate(1.01);
  }
  100% {
    background-position: 0% 50%;
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(120deg) brightness(1) saturate(1);
  }
}

/* Apple-Style Staggered Animation */
@keyframes apple-stagger {
  0% {
    opacity: 0;
    transform: translateX(-60px) rotateY(-20deg) scale(0.8);
    filter: blur(6px);
  }
  20% {
    opacity: 0.4;
    transform: translateX(-30px) rotateY(-10deg) scale(0.9);
    filter: blur(3px);
  }
  40% {
    opacity: 0.7;
    transform: translateX(-10px) rotateY(-3deg) scale(0.95);
    filter: blur(1px);
  }
  60% {
    opacity: 0.85;
    transform: translateX(5px) rotateY(2deg) scale(1.02);
    filter: blur(0px);
  }
  80% {
    opacity: 0.95;
    transform: translateX(2px) rotateY(1deg) scale(1.01);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateX(0px) rotateY(0deg) scale(1);
    filter: blur(0px);
  }
}

/* ========================================
   DYNAMIC LIGHTING EFFECTS
   ======================================== */

/* Apple Dynamic Lighting Variables */
:root {
  --apple-light-ambient: rgba(255, 255, 255, 0.05);
  --apple-light-direct: rgba(255, 255, 255, 0.15);
  --apple-light-accent-blue: rgba(59, 130, 246, 0.12);
  --apple-light-accent-purple: rgba(139, 92, 246, 0.1);
  --apple-light-accent-cyan: rgba(6, 182, 212, 0.08);
  --apple-light-accent-emerald: rgba(16, 185, 129, 0.06);
}

/* Dynamic Lighting Container */
.apple-lighting-system {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mix-blend-mode: soft-light;
}

/* Apple Light Sources */
.apple-light-source {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  will-change: transform, opacity;
  transform: translateZ(0);
}

.apple-light-ambient {
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    var(--apple-light-ambient) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    transparent 70%
  );
  top: 20%;
  left: 15%;
  animation: apple-ambient-drift 25s infinite ease-in-out;
}

.apple-light-direct {
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    var(--apple-light-direct) 0%,
    rgba(255, 255, 255, 0.08) 30%,
    transparent 60%
  );
  top: 60%;
  right: 20%;
  animation: apple-direct-sweep 30s infinite ease-in-out;
}

.apple-light-accent-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    var(--apple-light-accent-blue) 0%,
    rgba(59, 130, 246, 0.06) 35%,
    transparent 65%
  );
  bottom: 25%;
  left: 50%;
  animation: apple-accent-1-flow 35s infinite ease-in-out;
}

.apple-light-accent-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(
    circle,
    var(--apple-light-accent-purple) 0%,
    rgba(139, 92, 246, 0.05) 40%,
    transparent 70%
  );
  top: 40%;
  left: 5%;
  animation: apple-accent-2-pulse 40s infinite ease-in-out;
}

.apple-light-accent-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle,
    var(--apple-light-accent-cyan) 0%,
    rgba(6, 182, 212, 0.04) 45%,
    transparent 75%
  );
  top: 10%;
  right: 30%;
  animation: apple-accent-3-orbit 45s infinite ease-in-out;
}

.apple-light-accent-4 {
  width: 380px;
  height: 380px;
  background: radial-gradient(
    circle,
    var(--apple-light-accent-emerald) 0%,
    rgba(16, 185, 129, 0.03) 50%,
    transparent 80%
  );
  bottom: 15%;
  right: 10%;
  animation: apple-accent-4-wave 50s infinite ease-in-out;
}

/* Apple Lighting Animations */
@keyframes apple-ambient-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
    filter: blur(60px) brightness(1);
  }
  25% {
    transform: translate(80px, -40px) scale(1.1);
    opacity: 0.4;
    filter: blur(50px) brightness(1.1);
  }
  50% {
    transform: translate(120px, 60px) scale(0.9);
    opacity: 0.25;
    filter: blur(70px) brightness(0.9);
  }
  75% {
    transform: translate(-60px, 100px) scale(1.05);
    opacity: 0.35;
    filter: blur(55px) brightness(1.05);
  }
}

@keyframes apple-direct-sweep {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.35;
    filter: blur(40px) brightness(1);
  }
  20% {
    transform: translate(-100px, 60px) scale(1.2) rotate(72deg);
    opacity: 0.5;
    filter: blur(30px) brightness(1.2);
  }
  40% {
    transform: translate(-60px, -80px) scale(0.8) rotate(144deg);
    opacity: 0.3;
    filter: blur(50px) brightness(0.8);
  }
  60% {
    transform: translate(80px, 40px) scale(1.15) rotate(216deg);
    opacity: 0.45;
    filter: blur(35px) brightness(1.15);
  }
  80% {
    transform: translate(40px, -100px) scale(1.05) rotate(288deg);
    opacity: 0.4;
    filter: blur(45px) brightness(1.05);
  }
}

@keyframes apple-accent-1-flow {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.25;
    filter: blur(45px) hue-rotate(0deg) brightness(1);
  }
  16.66% {
    transform: translate(-70px, -90px) scale(1.12);
    opacity: 0.4;
    filter: blur(35px) hue-rotate(30deg) brightness(1.1);
  }
  33.33% {
    transform: translate(90px, -60px) scale(0.88);
    opacity: 0.3;
    filter: blur(55px) hue-rotate(60deg) brightness(0.9);
  }
  50% {
    transform: translate(70px, 70px) scale(1.18);
    opacity: 0.45;
    filter: blur(30px) hue-rotate(90deg) brightness(1.2);
  }
  66.66% {
    transform: translate(-90px, 50px) scale(0.95);
    opacity: 0.32;
    filter: blur(50px) hue-rotate(120deg) brightness(0.95);
  }
  83.33% {
    transform: translate(-50px, -70px) scale(1.08);
    opacity: 0.38;
    filter: blur(40px) hue-rotate(150deg) brightness(1.05);
  }
}

@keyframes apple-accent-2-pulse {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.2;
    filter: blur(50px) brightness(1) saturate(1);
  }
  25% {
    transform: translate(120px, 150px) scale(1.25) rotate(90deg);
    opacity: 0.4;
    filter: blur(40px) brightness(1.25) saturate(1.3);
  }
  50% {
    transform: translate(200px, 40px) scale(0.75) rotate(180deg);
    opacity: 0.15;
    filter: blur(65px) brightness(0.8) saturate(0.8);
  }
  75% {
    transform: translate(80px, -80px) scale(1.1) rotate(270deg);
    opacity: 0.35;
    filter: blur(45px) brightness(1.15) saturate(1.15);
  }
}

@keyframes apple-accent-3-orbit {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.28;
    filter: blur(40px) brightness(1);
  }
  14.28% {
    transform: translate(60px, 80px) scale(1.06);
    opacity: 0.36;
    filter: blur(38px) brightness(1.05);
  }
  28.57% {
    transform: translate(120px, 60px) scale(0.94);
    opacity: 0.32;
    filter: blur(42px) brightness(0.95);
  }
  42.85% {
    transform: translate(100px, -40px) scale(1.14);
    opacity: 0.42;
    filter: blur(35px) brightness(1.1);
  }
  57.14% {
    transform: translate(20px, -100px) scale(1.02);
    opacity: 0.38;
    filter: blur(39px) brightness(1.02);
  }
  71.42% {
    transform: translate(-60px, -80px) scale(0.88);
    opacity: 0.34;
    filter: blur(44px) brightness(0.9);
  }
  85.71% {
    transform: translate(-100px, -20px) scale(1.08);
    opacity: 0.4;
    filter: blur(37px) brightness(1.08);
  }
}

@keyframes apple-accent-4-wave {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.22;
    filter: blur(55px) brightness(1) contrast(1);
  }
  20% {
    transform: translate(-80px, 120px) scale(1.2) rotate(72deg);
    opacity: 0.38;
    filter: blur(45px) brightness(1.15) contrast(1.1);
  }
  40% {
    transform: translate(-140px, 40px) scale(0.85) rotate(144deg);
    opacity: 0.26;
    filter: blur(60px) brightness(0.9) contrast(0.9);
  }
  60% {
    transform: translate(-60px, -80px) scale(1.15) rotate(216deg);
    opacity: 0.34;
    filter: blur(50px) brightness(1.1) contrast(1.05);
  }
  80% {
    transform: translate(40px, -120px) scale(1.05) rotate(288deg);
    opacity: 0.3;
    filter: blur(52px) brightness(1.05) contrast(1.02);
  }
}

/* ========================================
   MORPHING COMPONENTS & FLUID ANIMATIONS
   ======================================== */

/* Apple Liquid Button System */
.apple-liquid-button {
  position: relative;
  background: var(--apple-glass-medium);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 12px 24px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.4s var(--apple-ease);
  overflow: hidden;
  transform-style: preserve-3d;
}

.apple-liquid-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.6) 0%,
    rgba(139, 92, 246, 0.4) 50%,
    transparent 100%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.8s var(--apple-ease), height 0.8s var(--apple-ease);
  z-index: -1;
}

.apple-liquid-button::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(59, 130, 246, 0.3),
    rgba(139, 92, 246, 0.3),
    rgba(6, 182, 212, 0.3),
    rgba(16, 185, 129, 0.3)
  );
  border-radius: 50px;
  opacity: 0;
  transition: opacity 0.3s var(--apple-ease);
  z-index: -2;
  animation: apple-border-flow 4s linear infinite;
}

.apple-liquid-button:hover::before {
  width: 300%;
  height: 300%;
}

.apple-liquid-button:hover::after {
  opacity: 0.6;
}

.apple-liquid-button:hover {
  border-radius: 20px;
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--apple-shadow-4);
  background: var(--apple-glass-vibrant);
}

.apple-liquid-button:active {
  border-radius: 60px;
  transform: translateY(0px) scale(0.98);
  transition: all 0.1s var(--apple-ease);
}

@keyframes apple-border-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Apple Morphing Card System */
.apple-morph-card {
  position: relative;
  background: var(--apple-glass-light);
  backdrop-filter: var(--apple-blur-thick);
  -webkit-backdrop-filter: var(--apple-blur-thick);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.6s var(--apple-spring);
  transform-style: preserve-3d;
  cursor: pointer;
}

.apple-morph-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 50%,
    rgba(59, 130, 246, 0.06) 100%
  );
  opacity: 0;
  transition: opacity 0.4s var(--apple-ease);
  z-index: 1;
}

.apple-morph-card::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: conic-gradient(
    from 0deg,
    rgba(59, 130, 246, 0.3) 0deg,
    rgba(139, 92, 246, 0.3) 90deg,
    rgba(6, 182, 212, 0.3) 180deg,
    rgba(16, 185, 129, 0.3) 270deg,
    rgba(59, 130, 246, 0.3) 360deg
  );
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.3s var(--apple-ease);
  z-index: -1;
  animation: apple-conic-spin 8s linear infinite;
}

.apple-morph-card:hover::before {
  opacity: 1;
}

.apple-morph-card:hover::after {
  opacity: 0.4;
}

.apple-morph-card:hover {
  border-radius: 40px 12px 40px 12px;
  transform: translateY(-12px) rotateX(8deg) rotateY(-4deg) scale(1.02);
  background: var(--apple-glass-strong);
  box-shadow: var(--apple-shadow-5);
  animation: apple-card-breathe 4s ease-in-out infinite;
}

@keyframes apple-conic-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes apple-card-breathe {
  0%,
  100% {
    transform: translateY(-12px) rotateX(8deg) rotateY(-4deg) scale(1.02);
  }
  50% {
    transform: translateY(-16px) rotateX(10deg) rotateY(-6deg) scale(1.04);
  }
}

/* Apple Blob Morphing System */
.apple-blob {
  position: relative;
  background: var(--apple-glass-translucent);
  backdrop-filter: var(--apple-blur-ultra);
  -webkit-backdrop-filter: var(--apple-blur-ultra);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: apple-blob-morph 12s ease-in-out infinite;
  transform-origin: center;
  overflow: hidden;
}

@keyframes apple-blob-morph {
  0%,
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    transform: rotate(0deg) scale(1);
    filter: brightness(1) saturate(1);
  }
  12.5% {
    border-radius: 60% 40% 30% 70% / 20% 50% 50% 80%;
    transform: rotate(15deg) scale(1.05);
    filter: brightness(1.1) saturate(1.1);
  }
  25% {
    border-radius: 80% 20% 60% 40% / 70% 30% 80% 20%;
    transform: rotate(30deg) scale(0.95);
    filter: brightness(0.9) saturate(0.9);
  }
  37.5% {
    border-radius: 40% 60% 80% 20% / 50% 80% 20% 50%;
    transform: rotate(45deg) scale(1.08);
    filter: brightness(1.15) saturate(1.15);
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    transform: rotate(60deg) scale(1.1);
    filter: brightness(1.2) saturate(1.2);
  }
  62.5% {
    border-radius: 20% 80% 70% 30% / 40% 60% 40% 60%;
    transform: rotate(75deg) scale(1.02);
    filter: brightness(1.05) saturate(1.05);
  }
  75% {
    border-radius: 50% 50% 20% 80% / 80% 20% 60% 40%;
    transform: rotate(90deg) scale(0.98);
    filter: brightness(0.95) saturate(0.95);
  }
  87.5% {
    border-radius: 80% 20% 40% 60% / 30% 70% 70% 30%;
    transform: rotate(105deg) scale(1.03);
    filter: brightness(1.08) saturate(1.08);
  }
}

/* Apple Liquid Navigation */
.apple-liquid-nav {
  position: relative;
  background: var(--apple-material-dark);
  backdrop-filter: var(--apple-blur-heavy);
  -webkit-backdrop-filter: var(--apple-blur-heavy);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 60px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.6s var(--apple-spring);
  overflow: hidden;
}

.apple-liquid-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: apple-nav-shimmer 3s ease-in-out infinite;
}

.apple-nav-item {
  position: relative;
  padding: 8px 16px;
  border-radius: 30px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.4s var(--apple-ease);
  overflow: hidden;
  z-index: 2;
}

.apple-nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--apple-glass-vibrant);
  backdrop-filter: var(--apple-blur-light);
  -webkit-backdrop-filter: var(--apple-blur-light);
  border-radius: 30px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s var(--apple-ease);
  z-index: -1;
}

.apple-nav-item.active::before,
.apple-nav-item:hover::before {
  opacity: 1;
  transform: scale(1);
}

.apple-nav-item.active,
.apple-nav-item:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.apple-nav-indicator {
  position: absolute;
  height: 100%;
  background: var(--apple-glass-translucent);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  transition: all 0.6s var(--apple-spring);
  z-index: 1;
  box-shadow: var(--apple-shadow-2);
}

@keyframes apple-nav-shimmer {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

/* Apple Elastic Container */
.apple-elastic {
  position: relative;
  background: var(--apple-glass-medium);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: all 0.6s var(--apple-bounce);
  transform-origin: center;
  cursor: pointer;
}

.apple-elastic:hover {
  animation: apple-elastic-bounce 1s var(--apple-bounce);
}

.apple-elastic:active {
  animation: apple-elastic-squish 0.2s var(--apple-ease);
}

@keyframes apple-elastic-bounce {
  0% {
    transform: scale(1) rotateZ(0deg);
  }
  15% {
    transform: scale(1.08, 0.92) rotateZ(-1deg);
  }
  30% {
    transform: scale(0.94, 1.06) rotateZ(1deg);
  }
  45% {
    transform: scale(1.04, 0.96) rotateZ(-0.5deg);
  }
  60% {
    transform: scale(0.98, 1.02) rotateZ(0.3deg);
  }
  75% {
    transform: scale(1.01, 0.99) rotateZ(-0.1deg);
  }
  100% {
    transform: scale(1) rotateZ(0deg);
  }
}

@keyframes apple-elastic-squish {
  0% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(0.9, 1.1);
  }
  100% {
    transform: scale(1, 1);
  }
}

/* Apple Fluid Text Animation */
.apple-fluid-text {
  position: relative;
  display: inline-block;
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.8) 0%,
    rgba(139, 92, 246, 0.8) 25%,
    rgba(6, 182, 212, 0.8) 50%,
    rgba(16, 185, 129, 0.8) 75%,
    rgba(59, 130, 246, 0.8) 100%
  );
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: apple-text-flow 4s ease-in-out infinite;
  font-weight: 600;
}

@keyframes apple-text-flow {
  0%,
  100% {
    background-position: 0% 50%;
    transform: translateY(0) scale(1) rotateZ(0deg);
    filter: blur(0px);
    letter-spacing: 0px;
  }
  25% {
    background-position: 50% 50%;
    transform: translateY(-2px) scale(1.01) rotateZ(0.5deg);
    filter: blur(0.2px);
    letter-spacing: 0.5px;
  }
  50% {
    background-position: 100% 50%;
    transform: translateY(0) scale(0.99) rotateZ(0deg);
    filter: blur(0px);
    letter-spacing: 1px;
  }
  75% {
    background-position: 150% 50%;
    transform: translateY(2px) scale(1.005) rotateZ(-0.3deg);
    filter: blur(0.1px);
    letter-spacing: 0.3px;
  }
}

/* ========================================
   ADVANCED HOVER EFFECTS & MICRO-INTERACTIONS
   ======================================== */

/* Apple Advanced Button Hover */
.apple-button-advanced {
  position: relative;
  background: var(--apple-glass-light);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 24px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.4s var(--apple-ease);
  overflow: hidden;
  transform-style: preserve-3d;
  font-weight: 500;
}

.apple-button-advanced::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s var(--apple-ease);
  z-index: 1;
}

.apple-button-advanced::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 70%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--apple-ease), height 0.4s var(--apple-ease);
  z-index: 0;
}

.apple-button-advanced:hover::before {
  left: 100%;
}

.apple-button-advanced:hover::after {
  width: 200%;
  height: 200%;
}

.apple-button-advanced:hover {
  transform: translateY(-6px) rotateX(5deg) rotateY(-2deg) scale(1.05);
  background: var(--apple-glass-strong);
  box-shadow: var(--apple-shadow-4);
  border-color: rgba(255, 255, 255, 0.12);
}

.apple-button-advanced:active {
  transform: translateY(-2px) scale(0.98);
  transition: all 0.1s var(--apple-ease);
}

/* Apple Interactive Card */
.apple-interactive-card {
  position: relative;
  background: var(--apple-glass-medium);
  backdrop-filter: var(--apple-blur-thick);
  -webkit-backdrop-filter: var(--apple-blur-thick);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s var(--apple-spring);
  transform-style: preserve-3d;
  cursor: pointer;
}

.apple-interactive-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(59, 130, 246, 0.1) 60deg,
    transparent 120deg,
    rgba(139, 92, 246, 0.1) 180deg,
    transparent 240deg,
    rgba(6, 182, 212, 0.1) 300deg,
    transparent 360deg
  );
  animation: apple-conic-hover-spin 6s linear infinite;
  opacity: 0;
  transition: opacity 0.3s var(--apple-ease);
}

.apple-interactive-card::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(59, 130, 246, 0.2),
    rgba(139, 92, 246, 0.2),
    rgba(6, 182, 212, 0.2),
    rgba(16, 185, 129, 0.2)
  );
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s var(--apple-ease);
  z-index: -1;
  filter: blur(4px);
}

.apple-interactive-card:hover::before {
  opacity: 1;
}

.apple-interactive-card:hover::after {
  opacity: 0.6;
}

.apple-interactive-card:hover {
  transform: translateY(-10px) rotateX(10deg) rotateY(5deg) scale(1.02);
  background: var(--apple-glass-vibrant);
  box-shadow: var(--apple-shadow-5);
  border-color: rgba(255, 255, 255, 0.15);
}

.apple-interactive-card .card-content {
  position: relative;
  z-index: 2;
  transition: transform 0.4s var(--apple-spring);
}

.apple-interactive-card:hover .card-content {
  transform: translateZ(20px);
}

@keyframes apple-conic-hover-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Apple Ripple Effect */
.apple-ripple {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transform: translateZ(0);
}

.apple-ripple::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 70%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--apple-ease), height 0.6s var(--apple-ease);
  z-index: 0;
}

.apple-ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Apple Advanced Input */
.apple-input-advanced {
  position: relative;
  background: var(--apple-glass-light);
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px 20px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.4s var(--apple-ease);
  outline: none;
  font-family: inherit;
}

.apple-input-advanced::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(59, 130, 246, 0.4),
    rgba(139, 92, 246, 0.4),
    rgba(6, 182, 212, 0.4)
  );
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s var(--apple-ease);
  z-index: -1;
}

.apple-input-advanced::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.8);
  transform: translateY(-50%) scale(0);
  transition: transform 0.3s var(--apple-spring);
}

.apple-input-advanced:focus::before {
  opacity: 1;
}

.apple-input-advanced:focus::after {
  transform: translateY(-50%) scale(1);
  animation: apple-input-pulse 2s ease-in-out infinite;
}

.apple-input-advanced:focus {
  transform: translateY(-2px) scale(1.01);
  background: var(--apple-glass-medium);
  box-shadow: var(--apple-shadow-3);
  border-color: rgba(255, 255, 255, 0.12);
}

@keyframes apple-input-pulse {
  0%,
  100% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.4;
    transform: translateY(-50%) scale(1.5);
  }
}

/* Apple Magnetic Button */
.apple-magnetic {
  position: relative;
  transition: all 0.3s var(--apple-ease);
  cursor: pointer;
  will-change: transform;
  transform-origin: center;
}

.apple-magnetic:hover {
  animation: apple-magnetic-float 2s ease-in-out infinite;
}

@keyframes apple-magnetic-float {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.02);
  }
}

/* Apple Image Hover Effects */
.apple-image-hover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.5s var(--apple-spring);
  transform-style: preserve-3d;
}

.apple-image-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s var(--apple-ease);
  transform: scale(1);
}

.apple-image-hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.2) 0%,
    rgba(139, 92, 246, 0.2) 100%
  );
  opacity: 0;
  transition: opacity 0.4s var(--apple-ease);
  z-index: 1;
}

.apple-image-hover::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s var(--apple-spring);
  z-index: 2;
  backdrop-filter: var(--apple-blur-light);
  -webkit-backdrop-filter: var(--apple-blur-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-black);
}

.apple-image-hover:hover::before {
  opacity: 1;
}

.apple-image-hover:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

.apple-image-hover:hover {
  transform: rotateX(8deg) rotateY(-4deg) scale(1.02);
  box-shadow: var(--apple-shadow-4);
}

.apple-image-hover:hover img {
  transform: scale(1.1) rotate(1deg);
}

/* Apple Tooltip System */
.apple-tooltip {
  position: relative;
  cursor: help;
}

.apple-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--apple-material-dark);
  backdrop-filter: var(--apple-blur-heavy);
  -webkit-backdrop-filter: var(--apple-blur-heavy);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--apple-ease);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--apple-shadow-3);
}

.apple-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  border: 5px solid transparent;
  border-top-color: var(--apple-material-dark);
  opacity: 0;
  transition: all 0.3s var(--apple-ease);
  z-index: 1000;
}

.apple-tooltip:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

.apple-tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* ========================================
   SOPHISTICATED BLUR & DEPTH SYSTEMS
   ======================================== */

/* Apple Depth Layer System */
.apple-depth-container {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.apple-depth-layer-1 {
  transform: translateZ(10px);
  transition: transform 0.4s var(--apple-ease);
}

.apple-depth-layer-2 {
  transform: translateZ(20px);
  transition: transform 0.4s var(--apple-ease);
}

.apple-depth-layer-3 {
  transform: translateZ(30px);
  transition: transform 0.4s var(--apple-ease);
}

.apple-depth-layer-4 {
  transform: translateZ(40px);
  transition: transform 0.4s var(--apple-ease);
}

.apple-depth-layer-5 {
  transform: translateZ(50px);
  transition: transform 0.4s var(--apple-ease);
}

.apple-depth-container:hover .apple-depth-layer-1 {
  transform: translateZ(20px) translateY(-2px);
}

.apple-depth-container:hover .apple-depth-layer-2 {
  transform: translateZ(40px) translateY(-4px);
}

.apple-depth-container:hover .apple-depth-layer-3 {
  transform: translateZ(60px) translateY(-6px);
}

.apple-depth-container:hover .apple-depth-layer-4 {
  transform: translateZ(80px) translateY(-8px);
}

.apple-depth-container:hover .apple-depth-layer-5 {
  transform: translateZ(100px) translateY(-10px);
}

/* Apple Blur Variations */
.apple-blur-adaptive {
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
  transition: backdrop-filter 0.4s var(--apple-ease);
}

.apple-blur-adaptive:hover {
  backdrop-filter: var(--apple-blur-heavy);
  -webkit-backdrop-filter: var(--apple-blur-heavy);
}

.apple-blur-progressive-1 {
  backdrop-filter: var(--apple-blur-thin);
  -webkit-backdrop-filter: var(--apple-blur-thin);
}

.apple-blur-progressive-2 {
  backdrop-filter: var(--apple-blur-light);
  -webkit-backdrop-filter: var(--apple-blur-light);
}

.apple-blur-progressive-3 {
  backdrop-filter: var(--apple-blur-regular);
  -webkit-backdrop-filter: var(--apple-blur-regular);
}

.apple-blur-progressive-4 {
  backdrop-filter: var(--apple-blur-thick);
  -webkit-backdrop-filter: var(--apple-blur-thick);
}

.apple-blur-progressive-5 {
  backdrop-filter: var(--apple-blur-heavy);
  -webkit-backdrop-filter: var(--apple-blur-heavy);
}

.apple-blur-progressive-6 {
  backdrop-filter: var(--apple-blur-ultra);
  -webkit-backdrop-filter: var(--apple-blur-ultra);
}

/* Apple Frosted Glass Effects */
.apple-frosted-light {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: var(--apple-blur-light) saturate(1.8);
  -webkit-backdrop-filter: var(--apple-blur-light) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--apple-shadow-2);
}

.apple-frosted-medium {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: var(--apple-blur-regular) saturate(1.6) brightness(1.1);
  -webkit-backdrop-filter: var(--apple-blur-regular) saturate(1.6)
    brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--apple-shadow-3);
}

.apple-frosted-heavy {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--apple-blur-thick) saturate(1.4) brightness(1.2)
    contrast(1.1);
  -webkit-backdrop-filter: var(--apple-blur-thick) saturate(1.4) brightness(1.2)
    contrast(1.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--apple-shadow-4);
}

.apple-frosted-ultra {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: var(--apple-blur-ultra) saturate(1.2) brightness(1.3)
    contrast(1.2);
  -webkit-backdrop-filter: var(--apple-blur-ultra) saturate(1.2) brightness(1.3)
    contrast(1.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--apple-shadow-5);
}

/* Apple Vibrancy Effects */
.apple-vibrancy-light {
  background: var(--apple-vibrancy-quaternary);
  backdrop-filter: var(--apple-blur-light) saturate(2) brightness(1.5);
  -webkit-backdrop-filter: var(--apple-blur-light) saturate(2) brightness(1.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.apple-vibrancy-medium {
  background: var(--apple-vibrancy-tertiary);
  backdrop-filter: var(--apple-blur-regular) saturate(1.8) brightness(1.4);
  -webkit-backdrop-filter: var(--apple-blur-regular) saturate(1.8)
    brightness(1.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.apple-vibrancy-strong {
  background: var(--apple-vibrancy-secondary);
  backdrop-filter: var(--apple-blur-thick) saturate(1.6) brightness(1.3);
  -webkit-backdrop-filter: var(--apple-blur-thick) saturate(1.6) brightness(1.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
}

.apple-vibrancy-ultra {
  background: var(--apple-vibrancy-primary);
  backdrop-filter: var(--apple-blur-heavy) saturate(1.4) brightness(1.2);
  -webkit-backdrop-filter: var(--apple-blur-heavy) saturate(1.4) brightness(1.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--primary-black);
}

/* End of Sophisticated Blur and Depth Systems */

/* =================================================================
   APPLE-STYLE VISUAL EFFECTS LIBRARY
   ================================================================= */

/* Apple Visual Effects Variables */
:root {
  /* Visual Effect Intensities */
  --apple-vfx-subtle: 0.15;
  --apple-vfx-moderate: 0.35;
  --apple-vfx-strong: 0.65;
  --apple-vfx-intense: 0.85;
  --apple-vfx-maximum: 1;

  /* Prismatic Colors */
  --apple-prism-red: hsla(0, 100%, 65%, var(--apple-vfx-moderate));
  --apple-prism-orange: hsla(30, 100%, 65%, var(--apple-vfx-moderate));
  --apple-prism-yellow: hsla(60, 100%, 65%, var(--apple-vfx-moderate));
  --apple-prism-green: hsla(120, 100%, 65%, var(--apple-vfx-moderate));
  --apple-prism-blue: hsla(240, 100%, 65%, var(--apple-vfx-moderate));
  --apple-prism-purple: hsla(280, 100%, 65%, var(--apple-vfx-moderate));

  /* Holographic Variables */
  --apple-holo-shift: 15deg;
  --apple-holo-speed: 8s;
  --apple-holo-intensity: 0.4;
}

/* Apple Prismatic Glass Effects */
.apple-prism {
  background: linear-gradient(
    135deg,
    var(--apple-prism-red) 0%,
    var(--apple-prism-orange) 20%,
    var(--apple-prism-yellow) 40%,
    var(--apple-prism-green) 60%,
    var(--apple-prism-blue) 80%,
    var(--apple-prism-purple) 100%
  );
  backdrop-filter: blur(20px) saturate(180%) contrast(120%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.apple-prism::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: apple-prism-rotate 12s linear infinite;
  pointer-events: none;
}

.apple-prism::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: apple-prism-pulse 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apple-prism-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes apple-prism-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* Apple Holographic Effects */
.apple-holographic {
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  backdrop-filter: blur(15px) hue-rotate(var(--apple-holo-shift));
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  animation: apple-holographic-shift var(--apple-holo-speed) ease-in-out
    infinite;
}

.apple-holographic::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 0, 255, var(--apple-holo-intensity)) 0%,
    rgba(0, 255, 255, var(--apple-holo-intensity)) 25%,
    rgba(255, 255, 0, var(--apple-holo-intensity)) 50%,
    rgba(255, 0, 0, var(--apple-holo-intensity)) 75%,
    rgba(0, 0, 255, var(--apple-holo-intensity)) 100%
  );
  mix-blend-mode: color-dodge;
  animation: apple-holographic-flow 10s linear infinite;
  pointer-events: none;
}

@keyframes apple-holographic-shift {
  0%,
  100% {
    filter: hue-rotate(0deg) saturate(100%);
  }
  25% {
    filter: hue-rotate(90deg) saturate(150%);
  }
  50% {
    filter: hue-rotate(180deg) saturate(200%);
  }
  75% {
    filter: hue-rotate(270deg) saturate(150%);
  }
}

@keyframes apple-holographic-flow {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

/* Apple Iridescent Materials */
.apple-iridescent {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 0, 255, 0.05) 25%,
    rgba(0, 255, 255, 0.05) 50%,
    rgba(255, 255, 0, 0.05) 75%,
    rgba(255, 255, 255, 0.1) 100%
  );
  backdrop-filter: blur(25px) saturate(200%) brightness(110%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.apple-iridescent::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(255, 0, 0, 0.2),
    rgba(255, 165, 0, 0.2),
    rgba(255, 255, 0, 0.2),
    rgba(0, 255, 0, 0.2),
    rgba(0, 255, 255, 0.2),
    rgba(0, 0, 255, 0.2),
    rgba(255, 0, 255, 0.2),
    rgba(255, 0, 0, 0.2)
  );
  animation: apple-iridescent-spin 20s linear infinite;
  pointer-events: none;
}

.apple-iridescent::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: apple-iridescent-sweep 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apple-iridescent-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes apple-iridescent-sweep {
  0% {
    left: -100%;
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Apple Crystalline Effects */
.apple-crystal {
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 40%,
    transparent 70%
  );
  backdrop-filter: blur(30px) brightness(130%) contrast(120%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  position: relative;
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
}

.apple-crystal::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 25%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 75%,
    rgba(255, 255, 255, 0.3) 100%
  );
  animation: apple-crystal-facet 8s ease-in-out infinite;
  pointer-events: none;
  clip-path: inherit;
}

.apple-crystal::after {
  content: "";
  position: absolute;
  top: 20%;
  left: 20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: apple-crystal-core 6s ease-in-out infinite;
  pointer-events: none;
  border-radius: 50%;
}

@keyframes apple-crystal-facet {
  0%,
  100% {
    opacity: 0.6;
    transform: rotate(0deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.1);
  }
}

@keyframes apple-crystal-core {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Apple Quantum Glass Effects */
.apple-quantum {
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(100, 200, 255, 0.06) 33%,
    rgba(255, 100, 200, 0.06) 66%,
    rgba(255, 255, 255, 0.08) 100%
  );
  backdrop-filter: blur(40px) saturate(150%) hue-rotate(30deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.apple-quantum::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 30%,
    transparent 60%
  );
  animation: apple-quantum-field 15s ease-in-out infinite;
  pointer-events: none;
}

.apple-quantum::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(100, 200, 255, 0.1) 25%,
    transparent 50%,
    rgba(255, 100, 200, 0.1) 75%,
    transparent 100%
  );
  animation: apple-quantum-vortex 25s linear infinite;
  pointer-events: none;
}

@keyframes apple-quantum-field {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.7;
  }
  33% {
    transform: scale(1.2) rotate(120deg);
    opacity: 1;
  }
  66% {
    transform: scale(0.8) rotate(240deg);
    opacity: 0.5;
  }
}

@keyframes apple-quantum-vortex {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(0.8);
  }
}

/* Apple Dimensional Portal Effects */
.apple-portal {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(100, 150, 255, 0.05) 30%,
    rgba(255, 100, 150, 0.05) 60%,
    transparent 90%
  );
  backdrop-filter: blur(35px) contrast(130%) brightness(110%);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.apple-portal::before {
  content: "";
  position: absolute;
  top: -25%;
  left: -25%;
  width: 150%;
  height: 150%;
  background: conic-gradient(
    from 0deg,
    rgba(255, 0, 100, 0.3),
    rgba(100, 0, 255, 0.3),
    rgba(0, 100, 255, 0.3),
    rgba(0, 255, 100, 0.3),
    rgba(255, 255, 0, 0.3),
    rgba(255, 0, 100, 0.3)
  );
  animation: apple-portal-spiral 18s linear infinite;
  pointer-events: none;
}

.apple-portal::after {
  content: "";
  position: absolute;
  top: 25%;
  left: 25%;
  width: 50%;
  height: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.2) 40%,
    transparent 70%
  );
  border-radius: 50%;
  animation: apple-portal-core 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apple-portal-spiral {
  0% {
    transform: rotate(0deg) scale(1);
    filter: hue-rotate(0deg);
  }
  50% {
    transform: rotate(180deg) scale(1.3);
    filter: hue-rotate(180deg);
  }
  100% {
    transform: rotate(360deg) scale(1);
    filter: hue-rotate(360deg);
  }
}

@keyframes apple-portal-core {
  0%,
  100% {
    transform: scale(0.5) rotate(0deg);
    opacity: 0.8;
  }
  33% {
    transform: scale(1.2) rotate(120deg);
    opacity: 1;
  }
  66% {
    transform: scale(0.8) rotate(240deg);
    opacity: 0.9;
  }
}

/* Apple Ethereal Mist Effects */
.apple-ethereal {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(200, 220, 255, 0.04) 25%,
    rgba(255, 200, 220, 0.04) 50%,
    rgba(220, 255, 200, 0.04) 75%,
    rgba(255, 255, 255, 0.06) 100%
  );
  backdrop-filter: blur(50px) saturate(120%) opacity(90%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.apple-ethereal::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(
      circle at 30% 30%,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 30%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(200, 220, 255, 0.15) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 20%,
      rgba(255, 200, 220, 0.1) 0%,
      transparent 50%
    );
  animation: apple-ethereal-drift 30s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apple-ethereal-drift {
  0% {
    transform: translate(0%, 0%) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(-10%, -10%) rotate(90deg) scale(1.1);
  }
  50% {
    transform: translate(-20%, 10%) rotate(180deg) scale(0.9);
  }
  75% {
    transform: translate(10%, 20%) rotate(270deg) scale(1.2);
  }
  100% {
    transform: translate(0%, 0%) rotate(360deg) scale(1);
  }
}

/* Apple Plasma Field Effects */
.apple-plasma {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 100, 200, 0.08) 0%,
    rgba(100, 255, 200, 0.06) 30%,
    rgba(200, 100, 255, 0.06) 60%,
    rgba(255, 200, 100, 0.04) 90%,
    transparent 100%
  );
  backdrop-filter: blur(45px) saturate(180%) contrast(125%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.apple-plasma::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(255, 100, 200, 0.4) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(100, 255, 200, 0.4) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(200, 100, 255, 0.3) 0%,
      transparent 50%
    );
  animation: apple-plasma-flow 20s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

.apple-plasma::after {
  content: "";
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  background: conic-gradient(
    from 45deg,
    rgba(255, 100, 200, 0.2),
    rgba(100, 255, 200, 0.2),
    rgba(200, 100, 255, 0.2),
    rgba(255, 200, 100, 0.2),
    rgba(255, 100, 200, 0.2)
  );
  animation: apple-plasma-vortex 15s linear infinite;
  pointer-events: none;
  border-radius: 50%;
}

@keyframes apple-plasma-flow {
  0%,
  100% {
    filter: hue-rotate(0deg) brightness(100%);
    transform: scale(1);
  }
  33% {
    filter: hue-rotate(120deg) brightness(120%);
    transform: scale(1.1);
  }
  66% {
    filter: hue-rotate(240deg) brightness(110%);
    transform: scale(0.9);
  }
}

@keyframes apple-plasma-vortex {
  0% {
    transform: rotate(0deg) scale(0.8);
  }
  100% {
    transform: rotate(360deg) scale(0.8);
  }
}

/* Apple Neural Network Effects */
.apple-neural {
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(100, 200, 255, 0.03) 20%,
    rgba(255, 100, 200, 0.03) 40%,
    rgba(200, 255, 100, 0.03) 60%,
    rgba(255, 200, 100, 0.03) 80%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(55px) saturate(140%) brightness(105%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.apple-neural::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: radial-gradient(
      circle at 25% 25%,
      rgba(255, 255, 255, 0.1) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 75% 25%,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 25% 75%,
      rgba(255, 255, 255, 0.06) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    );
  background-size: 40px 40px, 60px 60px, 50px 50px, 70px 70px;
  animation: apple-neural-pulse 25s ease-in-out infinite;
  pointer-events: none;
}

.apple-neural::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.03) 75%,
    transparent 100%
  );
  animation: apple-neural-scan 12s linear infinite;
  pointer-events: none;
}

@keyframes apple-neural-pulse {
  0%,
  100% {
    transform: translate(0%, 0%) scale(1);
    opacity: 0.7;
  }
  25% {
    transform: translate(-5%, -5%) scale(1.05);
    opacity: 1;
  }
  50% {
    transform: translate(5%, -5%) scale(0.95);
    opacity: 0.8;
  }
  75% {
    transform: translate(-5%, 5%) scale(1.02);
    opacity: 0.9;
  }
}

@keyframes apple-neural-scan {
  0% {
    background-position: -100% -100%;
  }
  100% {
    background-position: 200% 200%;
  }
}

/* Apple Starfield Effects */
.apple-starfield {
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.02) 0%,
    rgba(200, 220, 255, 0.01) 50%,
    transparent 100%
  );
  backdrop-filter: blur(60px) contrast(110%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.apple-starfield::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background-image: radial-gradient(
      circle at 10% 10%,
      rgba(255, 255, 255, 0.8) 0.5px,
      transparent 1px
    ),
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.6) 0.3px,
      transparent 1px
    ),
    radial-gradient(
      circle at 50% 30%,
      rgba(255, 255, 255, 0.4) 0.4px,
      transparent 1px
    ),
    radial-gradient(
      circle at 70% 40%,
      rgba(255, 255, 255, 0.5) 0.2px,
      transparent 1px
    ),
    radial-gradient(
      circle at 90% 50%,
      rgba(255, 255, 255, 0.7) 0.6px,
      transparent 1px
    ),
    radial-gradient(
      circle at 20% 70%,
      rgba(255, 255, 255, 0.3) 0.3px,
      transparent 1px
    ),
    radial-gradient(
      circle at 60% 80%,
      rgba(255, 255, 255, 0.5) 0.4px,
      transparent 1px
    ),
    radial-gradient(
      circle at 80% 90%,
      rgba(255, 255, 255, 0.6) 0.2px,
      transparent 1px
    );
  background-size: 150px 150px, 200px 200px, 180px 180px, 220px 220px,
    160px 160px, 190px 190px, 170px 170px, 210px 210px;
  animation: apple-starfield-drift 50s linear infinite;
  pointer-events: none;
}

@keyframes apple-starfield-drift {
  0% {
    transform: translate(0%, 0%) rotate(0deg);
  }
  100% {
    transform: translate(-10%, -10%) rotate(5deg);
  }
}

/* Apple Void Distortion Effects */
.apple-void {
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(50, 50, 100, 0.05) 30%,
    rgba(100, 50, 100, 0.03) 60%,
    transparent 90%
  );
  backdrop-filter: blur(70px) invert(5%) contrast(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.apple-void::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 45%,
    transparent 50%,
    rgba(255, 255, 255, 0.05) 95%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
  animation: apple-void-spiral 40s linear infinite;
  pointer-events: none;
}

.apple-void::after {
  content: "";
  position: absolute;
  top: 40%;
  left: 40%;
  width: 20%;
  height: 20%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  border-radius: 50%;
  animation: apple-void-singularity 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apple-void-spiral {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.5);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(1);
  }
}

@keyframes apple-void-singularity {
  0%,
  100% {
    transform: scale(0.5);
    opacity: 0.8;
  }
  50% {
    transform: scale(2);
    opacity: 0.3;
  }
}

/* End of Apple-Style Visual Effects Library */

/* =================================================================
   APPLE LIQUID MORPHING INTERFACE SYSTEM
   ================================================================= */

/* Apple Liquid Interface Variables */
:root {
  /* Morphing Timing */
  --apple-morph-fast: 0.3s;
  --apple-morph-medium: 0.6s;
  --apple-morph-slow: 1.2s;
  --apple-morph-ultra: 2.4s;

  /* Liquid Colors */
  --apple-liquid-primary: hsla(220, 80%, 60%, 0.15);
  --apple-liquid-secondary: hsla(280, 70%, 65%, 0.12);
  --apple-liquid-accent: hsla(340, 90%, 70%, 0.18);
  --apple-liquid-neutral: hsla(0, 0%, 100%, 0.08);

  /* Surface Tension */
  --apple-tension-low: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --apple-tension-medium: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --apple-tension-high: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --apple-tension-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* Apple Liquid Buttons */
.apple-liquid-btn {
  background: linear-gradient(
    135deg,
    var(--apple-liquid-primary) 0%,
    var(--apple-liquid-secondary) 100%
  );
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 12px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--apple-morph-medium) var(--apple-tension-elastic);
}

.apple-liquid-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  border-radius: 50%;
  transition: all var(--apple-morph-fast) var(--apple-tension-high);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.apple-liquid-btn:hover {
  transform: translateY(-2px) scale(1.05);
  border-radius: 35px;
  background: linear-gradient(
    135deg,
    var(--apple-liquid-accent) 0%,
    var(--apple-liquid-primary) 100%
  );
}

.apple-liquid-btn:hover::before {
  width: 200%;
  height: 200%;
  animation: apple-liquid-ripple 1s ease-out;
}

.apple-liquid-btn:active {
  transform: translateY(1px) scale(0.98);
  border-radius: 20px;
  transition: all var(--apple-morph-fast) var(--apple-tension-low);
}

@keyframes apple-liquid-ripple {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Apple Liquid Cards */
.apple-liquid-card {
  background: linear-gradient(
    145deg,
    var(--apple-liquid-neutral) 0%,
    var(--apple-liquid-primary) 50%,
    var(--apple-liquid-secondary) 100%
  );
  backdrop-filter: blur(30px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--apple-morph-slow) var(--apple-tension-elastic);
}

.apple-liquid-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: apple-liquid-flow 20s linear infinite;
  pointer-events: none;
}

.apple-liquid-card:hover {
  transform: translateY(-8px) rotateX(5deg);
  border-radius: 30px;
  background: linear-gradient(
    145deg,
    var(--apple-liquid-accent) 0%,
    var(--apple-liquid-primary) 30%,
    var(--apple-liquid-secondary) 70%,
    var(--apple-liquid-neutral) 100%
  );
}

.apple-liquid-card:hover::before {
  animation-duration: 10s;
}

@keyframes apple-liquid-flow {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Apple Liquid Inputs */
.apple-liquid-input {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(25px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 16px 20px;
  position: relative;
  transition: all var(--apple-morph-medium) var(--apple-tension-high);
  outline: none;
}

.apple-liquid-input:focus {
  border-radius: 25px;
  border-color: rgba(255, 255, 255, 0.3);
  background: linear-gradient(
    135deg,
    var(--apple-liquid-primary) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  transform: scale(1.02);
}

.apple-liquid-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--apple-morph-fast);
}

.apple-liquid-input:focus::placeholder {
  color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Apple Liquid Navigation */
.apple-liquid-nav {
  background: linear-gradient(
    90deg,
    var(--apple-liquid-neutral) 0%,
    var(--apple-liquid-primary) 25%,
    var(--apple-liquid-secondary) 75%,
    var(--apple-liquid-neutral) 100%
  );
  backdrop-filter: blur(40px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 8px;
  position: relative;
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.apple-liquid-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: apple-liquid-nav-shine 6s ease-in-out infinite;
  pointer-events: none;
}

.apple-liquid-nav-item {
  background: transparent;
  border: none;
  border-radius: 40px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  transition: all var(--apple-morph-medium) var(--apple-tension-elastic);
  overflow: hidden;
}

.apple-liquid-nav-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--apple-liquid-accent);
  border-radius: 50px;
  transition: all var(--apple-morph-slow) var(--apple-tension-high);
  transform: translate(-50%, -50%);
  z-index: -1;
}

.apple-liquid-nav-item.active,
.apple-liquid-nav-item:hover {
  color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.apple-liquid-nav-item.active::before,
.apple-liquid-nav-item:hover::before {
  width: 100%;
  height: 100%;
}

@keyframes apple-liquid-nav-shine {
  0%,
  100% {
    transform: translateX(-100%) skewX(-15deg);
  }
  50% {
    transform: translateX(300%) skewX(-15deg);
  }
}

/* Apple Liquid Progress Bars */
.apple-liquid-progress {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.apple-liquid-progress-fill {
  background: linear-gradient(
    90deg,
    var(--apple-liquid-primary) 0%,
    var(--apple-liquid-accent) 50%,
    var(--apple-liquid-secondary) 100%
  );
  height: 100%;
  border-radius: 25px;
  position: relative;
  transition: width var(--apple-morph-slow) var(--apple-tension-elastic);
  overflow: hidden;
}

.apple-liquid-progress-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: apple-liquid-progress-shine 2s ease-in-out infinite;
}

@keyframes apple-liquid-progress-shine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Apple Liquid Modals */
.apple-liquid-modal {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    var(--apple-liquid-primary) 30%,
    var(--apple-liquid-secondary) 70%,
    rgba(255, 255, 255, 0.06) 100%
  );
  backdrop-filter: blur(50px) saturate(150%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  position: relative;
  overflow: hidden;
  animation: apple-liquid-modal-enter var(--apple-morph-ultra)
    var(--apple-tension-elastic);
}

.apple-liquid-modal::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 30%
    ),
    radial-gradient(circle, var(--apple-liquid-accent) 0%, transparent 50%);
  animation: apple-liquid-modal-ambient 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes apple-liquid-modal-enter {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    border-radius: 10px;
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05) translateY(-5px);
    border-radius: 40px;
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    border-radius: 30px;
  }
}

@keyframes apple-liquid-modal-ambient {
  0%,
  100% {
    transform: translate(-20%, -20%) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(-30%, -10%) rotate(120deg) scale(1.1);
  }
  66% {
    transform: translate(-10%, -30%) rotate(240deg) scale(0.9);
  }
}

/* End of Apple Liquid Morphing Interface System */

/* =================================================================
   APPLE BRAIN-WAVE SOUND SYSTEM & AUDIO INTEGRATION
   ================================================================= */

/* Sound-reactive visual feedback classes */
.sound-active {
  animation: sound-pulse 0.3s ease-out;
}

.sound-bubble {
  animation: sound-bubble-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.sound-ripple {
  animation: sound-ripple-effect 0.6s ease-out;
}

.sound-wave {
  animation: sound-brain-wave 0.8s ease-in-out;
}

@keyframes sound-pulse {
  0% {
    transform: scale(1);
    filter: brightness(100%);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(120%);
  }
  100% {
    transform: scale(1);
    filter: brightness(100%);
  }
}

@keyframes sound-bubble-pop {
  0% {
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(0deg);
  }
  30% {
    transform: scale(1.15) rotate(5deg);
    filter: hue-rotate(90deg);
  }
  60% {
    transform: scale(0.95) rotate(-3deg);
    filter: hue-rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: hue-rotate(0deg);
  }
}

@keyframes sound-ripple-effect {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow: 0 0 0 40px rgba(255, 255, 255, 0);
  }
}

@keyframes sound-brain-wave {
  0%,
  100% {
    filter: hue-rotate(0deg) saturate(100%);
    transform: scale(1);
  }
  25% {
    filter: hue-rotate(90deg) saturate(150%);
    transform: scale(1.03);
  }
  50% {
    filter: hue-rotate(180deg) saturate(200%);
    transform: scale(1.06);
  }
  75% {
    filter: hue-rotate(270deg) saturate(150%);
    transform: scale(1.03);
  }
}

/* Enhanced clickable elements with sound integration */
.apple-sound-btn,
.apple-liquid-btn,
.apple-liquid-nav-item,
.apple-liquid-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.apple-sound-btn:hover,
.apple-liquid-btn:hover,
.apple-liquid-nav-item:hover,
.apple-liquid-card:hover {
  filter: brightness(110%) saturate(120%);
}

/* End of Apple Brain-Wave Sound System */

/* =================================================================
   APPLE CONTROL CENTER GLASSMORPHISM ENHANCEMENTS
   ================================================================= */

/* iOS Control Center Glass Variables */
:root {
  /* Control Center Glass Colors */
  --ios-glass-primary: rgba(255, 255, 255, 0.15);
  --ios-glass-secondary: rgba(255, 255, 255, 0.08);
  --ios-glass-accent: rgba(255, 255, 255, 0.25);
  --ios-glass-border: rgba(255, 255, 255, 0.18);
  --ios-glass-shadow: rgba(0, 0, 0, 0.1);

  /* Control Center Blur Values */
  --ios-blur-light: blur(25px);
  --ios-blur-medium: blur(40px);
  --ios-blur-heavy: blur(60px);

  /* Control Center Sizing */
  --ios-radius-small: 18px;
  --ios-radius-medium: 22px;
  --ios-radius-large: 28px;
}

/* Enhanced News Cards - iOS Control Center Style */
.news-card,
.card {
  background: linear-gradient(
    135deg,
    var(--ios-glass-primary) 0%,
    var(--ios-glass-secondary) 100%
  );
  backdrop-filter: var(--ios-blur-medium) saturate(180%) brightness(110%);
  -webkit-backdrop-filter: var(--ios-blur-medium) saturate(180%)
    brightness(110%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-large);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px var(--ios-glass-shadow), 0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  /* No transitions or animations */
}

.news-card:hover,
.card:hover {
  background: linear-gradient(
    135deg,
    var(--ios-glass-accent) 0%,
    var(--ios-glass-primary) 100%
  );
  box-shadow: 0 16px 48px var(--ios-glass-shadow),
    0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

/* News Card Content Styling */
.news-card h3,
.card h3 {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
}

.news-card p,
.card p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 15px;
}

.news-card .meta,
.card .meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Enhanced Category Tiles - iOS Control Center Style */
.category-tile {
  background: linear-gradient(
    135deg,
    var(--ios-glass-primary) 0%,
    var(--ios-glass-secondary) 100%
  );
  backdrop-filter: var(--ios-blur-light) saturate(160%) brightness(105%);
  -webkit-backdrop-filter: var(--ios-blur-light) saturate(160%) brightness(105%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-medium);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.category-tile:hover {
  transform: translateY(-3px) scale(1.05);
  background: linear-gradient(
    135deg,
    var(--ios-glass-accent) 0%,
    var(--ios-glass-primary) 100%
  );
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
}

.category-tile.active {
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.3) 0%,
    rgba(0, 122, 255, 0.15) 100%
  );
  border-color: rgba(0, 122, 255, 0.4);
  box-shadow: 0 8px 28px rgba(0, 122, 255, 0.2),
    0 2px 6px rgba(0, 122, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.category-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.category-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Enhanced Search Bar - iOS Control Center Style */
.search-container {
  margin-bottom: 40px;
}

.search-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(
    135deg,
    var(--ios-glass-primary) 0%,
    var(--ios-glass-secondary) 100%
  );
  backdrop-filter: var(--ios-blur-medium) saturate(180%) brightness(110%);
  -webkit-backdrop-filter: var(--ios-blur-medium) saturate(180%)
    brightness(110%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-large);
  padding: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.search-wrapper:focus-within {
  transform: translateY(-2px);
  background: linear-gradient(
    135deg,
    var(--ios-glass-accent) 0%,
    var(--ios-glass-primary) 100%
  );
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  z-index: 2;
}

#searchInput {
  width: calc(100% - 120px);
  background: transparent;
  border: none;
  padding: 16px 20px 16px 50px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  outline: none;
  border-radius: var(--ios-radius-medium);
}

#searchInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#searchBtn {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 0.8) 0%,
    rgba(0, 122, 255, 0.6) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 122, 255, 0.4);
  border-radius: calc(var(--ios-radius-medium) - 2px);
  padding: 0 24px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#searchBtn:hover {
  transform: scale(1.05);
  background: linear-gradient(
    135deg,
    rgba(0, 122, 255, 1) 0%,
    rgba(0, 122, 255, 0.8) 100%
  );
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#searchBtn:active {
  transform: scale(0.98);
}

/* Enhanced Social Links - iOS Control Center Style */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.social-link {
  background: linear-gradient(
    135deg,
    var(--ios-glass-primary) 0%,
    var(--ios-glass-secondary) 100%
  );
  backdrop-filter: var(--ios-blur-light) saturate(160%) brightness(105%);
  -webkit-backdrop-filter: var(--ios-blur-light) saturate(160%) brightness(105%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-medium);
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.social-link:hover {
  transform: translateY(-4px) scale(1.05);
  background: linear-gradient(
    135deg,
    var(--ios-glass-accent) 0%,
    var(--ios-glass-primary) 100%
  );
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 1);
}

.social-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.social-label {
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Newsletter Enhancement */
.newsletter {
  display: flex;
  gap: 8px;
  background: linear-gradient(
    135deg,
    var(--ios-glass-primary) 0%,
    var(--ios-glass-secondary) 100%
  );
  backdrop-filter: var(--ios-blur-light) saturate(160%);
  -webkit-backdrop-filter: var(--ios-blur-light) saturate(160%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-medium);
  padding: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.newsletter input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.9);
  outline: none;
  border-radius: calc(var(--ios-radius-medium) - 2px);
}

.newsletter input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter button {
  background: linear-gradient(
    135deg,
    rgba(52, 199, 89, 0.8) 0%,
    rgba(52, 199, 89, 0.6) 100%
  );
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(52, 199, 89, 0.4);
  border-radius: calc(var(--ios-radius-medium) - 2px);
  padding: 14px 20px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 16px rgba(52, 199, 89, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.newsletter button:hover {
  transform: scale(1.05);
  background: linear-gradient(
    135deg,
    rgba(52, 199, 89, 1) 0%,
    rgba(52, 199, 89, 0.8) 100%
  );
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* End of Apple Control Center Glassmorphism Enhancements */

/* =================================================================
   MOBILE RESPONSIVE FIXES
   ================================================================= */

@media (max-width: 768px) {
  /* Fix search bar icon overlap on mobile */
  .search-wrapper {
    padding: 6px;
  }

  .search-icon {
    left: 16px;
    font-size: 1rem;
  }

  #searchInput {
    padding: 14px 16px 14px 46px;
    width: calc(100% - 100px);
    font-size: 0.9rem;
  }

  #searchBtn {
    padding: 0 20px;
    font-size: 0.85rem;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: auto;
    min-width: auto;
  }

  /* Category tiles mobile spacing */
  .categories-grid {
    gap: 12px;
  }

  .category-tile {
    padding: 16px;
  }

  /* Social links mobile layout */
  .social-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }

  .social-link {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .search-wrapper {
    padding: 4px;
  }

  .search-icon {
    left: 14px;
    font-size: 0.9rem;
  }

  #searchInput {
    padding: 12px 14px 12px 42px;
    width: calc(100% - 85px);
    font-size: 0.85rem;
  }

  #searchBtn {
    padding: 0 12px;
    font-size: 0.8rem;
    right: 4px;
    top: 4px;
    bottom: 4px;
  }
}

/* End of Mobile Responsive Fixes */

/* =================================================================
   PAGINATION CONTROLS
   ================================================================= */

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px auto;
  padding: 20px;
  max-width: 600px;
}

.pagination-btn {
  background: linear-gradient(
    135deg,
    var(--ios-glass-primary) 0%,
    var(--ios-glass-secondary) 100%
  );
  backdrop-filter: var(--ios-blur-light) saturate(160%) brightness(105%);
  -webkit-backdrop-filter: var(--ios-blur-light) saturate(160%) brightness(105%);
  border: 1px solid var(--ios-glass-border);
  border-radius: var(--ios-radius-medium);
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
  background: linear-gradient(
    135deg,
    var(--ios-glass-accent) 0%,
    var(--ios-glass-primary) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 1);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.4);
}

.pagination-btn:disabled:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.page-info {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: var(--ios-blur-light) saturate(160%);
  -webkit-backdrop-filter: var(--ios-blur-light) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--ios-radius-medium);
  padding: 12px 24px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Mobile pagination */
@media (max-width: 768px) {
  .pagination-controls {
    gap: 12px;
    margin: 30px auto;
    padding: 15px;
  }

  .pagination-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .page-info {
    padding: 10px 16px;
    font-size: 0.85rem;
    min-width: 70px;
  }
}

@media (max-width: 480px) {
  .pagination-controls {
    gap: 8px;
    margin: 20px auto;
    padding: 10px;
  }

  .pagination-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .pagination-btn i {
    font-size: 0.7rem;
  }

  .page-info {
    padding: 8px 12px;
    font-size: 0.8rem;
    min-width: 60px;
  }
}

/* End of Pagination Controls */

/* Sort Controls Styles */
.news-controls {
  display: none;
  justify-content: flex-end;
  align-items: center;
  margin: 20px 0 30px 0;
  padding: 0 10px;
  gap: 16px;              /* space between groups */
  flex-wrap: wrap;        /* allow natural wrapping on mid widths */
}

.country-controls,
.language-controls,
.sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.country-select {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 36px;
  min-width: 140px;
}

.country-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.country-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.language-select {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 36px;
  min-width: 140px;
}

.language-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.language-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.country-select option,
.language-select option,
.sort-select option {
  background: var(--background-primary);
  color: var(--text-primary);
  padding: 8px;
}

.sort-select {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 36px;
}

.sort-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sort-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.sort-select option {
  background: var(--background-primary);
  color: var(--text-primary);
  padding: 8px;
}

/* Mobile Responsiveness for Sort Controls */
@media (max-width: 768px) {
  .news-controls {
    justify-content: stretch;
    align-items: stretch;
    flex-direction: column;   /* stack groups vertically */
    gap: 12px;
    margin: 15px 0 25px 0;
    padding: 0 5px;
  }

  /* Turn groups into single-column blocks with label on top */
  .country-controls,
  .language-controls,
  .sort-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    width: 100%;
  }

  .country-controls .control-label,
  .language-controls .control-label,
  .sort-controls .control-label {
    display: block;
    font-size: 0.85rem;
    line-height: 1.2;
    margin: 0 0 4px 2px;
  }

  .country-select,
  .language-select,
  .sort-select {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    padding-right: 34px;
    font-size: 0.95rem;
    border-radius: 12px;
    background-size: 14px;
    background-position: right 8px center;
  }
}

/* End of Sort Controls */

/* End of Ultra Advanced Glassmorphism CSS System */

/* =====================================================================
   FUTURE PACK — ADVANCED NEO AESTHETIC (optional, non‑breaking)
   This block extends visuals with modern glass, neon accents, and
   motion-safe micro-interactions. It only refines existing components
   and exposes utility classes you can opt into in markup later.
   ---------------------------------------------------------------------
   Notes:
   - No markup changes are required for base upgrades below.
   - Utilities are prefixed with `.u-` and `.fx-` to avoid collisions.
   - All animations are guarded by `prefers-reduced-motion`.
====================================================================== */

:root {
  /* Future Pack tokens */
  --fp-surface-0: rgba(255,255,255,0.04);
  --fp-surface-1: rgba(255,255,255,0.06);
  --fp-surface-2: rgba(255,255,255,0.10);
  --fp-ring: rgba(0, 231, 255, 0.28);
  --fp-ring-strong: rgba(0, 231, 255, 0.42);
  --fp-blue: #2dd4ff;
  --fp-cyan: #22d3ee;
  --fp-emerald: #34d399;
  --fp-violet: #a78bfa;
  --fp-shadow: 0 1px 0 rgba(255,255,255,0.06), 0 18px 60px rgba(0,0,0,0.35);
  --fp-inset: inset 0 1px 0 rgba(255,255,255,0.18);
  --fp-trans: 320ms cubic-bezier(.2,.7,.2,1);
}

/* ---------- Utilities ---------- */
.u-glass {
  background: linear-gradient(180deg, var(--fp-surface-1), var(--fp-surface-0)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06)) border-box;
  border: 1px solid transparent;
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  box-shadow: var(--fp-shadow);
}

.u-border-gradient {
  border: 1px solid transparent;
  border-image: linear-gradient(135deg, var(--neo-accent-1), var(--neo-accent-2)) 1;
}

.u-glow-s { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 12px 36px rgba(0,231,255,.10); }
.u-glow-l { box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 24px 80px rgba(0,231,255,.14); }

.u-text-gradient {
  background: linear-gradient(90deg, var(--neo-accent-2), var(--neo-accent-1), var(--neo-accent-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.u-ring:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.25), 0 0 0 6px var(--fp-ring); }
.u-ring-strong:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.35), 0 0 0 8px var(--fp-ring-strong); }

/* ---------- Enhanced Components (non-breaking) ---------- */

/* News controls container subtle divider and spacing */
.news-controls {
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.04);
  padding-top: 14px;
}

/* News card: add faint inner highlight and image overlay blend */
.news-card {
  box-shadow: var(--fp-shadow);
}
.news-card .news-image-container::after,
.news-card .image::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 60% at 50% 10%, rgba(0,0,0,.0), rgba(0,0,0,.25));
}

.news-card-content::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
}

/* Social links: neon bezel with calm hover */
.social-link {
  background: linear-gradient(180deg, var(--fp-surface-2), var(--fp-surface-0)) padding-box,
              linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08)) border-box;
  border: 1px solid transparent;
  transition: transform var(--fp-trans), box-shadow var(--fp-trans);
}
.social-link:hover { transform: translateY(-4px); box-shadow: var(--fp-shadow), 0 0 0 1px rgba(0,231,255,.16); }

/* Newsletter inputs: unify ring */
.newsletter input[type="email"] { transition: box-shadow var(--fp-trans), border-color var(--fp-trans); }
.newsletter input[type="email"]:focus { box-shadow: 0 0 0 2px rgba(255,255,255,0.25), 0 0 0 6px var(--fp-ring); border-color: rgba(255,255,255,0.35); }

/* ---------- Skeletons for content loading ---------- */
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,0.06); border-radius: 12px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  animation: shimmer 1.6s infinite;
}
.news-card.skeleton { height: 320px; border: 1px solid rgba(255,255,255,.08); }
.news-card.skeleton .news-card-content { display: none; }

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ---------- Decorative backgrounds (opt-in) ---------- */
.fx-aurora {
  position: relative; isolation: isolate;
  background: radial-gradient(800px 400px at 20% 10%, rgba(45,212,191,0.08), transparent 60%),
              radial-gradient(900px 420px at 70% 0%, rgba(59,130,246,0.08), transparent 65%);
}
.fx-aurora::before {
  content: ""; position: absolute; inset: -20%; z-index: -1;
  background: conic-gradient(from 180deg, rgba(255,255,255,0.04), transparent 30%, rgba(255,255,255,0.04));
  filter: blur(60px);
}

.fx-gridlines {
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px; mask-image: radial-gradient(circle at 50% 15%, black 40%, transparent 70%);
}

/* ---------- Optional 3D hover hint (low-cost) ---------- */
.tilt-lite { transform: perspective(1000px) rotateX(0) rotateY(0); transition: transform var(--fp-trans), box-shadow var(--fp-trans); }
.tilt-lite:hover { transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px); }

/* ---------- Reduced motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  .social-link:hover, .tilt-lite:hover, .news-card:hover { transform: none; }
  .skeleton::after { animation: none; }
}

/* ---------- Narrow devices fine-tuning ---------- */
@media (max-width: 480px) {
  .hero-content h1 { font-size: clamp(2rem, 8vw, 2.4rem); }
  .section-title { font-size: clamp(1.4rem, 6vw, 1.8rem); }
}
