:root {
  --purple-dark: #523474;
  --blue-accent: #61d8e6;
  --beige-accent: #a49079;
  --cream-bg: #ddd5c9;
  --indigo: #3c3678;
  --logo-blue: #50688f;

  /* Glass button palette */
  --btn-bg: rgba(80, 104, 143, 0.28);
  --btn-border: rgba(97, 216, 230, 0.22);
  --btn-hover-bg: rgba(97, 216, 230, 0.22);
  --btn-hover-text: #ffffff;

  /* Contact button */
  --contact-btn-bg: rgba(60, 54, 120, 0.50);
  --contact-btn-hover: rgba(82, 52, 116, 0.65);

  --subtitle: #a49079;
  --title: #61d8e6;
}

/* ── Base white text for interactive elements ── */
.email-under-logo a,
.guidebook-link,
.link-btn,
.newsletter button,
.contact-btn {
  color: #fff !important;
}

/* ── Body & Background ── */
body {
  font-family: 'Inter', Arial, sans-serif;
  background: var(--purple-dark) url("Backgroud - GitHub Links.png") no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  min-height: 100vh;
  transition: background 0.3s;
}

/* ── Container ── */
.container {
  max-width: 460px;
  margin: 32px auto;
  padding: 32px 18px 16px 18px;
  background: transparent;
  border-radius: 22px;
  box-shadow: none;
  text-align: center;
  transition: background 0.3s;
}

