/* 1. Base Reset & Layout */
html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #ffffff;
    color: #000000;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    /* Improves readability and prevents iOS font scaling issues */
    -webkit-text-size-adjust: 100%;
}

/* 2. Content Wrapper - Sticky Footer Logic */
.content-wrap {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Changed to 100% to control inner padding better */
    padding: 20px 15px; /* Added horizontal padding for mobile safety */
    box-sizing: border-box;
}

/* 3. Typography - Scalable Header */
h1.thumbnail-link2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: clamp(20px, 8vh, 60px); /* Dynamic top margin */
    margin-bottom: 20px;
    border: 1px solid #000;
    box-shadow: 4px 4px 0 #000000, 8px 8px 0 #FF10F0;
    padding: 10px 20px;
    font-size: 2.5rem; /* Desktop size */
    max-width: 100%;
    box-sizing: border-box;
}

/* 4. Form Elements */
input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    font-size: 16px; /* Prevents auto-zoom on mobile */
    border-radius: 8px;
    border: 2px solid #000000;
    margin-bottom: 15px; /* Increased spacing */
    box-sizing: border-box;
    outline: none;
}

button {
    font-size: 1rem;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    background-color: #000000;
    color: #ffffff;
    transition: background 0.3s, color 0.3s;
    /* Ensure button is easy to tap on mobile */
    min-height: 48px;
    width: auto;
    min-width: 120px;
}

button:hover {
    background-color: #ffffff;
    color: #000000;
}

/* 5. Note Section */
.note {
    font-size: 0.95rem;
    margin: 20px auto;
    width: 100%;
    max-width: 600px;
    line-height: 1.6;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #000000;
    box-sizing: border-box;
    text-align: center;
}
#loading {
  display: none;       /* hide by default */
  margin-top: 15px;    /* spacing from previous element */
  color: #000000;      /* text color */
  font-weight: 500;    /* optional, for better readability */
  font-size: 1rem;     /* optional, adjust as needed */
}

/* --- RESPONSIVE BREAKPOINTS --- */

/* Tablet & Mobile (under 600px) */
@media (max-width: 600px) {
    h1.thumbnail-link2 {
        flex-direction: column;
        font-size: 1.75rem; /* Slightly larger than before for better visibility */
        padding: 15px;
        gap: 5px;
    }

    .content-wrap {
        padding-top: 10px;
    }

    input, button {
        width: 100%; /* Full width for easier interaction */
        max-width: 100%;
    }
}

/* Small Phones (under 360px) */
@media (max-width: 360px) {
    h1.thumbnail-link2 {
        font-size: 1.4rem;
    }
    
    .note {
        font-size: 0.85rem;
        padding: 10px;
    }
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 20px;
}

/* 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;
}