body {
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 0;
  color: #00FF00;
  background-color: #000;
  overflow-x: hidden;
  position: relative;
}

canvas#matrix {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

/* First-daily-visit intro splash — the black backdrop appears instantly
   and stays fully solid (hiding the page underneath, including the matrix
   canvas and header) for the whole sequence; only the logo itself fades
   in/holds/fades out. Hidden via display:none by default so repeat
   same-day visits never even paint it for a frame. */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #000;
}
.intro-splash.active {
  display: flex;
}
.intro-splash-logo {
  /* Natural/full size by default — only constrained if the viewport is too
     small to fit it, so it never overflows or gets clipped on a phone. */
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 80vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.intro-splash-logo.show {
  opacity: 1;
}

a { color: #00FF00; text-decoration: none; }
a:hover { color: #00AA00; }

/* Feature Card Animation */
.feature-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  border: 1px solid #00FF00;
  background-color: #000000;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
}
.feature-card.show {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 0 20px #00FF00;
}
.feature-card:hover {
  transform: scale(1.03);
  border-color: #00AA00;
}

/* Hero Gradient */
.hero-gradient {
  background: linear-gradient(180deg, #003300 0%, #000000 100%);
  color: #00FF00;
  text-align: center;
  padding: 3rem 1.25rem;
}
@media (min-width: 640px) {
  .hero-gradient { padding: 5rem 1.5rem; }
}

/* Hero Button */
.hero-btn {
  background-color: #000000;
  border: 2px solid #00FF00;
  color: #00FF00;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out, background-color 0.3s, color 0.3s;
  padding: 0.75rem 2rem;
  border-radius: 1rem;
  font-weight: bold;
  display: inline-block;
}
.hero-btn.show {
  transform: scale(1);
  opacity: 1;
  animation: pulse 2s infinite alternate;
}
.hero-btn:hover {
  background-color: #00FF00;
  color: #000000;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Herz-Animation */
.heart {
  display: inline-block;
  animation: beat 1s infinite alternate;
}
@keyframes beat {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Header */
header {
  background-color: #000;
  border-bottom: 2px solid #00FF00;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1rem 0;
}
header a, header select { color: #00FF00; }
header a:hover { color: #00AA00; }

/* Footer */
footer {
  background-color: #000;
  border-top: 2px solid #00FF00;
  color: #00FF00;
  text-align: center;
  padding: 2rem 1rem;
}

/* Footer credits row (softify.pro attribution) — muted so it doesn't
   compete with the copyright line above it; ".pro" stays a fixed teal-green
   in both themes, matching the reference site's styling. */
.footer-credits {
  font-family: 'Courier New', monospace !important;
}
.footer-credits p {
  font-family: 'Courier New', monospace !important;
  /* No color/size override here on purpose — this now inherits the exact
     same styling as #footerCopy above it (both matrix and light theme),
     so the two lines look identical, just like the copyright line. */
}
.footer-credit-link {
  color: inherit;
  font-family: 'Courier New', monospace !important;
  text-decoration: none;
}
.footer-credit-link:hover {
  text-decoration: underline;
}
.pro-green {
  color: #39e6a4; /* sampled directly from softify.pro's actual logo/heading color */
  font-weight: 600;
  font-family: 'Courier New', monospace !important;
}

/* Section Titles — fluid size so long translated titles don't wrap badly
   on phones, while staying identical to the original 2.5rem on desktop */
h3 {
  color: #00FF00;
  font-size: clamp(1.5rem, 5.5vw, 2.5rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.25;
  padding: 0 0.25rem;
}
@media (min-width: 640px) {
  h3 { margin-bottom: 2rem; }
}

/* Offset in-page anchor jumps so a section's heading lands below the
   sticky header instead of underneath it. Applies to both native
   fragment navigation (#anchor in the URL) and the JS-driven re-snap
   in app.js. */
#features, #how, #gallery, #donations, #download {
  scroll-margin-top: 84px;
}
@media (max-width: 639px) {
  #features, #how, #gallery, #donations, #download {
    scroll-margin-top: 64px;
  }
}

/* Download Buttons */
.download-btn {
  background-color: #000000;
  border: 2px solid #00FF00;
  color: #00FF00;
  padding: 0.75rem 2rem;
  border-radius: 1rem;
  font-weight: bold;
  transition: all 0.3s;
  display: inline-block;
  margin-top: 0.5rem;
}
.download-btn:hover { background-color: #00FF00; color: #000000; }

/* Small inline action links (PayPal / Revolut inside the donations feature
   card) — same visual language as .download-btn but sized for inline use,
   and stacked full-width on phones so they're easy to tap. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background-color: #000000;
  border: 2px solid #00FF00;
  color: #00FF00;
  padding: 0.5rem 1.1rem;
  border-radius: 0.75rem;
  font-weight: bold;
  margin: 0.35rem 0.25rem 0;
  transition: all 0.3s;
}
.btn:hover { background-color: #00FF00; color: #000000; }
body.light .btn { border-color: #007bff; color: #004085; }
body.light .btn:hover { background-color: #007bff; color: #fff; }
@media (max-width: 640px) {
  .btn { display: flex; width: 100%; margin-left: 0; margin-right: 0; }
}

/* Download section top divider — green in matrix mode (default),
   blue in the plain/light theme to match the rest of that theme's palette. */
.download-section-divider {
  border-color: #00FF00;
}
body.light .download-section-divider {
  border-color: #007bff;
}

/* Toggle Button — blue rounded button = switch OUT of matrix (to plain),
   turns red once in plain mode = switch BACK into matrix.
   Fixed pill shape sized as a comfortable touch target (44x28 min). */
.theme-toggle {
  background-color: #007bff;
  color: #fff;
  width: 44px;
  height: 28px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}
.theme-toggle:hover {
  background-color: #0056b3;
}

/* ---- Mobile hamburger button + slide-down nav (only visible < 640px) ---- */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  border: 2px solid #00FF00;
  border-radius: 0.5rem;
  cursor: pointer;
}
.mobile-menu-btn .hamburger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: #00FF00;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
body.light .mobile-menu-btn { border-color: #007bff; }
body.light .mobile-menu-btn .hamburger-bar { background-color: #004085; }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav a {
  padding: 0.65rem 0.25rem;
  border-top: 1px solid rgba(0, 255, 0, 0.15);
  font-size: 1rem;
}
body.light .mobile-nav a {
  border-top-color: rgba(0, 64, 133, 0.15);
}
@media (min-width: 640px) {
  /* Desktop always uses the inline nav; make sure the mobile one can
     never accidentally show even if JS hasn't run yet. */
  .mobile-nav { display: none !important; }
}

/* ---- Light (plain / non-matrix) Theme ---- */
body.light {
  color: #000;
  background-color: #f4f4f4;
}
body.light .theme-toggle {
  background-color: #ff0000; /* red */
  color: #fff;
}
body.light header {
  background-color: #e9e9e9;
  border-color: #007bff;
}
body.light footer {
  background-color: #e9e9e9;
  color: #000;
  border-color: #007bff;
}
body.light .hero-gradient {
  background: linear-gradient(180deg, #d0eaff 0%, #f4f4f4 100%);
  color: #004085;
}
body.light .feature-card {
  background-color: #fff;
  border-color: #007bff;
  color: #000;
  box-shadow: 0 0 10px #007bff55;
}
body.light h3 { color: #004085; }
body.light a { color: #004085; }
body.light .download-btn {
  border-color: #007bff;
  color: #004085;
}
body.light .download-btn:hover {
  background-color: #007bff;
  color: white;
}

/* ---------------------- IMAGE VIEWER / CAROUSEL ---------------------- */
.viewer {
  max-width: 980px;
  margin: 2rem auto;
  position: relative;
  padding: 1rem;
}

.viewer .stage {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,255,0,0.12);
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.viewer img.slide {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: none;
  transition: opacity .35s ease, transform .35s ease;
}
.viewer img.slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.viewer .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(0,255,0,0.2);
  color: #00FF00;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
}
.viewer .nav-btn:hover {
  background: rgba(0,255,0,0.12);
  color: #000;
}
.viewer .nav-btn.left { left: 12px; }
.viewer .nav-btn.right { right: 12px; }

.viewer .dots {
  display:flex;
  gap:.5rem;
  justify-content:center;
  margin-top:.75rem;
}
.viewer .dots button {
  width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,0.08);border:1px solid rgba(0,255,0,0.12);cursor:pointer;
  /* Visual dot stays small, but the tappable area is a comfortable 44px on touch screens */
  position: relative;
}
.viewer .dots button::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
}
.viewer .dots button.active { background:#00FF00; border-color:#00AA00; }

/* thumbnails (optional small row) */
.viewer .thumbs {
  display:flex;
  gap:.5rem;
  justify-content:center;
  margin-top:.75rem;
  flex-wrap:wrap;
}
.viewer .thumbs img {
  width:72px;height:48px;object-fit:cover;border-radius:.5rem;border:2px solid rgba(0,255,0,0.08);cursor:pointer;
}
.viewer .thumbs img.active { border-color:#00FF00; box-shadow:0 0 10px rgba(0,255,0,0.12); }

/* responsive tweaks */
@media (max-width:640px){
  .viewer { padding: 0.5rem; margin: 1.5rem auto; }
  .viewer .stage { min-height: 220px; }
  .viewer .nav-btn { width:44px;height:44px; }
  .viewer img.slide { max-height:45vh; }
  .viewer .thumbs img { width:56px; height:38px; }
}
/* --------------------------------------------------------------------- */
