:root {
  --bg-gradient: radial-gradient(
      circle at 10% 16%,
      rgba(11, 95, 255, 0.14),
      transparent 52%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(138, 46, 255, 0.16),
      transparent 58%
    ),
    linear-gradient(140deg, #f6f9ff 0%, #eef3ff 46%, #f6f2ff 100%);
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-border: rgba(255, 255, 255, 0.68);
  --accent: #0b5fff;
  --accent-soft: rgba(11, 95, 255, 0.16);
  --text: #1a2444;
  --muted: #65749a;
  --shadow: 0 20px 48px rgba(21, 58, 171, 0.18);
  --surface: rgba(255, 255, 255, 0.82);
  --warning: #d73527;
  --warning-soft: rgba(215, 53, 39, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.62;
  display: flex;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.page {
  width: min(680px, 100%);
  padding: clamp(2rem, 4vw, 3rem) 0;
}

header {
  text-align: center;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.95),
    rgba(233, 241, 255, 0.95)
  );
  border-radius: 28px;
  padding: clamp(2rem, 4.5vw, 3rem);
  border: 1px solid rgba(11, 95, 255, 0.12);
  box-shadow: 0 26px 70px rgba(28, 78, 190, 0.18);
  backdrop-filter: blur(20px);
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: rgba(11, 95, 255, 0.14);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  color: #14254c;
  font-weight: 700;
}

.subtitle {
  color: #5f6fa1;
  font-size: 1.1rem;
  font-weight: 500;
  max-width: 500px;
  margin: 0 auto;
}

.important-section {
  background: linear-gradient(
    135deg,
    rgba(215, 53, 39, 0.12),
    rgba(255, 235, 235, 0.95)
  );
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid rgba(215, 53, 39, 0.2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: slideUp 0.6s ease-out 0.1s both;
}

.important-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 1.5rem;
  text-align: center;
}

.instructions {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: slideUp 0.6s ease-out 0.2s both;
}

.instructions h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.instruction-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.instruction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(11, 95, 255, 0.08);
  transition: all 0.2s ease;
}

.important-section .instruction-item {
  border: 1px solid rgba(215, 53, 39, 0.15);
}

.instruction-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(11, 95, 255, 0.15);
  transform: translateX(4px);
}

.important-section .instruction-item:hover {
  border-color: rgba(215, 53, 39, 0.25);
}

.instruction-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.important-section .instruction-icon {
  background: var(--warning-soft);
  color: var(--warning);
}

.instruction-icon i {
  font-size: 16px;
}

.instruction-item span {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.action-section {
  display: flex;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: slideUp 0.6s ease-out 0.3s both;
}

.primary-btn,
.secondary-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #0854cc);
  color: white;
  box-shadow: 0 8px 24px rgba(11, 95, 255, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(11, 95, 255, 0.4);
}

.secondary-btn {
  background: transparent;
  color: var(--accent);
  border: 2px solid rgba(11, 95, 255, 0.2);
}

.secondary-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.instructions {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  animation: slideUp 0.6s ease-out 0.5s both;
}

.instructions h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.instruction-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.instruction-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(11, 95, 255, 0.08);
  transition: all 0.2s ease;
}

.instruction-item:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(11, 95, 255, 0.15);
  transform: translateX(4px);
}

.instruction-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.instruction-icon i {
  font-size: 16px;
}

.instruction-item span {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  animation: slideUp 0.6s ease-out 0.6s both;
}

footer p {
  margin-bottom: 0.25rem;
}

.footer-note {
  font-style: italic;
  opacity: 0.8;
}

.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1.2rem, 4vw, 2.2rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(11, 95, 255, 0.2);
  background: linear-gradient(135deg, var(--accent), #0854cc);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 74, 201, 0.28);
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  border: none;
  font-family: inherit;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 74, 201, 0.35);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(11, 95, 255, 0.6);
  outline-offset: 3px;
}

.back-to-top i {
  font-size: 18px;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .page {
    padding: 1.5rem 0;
  }

  header {
    padding: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .action-section {
    flex-direction: column;
    gap: 0.8rem;
  }

  .instructions {
    padding: 1.5rem;
  }

  .instruction-item {
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1.2rem;
  }

  .badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .card {
    padding: 1.4rem;
  }

  .primary-btn,
  .secondary-btn {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
  }

  .instructions h3 {
    font-size: 1.1rem;
  }

  .instruction-item span {
    font-size: 0.9rem;
  }
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --card-bg: #ffffff;
    --card-border: #000000;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }

  .card,
  header,
  .instructions {
    border: 2px solid #000;
  }

  .back-to-top {
    border: 2px solid #000;
  }
}

/* Focus styles */
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 95, 255, 0.6);
  outline-offset: 2px;
}

/* Loading animation for dynamic content */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}
