/* PinSystem - Fresh red & black theme */
:root {
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --red: #dc2626;
  --red-hover: #ef4444;
  --red-glow: rgba(220, 38, 38, 0.35);
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --border: #262626;
  --radius: 12px;
  --radius-lg: 16px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated background – slow drift so the black feels alive */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-dark);
}

body::after {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: -1;
  background:
    radial-gradient(
      ellipse 90% 70% at 20% 30%,
      rgba(180, 30, 30, 0.12) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 80% 90% at 85% 70%,
      rgba(120, 20, 20, 0.1) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse 70% 60% at 50% 50%,
      rgba(220, 38, 38, 0.06) 0%,
      transparent 55%
    );
  animation: bg-drift 18s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bg-drift {
  0%, 100% {
    transform: scale(1) translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  33% {
    transform: scale(1.08) translate(3%, -2%) rotate(1deg);
    opacity: 0.95;
  }
  66% {
    transform: scale(1.05) translate(-2%, 2%) rotate(-0.5deg);
    opacity: 1;
  }
}

/* Layout */
.site-header {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

/* Main title – two words, two red shades + glow */
.site-title {
  margin: 0;
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  filter: drop-shadow(0 0 20px var(--red-glow)) drop-shadow(0 0 40px rgba(220, 38, 38, 0.2));
}

.site-title-pin {
  color: #fca5a5;
  text-shadow: 0 0 16px rgba(252, 165, 165, 0.6);
}

.site-title-system {
  color: #b91c1c;
  text-shadow: 0 0 16px rgba(185, 28, 28, 0.6);
}

@media (min-width: 600px) {
  .site-title {
    font-size: 4rem;
    letter-spacing: 0.15em;
  }
}

/* Subtitle – bigger, coloured, shimmer */
.site-subtitle {
  margin: 0.85rem 0 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  background: linear-gradient(
    90deg,
    #a3a3a3 0%,
    #fca5a5 25%,
    #f5f5f5 50%,
    #fca5a5 75%,
    #a3a3a3 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-subtitle 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(252, 165, 165, 0.3));
}

@keyframes shimmer-subtitle {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}

@media (min-width: 600px) {
  .site-subtitle {
    font-size: 1.4rem;
  }
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* How To video section */
.demo-video-section {
  margin-bottom: 2rem;
}
.demo-video-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}
.demo-video-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.demo-video {
  display: block;
  width: 100%;
  max-height: 360px;
  vertical-align: middle;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Generate Pin hero title – red, large, centered, shimmer */
.section-title-hero {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  letter-spacing: 0.08em;
  background: linear-gradient(
    90deg,
    #7f1d1d 0%,
    var(--red) 20%,
    #fca5a5 40%,
    var(--red) 60%,
    #fca5a5 80%,
    var(--red) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer-red 2.5s ease-in-out infinite;
}

@keyframes shimmer-red {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}

@media (min-width: 600px) {
  .section-title-hero {
    font-size: 2.5rem;
  }
}

/* Generate Pin buttons */
.pin-buttons {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.pin-btn {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pin-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--red);
  box-shadow: 0 0 24px var(--red-glow);
  color: var(--text);
}

.pin-btn:focus {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.pin-btn-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--bg-dark);
  flex-shrink: 0;
}

.pin-btn-text {
  flex: 1;
}

.pin-btn-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.pin-btn-title {
  margin: 0;
  font-size: 1.05rem;
}

.pin-btn-arrow {
  color: var(--red);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Social / Community */
.social-section {
  margin-bottom: 2.5rem;
}

.social-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}

.social-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--red);
  color: var(--text);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Install guides */
.guides-section {
  margin-bottom: 2rem;
}

.guides-block {
  margin-bottom: 1.5rem;
}

.guides-block h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--red);
  margin: 0 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.guide-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-links li {
  margin-bottom: 0.5rem;
}

.guide-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.2s, border-color 0.2s;
}

.guide-links a:hover {
  background: var(--bg-card-hover);
  border-color: var(--red);
  color: var(--text);
}

.guide-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  padding-left: 0.75rem;
}

.site-title-link {
  color: inherit;
  text-decoration: none;
}
.site-title-link:hover {
  color: inherit;
  opacity: 0.9;
}

/* Guide page (e.g. Stream Army Repo) */
.guide-page {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}
.guide-back {
  margin-bottom: 1.5rem;
}
.guide-back a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.guide-back a:hover {
  color: var(--red);
}
.guide-page .section-title {
  margin-bottom: 1rem;
}
.guide-intro,
.guide-steps,
.guide-outro {
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.guide-steps-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--red);
  margin: 0 0 1rem;
}
.guide-step-list {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
.guide-step-list li {
  margin-bottom: 0.75rem;
}
.guide-url {
  color: var(--red);
  word-break: break-all;
}
.guide-tip {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.guide-tip a {
  color: var(--red);
}
.guide-outro p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Modal popup (e.g. SportsZone install guide) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay.modal-open {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  cursor: pointer;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.modal-close:hover {
  color: var(--text);
  background: var(--bg-card-hover);
}
.modal-body {
  padding: 1.5rem 1.75rem 2rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red);
  margin: 0 2rem 0.75rem 0;
  line-height: 1.3;
}
.modal-body p {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.modal-body ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}
.modal-body li {
  margin-bottom: 0.35rem;
}
.modal-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}
.modal-download {
  margin: 0.75rem 0 !important;
}
.modal-download a {
  color: var(--red);
  word-break: break-all;
}
.modal-footer {
  font-size: 0.85rem;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

/* Unlock page */
.unlock-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.unlock-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.unlock-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.unlock-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.unlock-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-dark);
  color: var(--text);
  margin-bottom: 1rem;
}

.unlock-form input[type="text"]:focus {
  outline: none;
  border-color: var(--red);
}

.unlock-form .btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.unlock-form .btn-primary:hover {
  background: var(--red-hover);
}

.unlock-msg {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.unlock-msg.error {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

.unlock-msg.success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.unlock-stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.unlock-stores img {
  height: 40px;
  width: auto;
  display: block;
}

/* Pin result page */
.pin-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.pin-result-card h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.pin-result-card .pin-value {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--red);
  margin: 0;
  font-family: ui-monospace, monospace;
}

.pin-result-card .pin-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--red);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--red-hover);
  text-decoration: underline;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (min-width: 600px) {
  .pin-buttons {
    grid-template-columns: 1fr;
  }
  .pin-btn {
    padding: 1.25rem 1.5rem;
  }
  .pin-btn-img {
    width: 64px;
    height: 64px;
  }
}