/* ── Banner ── */
.banner {
  margin-bottom: 16px;
}
.banner-img {
  width: 100%;
  max-width: 420px;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ── Logo — smaller, top ── */
.logo {
  width: 72px;
  margin-bottom: 12px;
  border-radius: 50%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ── Email under logo (hidden, kept for safety) ── */
.email-under-logo {
  display: none;
}

/* ── Main title ── */
.main-title {
  font-family: 'Arimo', Arial, sans-serif;
  font-size: 16pt;
  font-weight: bold;
  color: var(--blue-accent);
  margin: 14px 0 10px 0;
  line-height: 1.25;
  text-align: center;
}

/* ── Tagline — handwriting ── */
.tagline {
  font-family: 'Caveat', cursive;
  font-size: 18pt;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  margin: 4px 0 14px 0;
  letter-spacing: 0.02em;
}

/* ── Subtitles ── */
.subtitle {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13pt;
  font-weight: bold;
  color: var(--beige-accent);
  margin: 0 0 22px 0;
  line-height: 1.5;
}
.subtitle2 {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13pt;
  font-weight: bold;
  color: var(--beige-accent);
  margin: 24px 0 20px 0;
  line-height: 1.5;
}

/* ── Banner — moved to bottom, top breathing space ── */
.banner {
  margin-top: 28px;
  margin-bottom: 16px;
}
.guidebook-section {
  margin-bottom: 24px;
}
.guidebook-link {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12pt;
  font-weight: 600;
  background: var(--btn-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--btn-border);
  padding: 9px 32px;
  border-radius: 9px;
  text-decoration: none;
  display: inline-block;
  margin-top: 7px;
  margin-bottom: 7px;
  transition: background 0.18s, border-color 0.18s, transform 0.14s, box-shadow 0.18s;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}
.guidebook-link:hover,
.guidebook-link:focus {
  background: var(--btn-hover-bg);
  border-color: rgba(97, 216, 230, 0.50);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(97, 216, 230, 0.16), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* ── Section titles ── */
.section-title {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14pt;
  font-weight: 700;
  color: var(--blue-accent);
  margin-top: 24px;
  margin-bottom: 14px;
  text-align: left;
}

/* ── Link button grid ── */
.links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}
.links.two-col {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.links.two-col .link-btn {
  width: 48%;
  min-width: 170px;
  margin-bottom: 0;
}

/* ── Link buttons – Glassmorphism ── */
.link-btn {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 12pt;
  font-weight: 600;
  background: var(--btn-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--btn-border);
  text-decoration: none;
  padding: 11px 0;
  border-radius: 13px;
  display: inline-block;
  transition: background 0.18s, border-color 0.18s, transform 0.14s, box-shadow 0.18s;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  letter-spacing: 0.01em;
}
.link-btn:hover,
.link-btn:focus {
  background: var(--btn-hover-bg);
  border-color: rgba(97, 216, 230, 0.50);
  color: #fff !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(97, 216, 230, 0.18), inset 0 1px 0 rgba(255,255,255,0.10);
}

/* ── Video section wrapper ── */
.video-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* Glass container housing the video */
.video-glass-container {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(190, 190, 230, 0.18);
  border-radius: 18px;
  padding: 10px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  position: relative;
  overflow: hidden;
}

/* Iframe wrapper (kept for reference, not used) */
.video-frame-wrapper { display: none; }

/* ── Custom in-video player controls ── */
#mainVideo {
  display: block;
  background: #0a0515;
}

.player-controls {
  display: none; /* toggled by JS */
  flex-direction: column;
  gap: 5px;
  background: rgba(18, 10, 42, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(97, 216, 230, 0.10);
  border-radius: 0 0 11px 11px;
  padding: 7px 10px 8px;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s;
}
.progress-track:hover {
  height: 6px;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--blue-accent);
  border-radius: 2px;
  transition: width 0.1s linear;
  pointer-events: none;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.80);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}
.ctrl-btn:hover {
  background: rgba(97, 216, 230, 0.18);
  color: #fff;
}

.time-display {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.70rem;
  color: rgba(255, 255, 255, 0.50);
  flex: 1;
  text-align: center;
  letter-spacing: 0.03em;
  user-select: none;
}

.mute-btn {
  margin-left: auto;
}

/* ── Play / Stop pill button (below container) ── */
.video-controls {
  margin-top: 9px;
  display: flex;
  justify-content: center;
}
.video-toggle-btn {
  background: rgba(80, 104, 143, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(97, 216, 230, 0.30);
  color: #fff;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.80rem;
  font-weight: 600;
  padding: 5px 22px;
  border-radius: 20px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.18s, border-color 0.18s, transform 0.14s, box-shadow 0.18s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.20);
}
.video-toggle-btn:hover {
  background: rgba(97, 216, 230, 0.24);
  border-color: rgba(97, 216, 230, 0.52);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(97, 216, 230, 0.16);
}
/* Stop state — subtle warm red tint */
.video-toggle-btn.stop-mode {
  border-color: rgba(255, 110, 110, 0.40);
  background: rgba(160, 50, 50, 0.30);
}
.video-toggle-btn.stop-mode:hover {
  background: rgba(200, 70, 70, 0.38);
  border-color: rgba(255, 110, 110, 0.58);
}

/* Canva credit link under video */
.video-credit {
  font-size: 0.80rem;
  color: rgba(255,255,255,0.50);
  margin-top: 7px;
  text-align: center;
}
.video-credit a {
  color: var(--blue-accent);
  text-decoration: none;
}
.video-credit a:hover {
  text-decoration: underline;
}

/* ── Newsletter – glass card ── */
.newsletter {
  margin: 13px 0;
  padding: 12px 10px;
  background: rgba(60, 54, 120, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(97, 216, 230, 0.13);
  border-radius: 11px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.05);
}
.newsletter h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--blue-accent);
}
.newsletter input[type="email"] {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid rgba(97, 216, 230, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  margin-right: 7px;
  width: 62%;
}
.newsletter input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.40);
}
.newsletter button {
  background: rgba(97, 216, 230, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(97, 216, 230, 0.36);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.17s, border-color 0.17s;
  padding: 8px 14px;
  color: #fff !important;
}
.newsletter button:hover,
.newsletter button:focus {
  background: rgba(97, 216, 230, 0.42);
  border-color: rgba(97, 216, 230, 0.55);
}

/* ── Contact button ── */
.contact {
  margin: 11px 0;
}
.contact-btn {
  background: var(--contact-btn-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(97, 216, 230, 0.18);
  text-decoration: none;
  padding: 11px 34px;
  border-radius: 10px;
  font-size: 12pt;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 600;
  transition: background 0.17s, border-color 0.17s, transform 0.14s, box-shadow 0.18s;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.06);
  display: inline-block;
}
.contact-btn:hover,
.contact-btn:focus {
  background: var(--contact-btn-hover);
  border-color: rgba(97, 216, 230, 0.36);
  transform: translateY(-2px);
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(97, 216, 230, 0.12);
}

/* ── QR section ── */
.qr-section {
  margin: 18px 0 6px 0;
}
#qrCode {
  margin: 0 auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(146,168,209,0.10);
}

/* ── Footer ── */
footer {
  margin-top: 18px;
  font-size: 0.97rem;
  color: #aaa;
  background: transparent;
}
footer a {
  color: var(--blue-accent);
  text-decoration: underline;
}

/* ── Stats modal – glass ── */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-content {
  background: rgba(36, 26, 66, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(97, 216, 230, 0.18);
  margin: 10% auto;
  padding: 30px;
  border-radius: 18px;
  width: 88%;
  max-width: 430px;
  position: relative;
  color: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.40);
}
.close {
  color: rgba(255,255,255,0.50);
  position: absolute;
  right: 17px;
  top: 15px;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.15s;
}
.close:hover {
  color: var(--blue-accent);
}

/* ── Video placeholder (kept for safety) ── */
.video-placeholder {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 16/9;
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--blue-accent);
  border-radius: 12px;
  color: var(--blue-accent);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  background: #362254;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .container {
    padding: 10px 3px 6px 3px;
    max-width: 99vw;
  }
  .banner-img {
    max-width: 99vw;
  }
  .links.two-col .link-btn {
    width: 100%;
    min-width: unset;
  }
  .main-title {
    font-size: 1.25rem;
  }
  .video-glass-container {
    max-width: 99vw;
  }
}
