:root {
  --c1: #000000;
  --c4: #ffffff;
}
/* Critical for Footer Positioning */
html, body {
  height: 100%;
  margin: 0;
  /* Prevents horizontal scrolling on mobile */
  overflow-x: hidden; 
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  background: #ffffff;
  color: #000000;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Ensure text is readable on mobile */
  -webkit-font-smoothing: antialiased;
}

.content-wrapper {
  flex: 1 0 auto;
  padding: 20px; /* Reduced mobile padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

/* Heading: Responsive sizing using clamp or media queries */
h1.gradient-text.thumbnail-link2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid #000;
  box-shadow: 4px 4px 0 #000000, 8px 8px 0 #FF10F0;
  padding: 10px 20px;
  font-size: 2.5rem; /* Desktop default */
  font-weight: 700;
  max-width: 90%; /* Keeps it from hitting screen edges */
  word-wrap: break-word;
}

.input-wrap {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 15px; /* Increased gap for easier tapping */
  align-items: center;
}

input[type="text"] {
  width: 100%;
  padding: 12px;
  font-size: 16px; /* Prevents iOS auto-zoom (must be at least 16px) */
  border-radius: 8px;
  border: 2px solid #000000;
  outline: none;
  box-sizing: border-box;
}

.actions {
  display: flex;
  flex-wrap: wrap; /* Allows buttons to stack if they don't fit */
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}
#btnGet, #btnReset, #btnCopy {
  font-size: 1rem;
  border: 2px solid #000000;
  border-radius: 8px;
  padding: 12px 18px;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}
#btnCopy { background-color: #fff; color: #000; display: none; }
#btnGet:hover, #btnReset:hover { background-color: #fff; color: #000; }
#btnCopy:hover { background-color: #000; color: #fff; }

#outputBox {
  display: none;
  width: 100%;
  max-width: 600px; /* Limits width on desktop */
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #000000;
  margin-top: 20px;
  box-sizing: border-box;
}

.note {
  font-size: 0.95rem;
  margin-bottom: 20px;
  width: 100%;
  max-width: 600px;
  line-height: 1.5;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid #000000;
  box-sizing: border-box;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 20px;
  /* ADD THIS LINE BELOW */
  margin-inline: auto; 
}

/* Sections */
section {
  margin-bottom: 24px;
  width: 100%;
}

/* Lists */
ul {
  list-style-position: inside;
  padding: 0;
}

/* Links */
a {
  text-decoration: none;
  color: #0077ff;
}

a:hover {
  text-decoration: underline;
}

/* --- Responsive Breakpoints --- */

/* Tablet (Small Desktop / iPad) */
@media (max-width: 1024px) {
  .content-wrapper {
    padding: 30px 20px;
  }
}

/* Mobile (Phones) */
@media (max-width: 600px) {
  h1.gradient-text.thumbnail-link2 {
    font-size: 1.5rem; /* Smaller font for mobile */
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }
  
  .content-wrapper {
    padding: 20px 15px;
  }

  .actions {
    flex-direction: row; /* Keep buttons side-by-side or stack */
  }
  
  #btnGet, #btnReset, #btnCopy {
    padding: 14px 10px; /* Slightly taller for touch targets */
    font-size: 0.9rem;
  }
}

/* Very Small Screens (iPhone SE / Fold) */
@media (max-width: 350px) {
  h1.gradient-text.thumbnail-link2 {
    font-size: 1.2rem;
  }
  
  .actions {
    flex-direction: column; /* Stack buttons vertically on tiny screens */
    width: 100%;
  }

  #btnGet, #btnReset, #btnCopy {
    max-width: 100%;
  }
}