
/* GLOBAL RESET */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: #103d19;
  color: white;
}

/* HEADER */
header {
  background-color: #1f5c2b;
  padding: 20px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 2.5em;
}

nav {
  margin-top: 10px;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
  font-weight: bold;
}

/* DESKTOP SCALING LAYOUT FOR VIDEO PAGE */
.layout-scaler {
  width: 100vw;
  height: 80vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.tutorial-layout{
  width:1400px;
  height:700px;
  transform-origin: bottom center;
  /* before: transform: scale(calc(100vw / 1400)); */
  transform: scale(min(100vw / 1400, 80vh / 700));
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  position:relative;
  gap:40px;
}


/* Pepe */
.pepe-alone {
  height: 60vh;
  width: auto;
  flex-shrink: 0;
  align-self: flex-end;
}

/* TV */
.tv-wrapper {
  position: relative;
  height: 60vh;
  width: auto;
  aspect-ratio: 1.4 / 1;
  flex-shrink: 0;
  align-self: flex-end;
}

.tv-img {
  height: 118%;
  width: auto;
  display: block;
}

.tv-wrapper iframe {
  position: absolute;
  top: 21.6%;
  left: 21.6%;
  width: 35.3%;
  height: 38%;
  border: none;
}

/* Shelf */
.shelf-wrapper{
  left:-20%;
  position:relative;
  width:24vw;              /* predictable box for labels */
  min-width:600px;
  max-width: 200px;
  aspect-ratio:0.72 / 1;   /* close to shelf art */
  flex-shrink:0;
  align-self:flex-end;
}

.shelf-img{
  width:100%;
  height:110%;
  object-fit:contain;
  display:block;
}

/* VHS labels */
.shelf-wrapper button{
  position:absolute;
  left:29%;        /* aligns with label column on the art */
  width:20%;
  height:3%;
  background:#000;
  border:1px solid #A9A9A9;
  border-radius:3px;
  font-family:'Courier New', monospace;
  font-size:clamp(11px, 0.9vw, 15px);
  color:#fff;
  font-weight:700;
  line-height:1.1;
  text-align:center;
  cursor:pointer;
  transition:transform .15s ease, background-color .15s ease;
  white-space:nowrap;
  overflow:hidden;
  text-shadow:0 1px 0 rgba(0,0,0,.6);
}

.shelf-wrapper button:hover{
  background-color:#a0c544;
  transform:scale(1.05);
}


.shelf-wrapper button:hover{
  background-color:#a0c544;
  transform:scale(1.05);
}


/* MOBILE LAYOUT FOR VIDEO PAGE */
.mobile-layout {
  display: none;
}

@media screen and (max-width: 768px) {
.tutorial-layout{

  width:1400px;
  height:700px;
  transform-origin: bottom center;
  transform: scale(min(100vw / 1400, 80vh / 700)); /* <= change */
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  position:relative;
  gap:40px;
}


  .mobile-layout {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
  }

  .mobile-layout iframe {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 9;
    border: none;
  }

  .mobile-links {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-links button {
    padding: 10px;
    font-size: 1rem;
    background-color: #bada55;
    border: 1px solid #000;
    font-family: 'Courier New', monospace;
    color: #103b1f;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .mobile-links button:hover {
    background-color: #a0c544;
  }
}

/* === HOMEPAGE + MEME GENERATOR STYLES === */
.section {
  text-align: left;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.main-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.main-steps .step {
  flex: 1;
  min-width: 300px;
}

.section h2 {
  color: #a1ff59;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
  margin-top: 40px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-img {
  max-width: 400px;
  height: auto;
}

.hero-text {
  max-width: 500px;
}

.hero-text h2 {
  font-size: 2.5em;
  line-height: 1.2;
  color: #a1ff59;
}

.meme-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
}

.meme-gallery img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  margin: 10px 10px 0 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.meme-gallery img:hover {
  transform: scale(1.05);
}

img.meme-thumbnail {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

input[type="text"],
input[type="color"],
select {
  max-width: 600px;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0;
  display: block;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #52c41a;
  background-color: #174a23;
  color: white;
}

.button,
button {
  background-color: #52c41a;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.button:hover,
button:hover {
  background-color: #3a9e17;
}

.pagination-controls {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin: 10px 0;
}

#memeCanvas {
  max-width: 100%;
  height: auto;
  touch-action: none;
}

#donationWidget {
  max-width: 400px;
  margin: 30px 0;
  padding: 15px;
  background-color: #1e4d2b;
  border-radius: 10px;
  border: 2px solid #52c41a;
}

#donationWidget p {
  font-size: 14px;
  color: #ccc;
  margin-top: 10px;
}


/* Fixed 3-column layout on desktop */
@media (min-width: 769px) {
  .meme-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Always 3 columns */
    gap: 20px;
    justify-content: center;
    padding: 10px;
  }

  .meme-gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid white;
    display: block;
  }
}



/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
  .section {
    padding: 15px;
  }

  .meme-gallery {
    justify-content: center;
  }

  .meme-gallery img {
    width: 120px;
  }

  input[type="text"],
  input[type="color"],
  select {
    max-width: 100%;
  }

  .pagination-controls {
    justify-content: center;
  }

  img.meme-thumbnail {
    width: 90%;
    max-width: 300px;
  }
}

