/*@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji');
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: sans-serif;
  line-height: 1.6;
  background: #fafafa;
  color: #333;
  padding: 20px;
  margin: 0 auto;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 6px;
}

header h1 {
  font-size: 1.4rem;
  color: #222;
  font-weight: 600;
}

/* Controls box */
#controls {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  max-width: 400px;
  margin: 0 auto 6px auto;
}

#controls label {
  display: block;
  font-weight: 500;
  margin-bottom: 0px;
  margin-top:6px;
  color: #444;
}

#controls input[type="file"],
#controls input[type="number"] {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

#controls button {
  margin-top: 15px;
  width: 100%;
  background: #0078d7;
  color: white;
  border: none;
  padding: 12px 0px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#controls button:hover {
  background: #005fa3;
}
#controls select {
  cursor:pointer;
  width: 100%;
  padding: 10px;
  margin-bottom: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

/* Result section */
h2 {
  text-align: center;
  margin-bottom: 6px;
  font-size: 1.5rem;
  color: #333;
}

#resultBox {
  font-size: 12px;
  font-family: monospace;
  /*font-family: 'Noto Color Emoji', 'Segoe UI Emoji', sans-serif;*/
  background: #111; /* dark */
  color: #f5f5f5;   /* light text */
  border: 1px solid #333;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  max-width: 800px;
  min-height: 200px;
  max-height: 10000px;
  margin: 0 auto 40px auto;
  text-align: center;  
  white-space: pre;      /* respects \n for line breaks */
  overflow: visible;     /* words can overflow container if too long */
  word-wrap: normal;     /* don’t break long words */
  word-break: normal;    /* same: prevent breaking words */
  transform: scale(1);     
  transform-origin: 0 0;  
}

/* Overlay */
#overlay {
  position: fixed;
  top: 0; left: 0;
  min-width: 320px;
  inset: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  flex-direction: column;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  display: none;
  z-index: 1000;
}
.adsbygoogle {
  display: block;
  min-width: 320px;
}
/* Hide native file input */
#fileInput {
  display: none;
}

/* Styled file selector */
.file-label {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: #0078d7;
  color: #fff !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 6px;
}
.file-label:hover {
  background: #005fa3;
}

.file-name {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: #fff !important;
  text-align: center;
  word-break: break-word;
}
canvas{
  margin: 0 !important;
  padding: 0 !important;
  display:block;
}
#download-btn {
  margin: 0 auto;        /* centers the button itself horizontally */
  text-align: center;    /* centers text inside button (usually redundant) */
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
}
#copy-btn {
  margin: 0 auto;        /* centers the button itself horizontally */
  text-align: center;    /* centers text inside button (usually redundant) */
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
}
/* Container for the content sections */
.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; /* center all child blocks horizontally */
  padding: 20px;
}

/* Headings */
h2 {
  margin: 0 auto;
  font-size: 1.5rem;
  margin-top: 6px;
  margin-bottom: 6px;
  text-align: left;      /* text stays left-aligned */
  max-width: 800px;
  width: 100%;
}

/* Paragraphs */
p {
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: left;      /* text stays left-aligned */
  max-width: 800px;
  width: 100%;
  word-wrap: break-word;
}


/* Optional: center all text for smaller devices */
@media (max-width: 600px) {
  p {
    text-align: center;
  }
}
.parent {
  text-align: center;
}

a {
  margin: 0 auto;
  display: inline-block;
  background: #0066cc;
  color: #fff;
  padding: 0.7em 1.4em;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: all 0.25s ease;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  cursor: pointer;
}
a:hover {
  background: #004b94;
  transform: translateY(-2px);
}
.examples {
  margin: 2.5rem auto;
  padding: 0 1rem;
  max-width: 800px;
}

.examples h2 {
  text-align: center;
  margin-bottom: 1.2rem;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.examples-grid img {
  margin-top:6px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  background: #f6f6f6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.examples-grid img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}
#result-container {
  width: 100%;
  max-width: 800px;
  height: 500px;              /* fixed height */
  margin: 6px auto;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  /*
  background: linear-gradient(135deg, #f6f6f6, #eaeaea);
  border: 1px solid #ddd;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  */
  overflow: hidden;           /* important */
}

#resultImg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
#action-buttons {
  display: flex;
  justify-content: center;
  gap: 4%;
}

#action-buttons button {
  width: auto;           /* prevent full width */
  min-width: 48%;
}
#internal-links {
  min-height: 3rem;
  contain: layout;
}