/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root variables */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.2);
  --border-radius: 16px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

/* Custom animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
  }
}

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

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

/* Link card styles */
.link-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  animation: fade-in-up 0.6s ease-out forwards;
  position: relative;
  overflow: hidden;
}

/* Staggered animation for link cards */
.link-card:nth-child(1) { animation-delay: 0.1s; }
.link-card:nth-child(2) { animation-delay: 0.2s; }
.link-card:nth-child(3) { animation-delay: 0.3s; }
.link-card:nth-child(4) { animation-delay: 0.4s; }
.link-card:nth-child(5) { animation-delay: 0.5s; }
.link-card:nth-child(6) { animation-delay: 0.6s; }
.link-card:nth-child(7) { animation-delay: 0.7s; }
.link-card:nth-child(8) { animation-delay: 0.8s; }
.link-card:nth-child(9) { animation-delay: 0.9s; }
.link-card:nth-child(10) { animation-delay: 1.0s; }
.link-card:nth-child(11) { animation-delay: 1.1s; }

.link-card::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;
}

.link-card:hover::before {
  left: 100%;
}

.link-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: rgba(255, 255, 255, 0.4);
}

.link-card:active {
  transform: translateY(-2px) scale(1.01);
  transition: var(--transition-bounce);
}

/* Platform-specific themes */
.tiktok-theme:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(50, 50, 50, 0.95) 100%);
  color: white;
}

.tiktok-theme:hover h3,
.tiktok-theme:hover p {
  color: white;
}

.instagram-theme:hover {
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.95) 0%, rgba(253, 29, 29, 0.95) 50%, rgba(252, 176, 64, 0.95) 100%);
  color: white;
}

.instagram-theme:hover h3,
.instagram-theme:hover p {
  color: white;
}

.youtube-theme:hover {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.95) 0%, rgba(200, 0, 0, 0.95) 100%);
  color: white;
}

.youtube-theme:hover h3,
.youtube-theme:hover p {
  color: white;
}

.telegram-theme:hover {
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.95) 0%, rgba(54, 164, 225, 0.95) 100%);
  color: white;
}

.telegram-theme:hover h3,
.telegram-theme:hover p {
  color: white;
}

.business-theme:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%);
  color: white;
}

.business-theme:hover h3,
.business-theme:hover p {
  color: white;
}

.premium-theme {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.98) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.premium-theme::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
  border-radius: var(--border-radius);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}

.premium-theme:hover::after {
  opacity: 1;
}

.premium-theme:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  color: white;
  transform: translateY(-6px) scale(1.03);
}

.premium-theme:hover h3,
.premium-theme:hover p {
  color: white;
}

/* Profile picture enhancements */
.profile-picture-container {
  position: relative;
  display: inline-block;
}

.profile-picture-container::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(from 0deg, #667eea, #764ba2, #f093fb, #f5576c, #667eea);
  border-radius: 50%;
  animation: spin 3s linear infinite;
  z-index: -1;
}

/* Responsive design */
@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .link-card {
    padding: 0.875rem;
  }
  
  .link-card h3 {
    font-size: 0.95rem;
  }
  
  .link-card p {
    font-size: 0.825rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .container {
    max-width: 520px;
  }
}

@media (min-width: 769px) {
  .container {
    max-width: 480px;
  }
  
  .link-card:hover {
    transform: translateY(-6px) scale(1.03);
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Accessibility improvements */
.link-card:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .link-card {
    border: 2px solid #000;
    background: #fff;
  }
  
  .link-card:hover {
    background: #000;
    color: #fff;
  }
}

/* Print styles */
@media print {
  .link-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }
}
