


:root {
  
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-backdrop: blur(20px);
  
  
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
  --shadow-floating: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-elevated: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-apple: 0 4px 20px rgba(0, 0, 0, 0.08);
  
  
  --gradient-primary: linear-gradient(135deg, #0071E3 0%, #64D2FF 100%);
  --gradient-secondary: linear-gradient(135deg, #1D1D1F 0%, #2C2C2E 100%);
  --gradient-accent: linear-gradient(135deg, #FF3B30 0%, #FF9F0A 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  --gradient-hero: linear-gradient(135deg, #1D1D1F 0%, #2C2C2E 50%, #1D1D1F 100%);
  
  
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --sharp: cubic-bezier(0.4, 0, 0.6, 1);
  --apple-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-glass);
  transition: all var(--transition-normal);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}


.btn-glass {
  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);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-glass::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.5s ease;
}

.btn-glass:hover::before {
  left: 100%;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-floating);
}


@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.floating {
  animation: float 3s ease-in-out infinite;
}

.floating:nth-child(2) {
  animation-delay: 0.5s;
}

.floating:nth-child(3) {
  animation-delay: 1s;
}

.floating:nth-child(4) {
  animation-delay: 1.5s;
}


.magnetic {
  transition: transform var(--transition-normal);
}

.magnetic:hover {
  transform: scale(1.05);
}


.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}


.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}


.morphing-shape {
  width: 100px;
  height: 100px;
  background: var(--gradient-primary);
  border-radius: 50%;
  animation: morph 4s ease-in-out infinite;
}

@keyframes morph {
  0%, 100% {
    border-radius: 50%;
    transform: rotate(0deg);
  }
  25% {
    border-radius: 20%;
    transform: rotate(90deg);
  }
  50% {
    border-radius: 50%;
    transform: rotate(180deg);
  }
  75% {
    border-radius: 20%;
    transform: rotate(270deg);
  }
}




.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(0, 113, 227, 0.3);
  border-radius: 50%;
  animation: particle-drift 8s linear infinite;
}

.particle:nth-child(2n) {
  background: rgba(255, 59, 48, 0.2);
  animation-duration: 12s;
}

.particle:nth-child(3n) {
  background: rgba(100, 210, 255, 0.25);
  animation-duration: 10s;
}

@keyframes particle-drift {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}


.morphing-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.morphing-shape {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 50%;
  animation: apple-morph 6s ease-in-out infinite;
  opacity: 0.8;
}

.morphing-shape:nth-child(2) {
  background: var(--gradient-accent);
  animation-delay: 2s;
  animation-duration: 8s;
}

.morphing-shape:nth-child(3) {
  background: var(--gradient-secondary);
  animation-delay: 4s;
  animation-duration: 10s;
}

@keyframes apple-morph {
  0%, 100% {
    border-radius: 50%;
    transform: rotate(0deg) scale(1);
  }
  25% {
    border-radius: 20%;
    transform: rotate(90deg) scale(1.1);
  }
  50% {
    border-radius: 50%;
    transform: rotate(180deg) scale(0.9);
  }
  75% {
    border-radius: 20%;
    transform: rotate(270deg) scale(1.05);
  }
}


.btn-liquid {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  border: none;
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  font-weight: 600;
}

.btn-liquid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s var(--apple-ease);
}

.btn-liquid:hover::before {
  width: 300px;
  height: 300px;
}

.btn-liquid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 113, 227, 0.4);
  background: var(--color-primary-hover);
}

.btn-liquid:active {
  transform: translateY(0);
  background: var(--color-primary-active);
}


.glitch {
  position: relative;
  color: var(--color-text-primary);
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: apple-glitch-1 0.5s infinite;
  color: var(--color-accent);
  z-index: -1;
}

.glitch::after {
  animation: apple-glitch-2 0.5s infinite;
  color: var(--color-info);
  z-index: -2;
}

@keyframes apple-glitch-1 {
  0%, 14%, 15%, 49%, 50%, 99%, 100% {
    transform: translate(0);
  }
  15%, 49% {
    transform: translate(-2px, 2px);
  }
}

@keyframes apple-glitch-2 {
  0%, 20%, 21%, 62%, 63%, 99%, 100% {
    transform: translate(0);
  }
  21%, 62% {
    transform: translate(2px, -2px);
  }
}


.neon {
  color: var(--color-primary);
  text-shadow: 
    0 0 5px var(--color-primary),
    0 0 10px var(--color-primary),
    0 0 15px var(--color-primary),
    0 0 20px var(--color-primary),
    0 0 35px var(--color-primary),
    0 0 40px var(--color-primary);
  animation: apple-neon-flicker 2s infinite alternate;
}

@keyframes apple-neon-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 
      0 0 5px var(--color-primary),
      0 0 10px var(--color-primary),
      0 0 15px var(--color-primary),
      0 0 20px var(--color-primary),
      0 0 35px var(--color-primary),
      0 0 40px var(--color-primary);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}


.holographic {
  background: linear-gradient(45deg, 
    var(--color-primary) 0%, 
    var(--color-info) 25%, 
    var(--color-accent) 50%, 
    var(--color-warning) 75%, 
    var(--color-primary) 100%);
  background-size: 400% 400%;
  animation: apple-holographic-shift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

@keyframes apple-holographic-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


.spinner-apple {
  width: 50px;
  height: 50px;
  border: 3px solid var(--color-border-tertiary);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: apple-spin 1s linear infinite;
  position: relative;
}

.spinner-apple::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-top: 3px solid rgba(0, 113, 227, 0.3);
  border-radius: 50%;
  animation: apple-spin 2s linear infinite reverse;
}

