.snake-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: var(--font-family);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  line-height: 1.2;
}

/* Sizes */
.snake-link--small {
  font-size: var(--font-size-sm);
}

.snake-link--medium {
  font-size: var(--font-size-base);
}

.snake-link--large {
  font-size: var(--font-size-lg);
}

/* Default variant */
.snake-link--default {
  color: var(--color-text-primary);
  text-decoration: none;
}

.snake-link--default:hover:not(.snake-link--disabled) {
  color: #e0e0e0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.snake-link--default:active:not(.snake-link--disabled) {
  opacity: 0.8;
}

/* Primary variant */
.snake-link--primary {
  color: #61dafb;
  text-decoration: none;
  font-weight: var(--font-weight-medium);
}

.snake-link--primary:hover:not(.snake-link--disabled) {
  color: #8ae5ff;
  text-shadow: 0 0 8px rgba(97, 218, 251, 0.5);
}

.snake-link--primary:active:not(.snake-link--disabled) {
  color: #4bb8d9;
}

/* Subtle variant */
.snake-link--subtle {
  color: #8e8e90;
  text-decoration: none;
}

.snake-link--subtle:hover:not(.snake-link--disabled) {
  color: var(--color-text-primary);
}

.snake-link--subtle:active:not(.snake-link--disabled) {
  opacity: 0.8;
}

/* Underline variant */
.snake-link--underline {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: #4a4a4a;
}

.snake-link--underline:hover:not(.snake-link--disabled) {
  text-decoration-color: var(--color-text-primary);
  color: #e0e0e0;
}

.snake-link--underline:active:not(.snake-link--disabled) {
  opacity: 0.8;
}

/* Focus state */
.snake-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--color-bg-base),
    0 0 0 4px rgba(189, 189, 189, 0.3);
  border-radius: 2px;
}

/* Icons */
.snake-link__icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.snake-link__icon--start {
  margin-right: calc(var(--spacing-xs) / 2);
}

.snake-link__icon--end {
  margin-left: calc(var(--spacing-xs) / 2);
}

/* External indicator */
.snake-link__external {
  font-size: 0.85em;
  margin-left: 2px;
  opacity: 0.7;
  transition: all var(--transition-fast);
}

.snake-link:hover .snake-link__external {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Text */
.snake-link__text {
  position: relative;
}

/* Disabled state */
.snake-link--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Visited state for certain variants */
.snake-link--default:visited:not(.snake-link--disabled) {
  color: #a0a0a0;
}

.snake-link--primary:visited:not(.snake-link--disabled) {
  color: #4bb8d9;
}

/* Animated underline effect for default variant */
.snake-link--default::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-text-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.snake-link--default:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Corner decoration for primary variant on hover */
.snake-link--primary::before,
.snake-link--primary::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1px solid #61dafb;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.snake-link--primary::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.snake-link--primary::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.snake-link--primary:hover::before,
.snake-link--primary:hover::after {
  opacity: 0.5;
}
