:root {
    --site-text-color: #ffffff; /* Example: White */
    --pale-violet: #e6e6fa; /* Example: Lavender */
    --dark-violet: #4b0082; /* Example: Indigo */
}

/* Prevent Firefox/non-webkit browsers from auto-enlarging text on mobile */
html {
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

/* Hide Download button on touch devices (Windows installer is pointless on mobile) */
@media (hover: none) and (pointer: coarse) {
    .download-btn {
        display: none;
    }
}

.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* This adds a 10px gap between images */
    justify-content: center; /* This will center the images within the container */
    margin-bottom: 50px;
}

.image-wrapper {
    position: relative;
    /*border: 1px solid #ccccff;*/
    display: inline-block;
    margin: 5px;
    text-align: center;
}

.image-wrapper img {
    display: block;
    margin-bottom: 5px;
}

.delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #3200a6;
    color: white;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    font-size: 12px;
}

.restart-button {
    background: green;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.placeholder {
    width: 256px;
    height: 256px;
    border: 2px dashed #d3d3d3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #d3d3d3;
}

.polling-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 16px;
    color: #d3d3d3;
}

.clear-storage-button {
    color: white;
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
    border-radius: 8px;
    opacity: 0.85;
}

.error-box {
    background-color: red;
    color: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid white;
    margin-bottom: 20px;
    text-align: center;
}
.form-container {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 20px;
}

.image-wrapper-block {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

input[type="email"], input[type="password"] {
    background-color: #ccccff;
    color: black;
}


.warnbox {
    display: inline-block; /* Ensures the box is only as wide as needed */
    padding: 10px; /* Adds spacing inside the box */
    border: 3px solid red; /* Red border */
    border-radius: 8px; /* Rounded corners */
    background-color: #cccccc; /* White background */
    color: black; /* Black text */
    text-align: center; /* Centers text inside */
    margin: 0 auto; /* Centers the box itself */
}

.warnbox p {
    margin: 0; /* Remove default margins for better spacing */
}

.warnbox a {
    color: blue; /* Standard hyperlink color */
    text-decoration: underline; /* Underlined for clarity */
}

.infobox1 {
    display: inline-block; /* Ensures the box is only as wide as needed */
    padding: 10px; /* Adds spacing inside the box */
    border: 3px solid #8968CD; /* Indigo border */
    border-radius: 8px; /* Rounded corners */
    background-color: #4b0082; /* Purple background */
    color: white; /* text */
    text-align: center; /* Centers text inside */
    margin: 0 auto; /* Centers the box itself */
}


/* Simple, high-contrast form styling for dark/white sites */
.form2 {
  background: #aaaacc;
  color: #190A4F;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #190A4F;
  border-radius: 6px;
  line-height: 1.4;
}

.form2::placeholder {
  color: #4b3ea0; /* readable hint text */
  opacity: 1;
}

.form2:focus {
  outline: 2px solid #190A4F;
  outline-offset: 2px;
}

/* ---- End User Agreement row: sits directly under the Generate button ---- */
.eua-row {
    padding: 0 1.25rem;          /* lines up with the prompt row's p-5 */
    text-align: right;
    font-size: 0.8rem;
    line-height: 1.6;
}

.eua-tick {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0 0.35rem 0.4rem;
    white-space: nowrap;
    cursor: pointer;
}

.eua-tick input {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
}

.eua-row.eua-missing .eua-tick input {
    outline: 3px solid #d97706;
    outline-offset: 2px;
}

.eua-error {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.4rem 0.7rem;
    border: 2px solid #d97706;
    border-radius: 6px;
    background-color: #fff3cd;
    color: #4a2f00;
    font-weight: 600;
    text-align: left;
}

.eua-error[hidden] {
    display: none;
}

/* ---- Generation in progress ---- */
.ms-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: ms-spin 0.9s linear infinite;
}

.ms-spinner[hidden] {
    display: none;
}

.ms-generating {
    width: 100%;
    padding: 1.5rem 1rem;
    text-align: center;
}

.ms-generating .ms-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 0.3rem;
    margin-bottom: 0.75rem;
}

@keyframes ms-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .ms-spinner { animation-duration: 3s; }
}

/* ---- How it Works bullets (was a private <style> block in how.php) ---- */
.visibullet ul {
    list-style-type: disc;
    padding-left: 20px;
}

.visibullet li {
    margin-bottom: 8px;
}

/* ---- reCAPTCHA: the badge is hidden on phones only, where it covered page content.
        Google allows that provided the notice is shown instead - it is in the footer. ---- */
@media (max-width: 767px) {
    .grecaptcha-badge {
        visibility: hidden;
    }
}

.recaptcha-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.7;
}

.recaptcha-note a {
    text-decoration: underline;
}

/* ---- 403 / 404 page ---- */
.ms-error-code {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.35;
}

.ms-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0 3rem;
}
