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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px;
  background-color: #f9f7f6;
  font-family: system-ui, -apple-system, sans-serif;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 800px;
}

footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 48px;
}

main {
  width: 100%;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 800px;
}

.card {
  margin-bottom: 48px;
  padding: 48px 64px;
  background-color: #2e2d2d;
  border-radius: 12px;
  max-width: 800px;
}

.card .rotating-text {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
  height: 24px;
}

.rotating-text {
  position: relative;
  display: inline-block;
}

.rotating-text span {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  animation: rotateWords 27s linear infinite;
  will-change: opacity, transform;
  color: #888;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.rotating-text span:nth-child(1) { animation-delay: 0s; }
.rotating-text span:nth-child(2) { animation-delay: 3s; }
.rotating-text span:nth-child(3) { animation-delay: 6s; }
.rotating-text span:nth-child(4) { animation-delay: 9s; }
.rotating-text span:nth-child(5) { animation-delay: 12s; }
.rotating-text span:nth-child(6) { animation-delay: 15s; }
.rotating-text span:nth-child(7) { animation-delay: 18s; }
.rotating-text span:nth-child(8) { animation-delay: 21s; }
.rotating-text span:nth-child(9) { animation-delay: 24s; }

@keyframes rotateWords {
  0% { opacity: 0; }
  2% { opacity: 1; }
  10% { opacity: 1; }
  12% { opacity: 0; }
  100% { opacity: 0; }
}

.card h1 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
}

.card h2 {
  color: #fff;
  margin: 32px 0 16px;
  font-size: 24px;
  font-weight: 600;
}

.card h3 {
  color: #fff;
  margin: 24px 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.card p {
  color: #ccc;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.card ul, .card ol {
  color: #ccc;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 16px;
  padding-left: 24px;
  text-align: left;
}

.card li {
  margin-bottom: 4px;
}

.card hr {
  border: none;
  border-top: 1px solid #444;
  margin: 32px 0;
}

.card pre {
  background-color: #1a1a1a;
  color: #0f0;
  padding: 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  text-align: left;
  margin-bottom: 16px;
  overflow-x: auto;
}

.card strong {
  color: #fff;
  font-weight: 700;
}

.disclaimer {
  font-size: 12px;
  color: #555;
  width: 100%;
  margin-bottom: 12px;
}

.tech-stack {
  font-size: 12px;
  color: #555;
  width: 100%;
}

.coffee {
  font-size: 12px;
  color: #555;
  width: 100%;
  margin-top: 16px;
}

.coffee a {
  color: #000;
  font-weight: 600;
  text-decoration: none;
}

.coffee a:hover {
  text-decoration: underline;
}

footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 48px;
}

.tech-stack a {
  color: #000;
  font-weight: 600;
  text-decoration: none;
}

.tech-stack a:hover {
  text-decoration: underline;
}

.cta-card {
  margin: 32px -64px -48px;
  padding: 56px 64px;
  background: linear-gradient(to bottom, #5a82de, #324994);
  border-radius: 0 0 12px 12px;
  text-align: center;
}

.cta-card h2 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

.cta-card p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 0;
}

.cta-card p + p {
  margin-top: 8px;
}

.cta-card .cta-button {
  display: inline-block;
  margin-top: 32px;
  padding: 16px 48px;
  background-color: #fff;
  color: #324994;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-card .cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup:target {
  opacity: 1;
  visibility: visible;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  text-decoration: none;
}

.popup-card {
  position: relative;
  width: 90%;
  max-width: 720px;
  max-height: 90vh;
  background-color: #2e2d2d;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.popup:target .popup-card {
  transform: scale(1) translateY(0);
}

.popup-card-inner {
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.popup:target .popup-card-inner {
  transform: scale(1) translateY(0);
}

.popup-card-inner::-webkit-scrollbar {
  width: 6px;
}

.popup-card-inner::-webkit-scrollbar-track {
  background: #252525;
  border-radius: 5px;
}

.popup-card-inner::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
}

.popup-card-inner::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.popup-card-inner::-webkit-scrollbar-button {
  display: none;
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #444;
  color: #fff;
  text-decoration: none;
  border-radius: 50%;
  font-size: 26px;
  transition: background 0.2s ease;
}

.popup-close:hover {
  background: #555;
}

.popup-close span {
  position: relative;
  top: -2px;
}

.popup-header {
  text-align: center;
  margin-bottom: 32px;
}

.popup-badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #5a82de, #324994);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.popup-header h2 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

.popup-body {
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #444;
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5a82de, #324994);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
}

.step-content h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.step-content p {
  color: #999;
  font-size: 14px;
  margin: 0;
}

.popup-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.popup-cta {
  display: inline-block;
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #5a82de, #324994);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.popup-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(90, 130, 222, 0.4);
}

.popup-back {
  color: #888;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.popup-back:hover {
  color: #fff;
}

.popup-section {
  margin-bottom: 24px;
}

.popup-intro {
  color: #999;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.popup-intro a {
  color: #5a82de;
  text-decoration: none;
}

.popup-intro a:hover {
  text-decoration: underline;
}

.popup-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
}

.popup-subtitle {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 16px;
}

.popup-divider {
  border: none;
  border-top: 1px solid #444;
  margin: 24px 0;
}

.highlight-box {
  background: rgba(90, 130, 222, 0.15);
  border-left: 3px solid #5a82de;
  padding: 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 16px;
}

.highlight-box p {
  margin: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}

.feature-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: #ccc;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #5a82de;
  font-weight: bold;
}

.example-block {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.example-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5a82de;
  margin-bottom: 8px;
}

.example-block p {
  color: #999;
  font-size: 13px;
  margin-bottom: 8px;
}

.example-block pre {
  background: transparent;
  color: #0f0;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

.popup-content .step-content a {
  color: #5a82de;
  text-decoration: none;
}

.popup-content .step-content a:hover {
  text-decoration: underline;
}

.popup-content code {
  background: rgba(90, 130, 222, 0.15);
  color: #5a82de;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
}

.popup-content em {
  color: #aaa;
  font-style: italic;
}

.popup-content p {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.popup-content h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.popup-content ul {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
  padding-left: 20px;
}

.popup-content li {
  margin-bottom: 4px;
}

.popup-content strong {
  color: #fff;
  font-weight: 600;
}

@media (max-width: 768px) {
  body {
    padding: 24px 16px;
  }

  .card {
    margin-bottom: 24px;
    padding: 24px 20px;
  }

  .cta-card {
    margin: 24px 0 0;
    padding: 32px 20px;
    border-radius: 12px;
  }

  footer {
    margin-bottom: 24px;
  }

  .popup-card-inner {
    padding: 24px 20px;
  }
}
