@media (max-width: 520px) {
  .container {
    padding: 24px 16px;
    gap: 16px;
  }

  .profile-avatar,
  .profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    font-size: 28px;
  }

  .profile-name {
    font-size: 20px;
  }

  .profile-bio {
    font-size: 14px;
    padding: 6px 12px;
  }

  .profile-details {
    font-size: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .link-card {
    padding: 14px 16px;
  }

  .link-card .link-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .link-card .link-title {
    font-size: 14px;
  }

  .link-card .link-url {
    max-width: 150px;
    font-size: 11px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .analytics-bar {
    gap: 16px;
    font-size: 12px;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .editor-panel {
    width: 100vw;
    right: -100vw;
  }

  .editor-panel.open {
    right: 0;
  }

  .editor-header {
    padding: 16px 20px;
  }

  .editor-content {
    padding: 20px 16px;
  }

  .editor-social-grid {
    grid-template-columns: 1fr;
  }

  .editor-bg-options {
    grid-template-columns: 1fr 1fr;
  }

  .theme-presets {
    grid-template-columns: repeat(4, 1fr);
  }

  .action-buttons .btn {
    font-size: 13px;
    padding: 10px 18px;
  }
}

@media (min-width: 521px) and (max-width: 768px) {
  .container {
    padding: 32px 24px;
  }

  .editor-panel {
    width: 400px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 520px;
    padding: 40px 24px;
  }
}

@media (min-width: 1025px) {
  .container {
    max-width: 520px;
    padding: 48px 24px;
  }

  .editor-panel {
    width: 480px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 560px;
    padding: 64px 24px;
  }

  .editor-panel {
    width: 520px;
  }
}

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

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f5f7;
    --text: #1d1d1f;
    --text-secondary: rgba(0, 0, 0, 0.5);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  }
}

@media (hover: none) {
  .link-card:hover {
    transform: none;
  }

  .social-icon:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}