@keyframes apple-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


.magnetic {
  transition: transform var(--transition-normal);
  cursor: pointer;
}

.magnetic:hover {
  transform: scale(1.05);
}

.magnetic:active {
  transform: scale(0.95);
}


.card-tilt {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: all var(--transition-normal);
}

.card-tilt:hover {
  transform: rotateY(5deg) rotateX(5deg);
}

.card-tilt-inner {
  transform-style: preserve-3d;
  transition: transform var(--transition-normal);
}

.card-tilt:hover .card-tilt-inner {
  transform: translateZ(20px);
}


.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s var(--apple-ease);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}


.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.3);
  border-radius: var(--radius-md);
}


::selection {
  background: rgba(0, 113, 227, 0.2);
  color: var(--color-text-primary);
}

::-moz-selection {
  background: rgba(0, 113, 227, 0.2);
  color: var(--color-text-primary);
}


::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}


@media (max-width: 768px) {
  .glitch {
    font-size: 1.5rem;
  }
  
  .holographic {
    font-size: 1.2rem;
  }
  
  .morphing-container {
    width: 150px;
    height: 150px;
  }
}


@media (prefers-color-scheme: dark) {
  .neon {
    color: var(--color-info);
    text-shadow: 
      0 0 5px var(--color-info),
      0 0 10px var(--color-info),
      0 0 15px var(--color-info),
      0 0 20px var(--color-info),
      0 0 35px var(--color-info),
      0 0 40px var(--color-info);
  }
  
  .particle {
    background: rgba(100, 210, 255, 0.4);
  }
  
  .particle:nth-child(2n) {
    background: rgba(255, 59, 48, 0.3);
  }
  
  .particle:nth-child(3n) {
    background: rgba(0, 113, 227, 0.35);
  }
}


@media (prefers-reduced-motion: reduce) {
  .floating,
  .shimmer,
  .morphing-shape,
  .particle,
  .glitch,
  .neon,
  .holographic,
  .spinner-apple {
    animation: none;
  }
  
  .magnetic:hover,
  .card-tilt:hover,
  .btn-liquid:hover {
    transform: none;
  }
}


@media print {
  .floating,
  .shimmer,
  .morphing-shape,
  .particle,
  .glitch,
  .neon,
  .holographic,
  .scroll-progress,
  .particles-container {
    display: none;
  }
  
  .glass,
  .glass-card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }
  
  .holographic {
    -webkit-text-fill-color: black;
    color: black;
  }
}


.card-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: all var(--transition-normal);
}

.card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg);
}

.card-inner {
  transform-style: preserve-3d;
  transition: transform var(--transition-normal);
}

.card-3d:hover .card-inner {
  transform: translateZ(20px);
}


.btn-liquid {
  position: relative;
  overflow: hidden;
  background: var(--gradient-primary);
  border: none;
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
}

.btn-liquid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.btn-liquid:hover::before {
  width: 300px;
  height: 300px;
}

.btn-liquid:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}


.glitch {
  position: relative;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 0.5s infinite;
  color: #ff0000;
  z-index: -1;
}

.glitch::after {
  animation: glitch-2 0.5s infinite;
  color: #00ff00;
  z-index: -2;
}

@keyframes glitch-1 {
  0%, 14%, 15%, 49%, 50%, 99%, 100% {
    transform: translate(0);
  }
  15%, 49% {
    transform: translate(-2px, 2px);
  }
}

@keyframes glitch-2 {
  0%, 20%, 21%, 62%, 63%, 99%, 100% {
    transform: translate(0);
  }
  21%, 62% {
    transform: translate(2px, -2px);
  }
}


.neon {
  color: #fff;
  text-shadow: 
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 15px #007AFF,
    0 0 20px #007AFF,
    0 0 35px #007AFF,
    0 0 40px #007AFF;
  animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    text-shadow: 
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #007AFF,
      0 0 20px #007AFF,
      0 0 35px #007AFF,
      0 0 40px #007AFF;
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}


.spinner-advanced {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #007AFF;
  border-radius: 50%;
  animation: spin-advanced 1s linear infinite;
  position: relative;
}

.spinner-advanced::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 3px solid transparent;
  border-top: 3px solid rgba(0, 122, 255, 0.5);
  border-radius: 50%;
  animation: spin-advanced 2s linear infinite reverse;
}

@keyframes spin-advanced {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}


.holographic {
  background: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 400% 400%;
  animation: holographic-shift 3s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes holographic-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 9999;
  transition: width 0.1s ease;
}


::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}


::selection {
  background: rgba(0, 122, 255, 0.2);
  color: var(--color-text-primary);
}

::-moz-selection {
  background: rgba(0, 122, 255, 0.2);
  color: var(--color-text-primary);
}


.focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}


@media (prefers-reduced-motion: reduce) {
  .floating,
  .shimmer,
  .morphing-shape,
  .particle,
  .glitch,
  .neon,
  .holographic {
    animation: none;
  }
  
  .magnetic:hover,
  .card-3d:hover,
  .btn-liquid:hover {
    transform: none;
  }
}


@media (prefers-contrast: high) {
  .glass,
  .glass-card,
  .btn-glass {
    background: var(--color-background-primary);
    border: 2px solid var(--color-text-primary);
  }
  
  .gradient-text,
  .holographic {
    -webkit-text-fill-color: var(--color-text-primary);
    color: var(--color-text-primary);
  }
}


@media print {
  .floating,
  .shimmer,
  .morphing-shape,
  .particle,
  .glitch,
  .neon,
  .holographic,
  .scroll-progress {
    display: none;
  }
  
  .glass,
  .glass-card {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
