.instructions-trigger {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  min-width: 3.5rem;
  height: 3.5rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #3f51b5, #6574cd);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 2000;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.instructions-trigger:focus {
  outline: 3px solid rgba(63, 81, 181, 0.45);
  outline-offset: 3px;
}

.instructions-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.28);
  background: linear-gradient(135deg, #4c5ed8, #7a86dd);
}

.instructions-trigger .instructions-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.instructions-trigger .instructions-label {
  color: #f8fafc;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.instructions-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 17, 29, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.instructions-overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.instructions-panel {
  background: #101828;
  color: #f8fafc;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.45);
  padding: 2.5rem;
  position: relative;
}

.instructions-panel h2 {
  margin: 0 0 1.5rem;
  font-size: 1.875rem;
  line-height: 1.3;
}

.instructions-panel p {
  margin: 0 0 1rem;
  color: #cbd5f5;
}

.instructions-steps {
  counter-reset: step-counter;
  display: grid;
  gap: 1rem;
}

.instructions-step {
  background: rgba(46, 56, 86, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.65);
  border-radius: 12px;
  padding: 1rem 1.25rem 1.25rem;
  position: relative;
}

.instructions-step::before {
  counter-increment: step-counter;
  content: "Step " counter(step-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
  color: #e0e7ff;
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.instructions-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #e0e7ff;
}

.instructions-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.instructions-close:hover {
  color: #e2e8f0;
}

body.instructions-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .instructions-trigger {
    right: 1.25rem;
    bottom: 1.25rem;
    height: 3rem;
    padding: 0 1.1rem;
  }

  .instructions-trigger .instructions-label {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }

  .instructions-trigger .instructions-icon {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1rem;
  }

  .instructions-panel {
    padding: 2rem 1.5rem;
  }
}

