/* =========================================================
   011.video — style responsive 2026
   ========================================================= */

:root {
  --blue: #007bff;
  --blue-dark: #0056b3;
  --ink: #1a1a1a;
  --muted: #5b5f66;
  --border: #e2e4e8;
  --bg: #f6f7f9;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(20, 20, 30, 0.06);
  --shadow-lg: 0 8px 32px rgba(20, 20, 30, 0.10);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  overflow-x: hidden;
}

/* ---------------------------------------------------------
   HERO / INTRO
   --------------------------------------------------------- */

.hero {
  width: 100%;
  max-width: 640px;
  text-align: center;
  margin: 24px auto 8px;
}

h1 {
  margin: 6px 0;
  font-size: clamp(1.4em, 4.5vw, 2.1em);
  line-height: 1.2;
  font-weight: 800;
}

h2 {
  margin: 4px 0 12px;
  font-size: clamp(1em, 3vw, 1.2em);
  font-weight: 600;
  color: var(--muted);
}

h3 {
  margin-top: 5px;
  margin-bottom: 5px;
}

.hero p {
  margin: 0 auto;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.98em;
  line-height: 1.55;
}

.hero p strong { color: var(--ink); }

/* ---------------------------------------------------------
   CONVERTER CARD
   This wraps ALL interactive elements (upload, textarea,
   generate button, previews). It sits in its own stacking
   context (isolation + z-index) so nothing rendered later
   in the page — including AdSense iframes — can ever be
   painted on top of it.
   --------------------------------------------------------- */

.converter-card {
  position: relative;
  isolation: isolate;
  z-index: 30;
  width: 100%;
  max-width: 480px;
  margin: 18px auto 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#genForm {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  position: static;
  z-index: auto;
}

label {
  font-size: 1em;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  width: 100%;
}

input[type="text"],
input[type="number"],
select,
textarea {
  padding: 0.85em 1em;
  border: 1px solid #c7ccd3;
  border-radius: 10px;
  font-size: 1em;
  outline: none;
  background: #fafbfc;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

textarea {
  min-height: 110px;
  max-height: 260px;
  resize: vertical;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #bbb #fafbfc;
  line-height: 1.4;
  direction: ltr;
}

textarea::-webkit-scrollbar { width: 8px; }
textarea::-webkit-scrollbar-track { background: #fafbfc; }
textarea::-webkit-scrollbar-thumb { background: #bbb; border-radius: 5px; }

button {
  margin: 0;
  background: #fafbfc;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

button[type="submit"] {
  background: var(--blue);
  color: #fff;
  font-size: 1.1em;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 0.9em 1em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.25);
  width: 100%;
  min-height: 48px;
}

button[type="submit"]:hover,
button[type="submit"]:focus {
  background: var(--blue-dark);
}

button[type="submit"]:active {
  transform: scale(0.98);
}

#result {
  margin: 0;
  font-size: 1.15em;
  font-weight: 600;
  color: #d93025;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
}

#result:empty { display: none; }

canvas {
  background: black;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  border-radius: 8px;
}

#preview {
  max-width: 100%;
  border-radius: 8px;
}

#miniatures {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

#miniatures img {
  height: 50px;
  width: 50px;
  margin: 2px;
  padding: 2px;
  display: inline-block;
  object-fit: cover;
  border: 3px solid #ccc;
  border-radius: 14%;
  border-color: gray;
}

#buttonContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.button {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  background: #f0f2f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: background 0.15s;
}

.button:hover { background: #e6e9ee; }

.button img { max-width: 28px; max-height: 28px; }

#fileSelect {
  align-self: center;
}

/* ---------------------------------------------------------
   HOW-TO LIST
   --------------------------------------------------------- */

body > ul {
  width: 100%;
  max-width: 640px;
  margin: 8px auto 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 18px 40px;
  box-shadow: var(--shadow);
  line-height: 1.6;
  color: var(--muted);
}

body > ul li { margin: 6px 0; }
body > ul strong { color: var(--ink); }

/* ---------------------------------------------------------
   AD CONTAINER
   Reserves its own block, isolated in its own stacking
   context and pinned below the app UI in normal document
   flow, so AdSense creatives (which can inject absolute /
   fixed positioned elements) stay confined to this box and
   can never visually cover the textarea or generate button.
   --------------------------------------------------------- */

#adContainer {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 728px;
  margin: 12px auto 32px;
  background: #f9f9f9;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
}

.adsbygoogle {
  display: block !important;
  position: relative !important;
  width: 100% !important;
}

/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */

.faq-summary {
  width: min(700px, 100%);
  margin: 25px auto 40px;
  padding: 22px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
}

.faq-summary h3 {
  margin: 0 0 15px;
  text-align: center;
  font-size: 21px;
}

.faq-summary ul { margin: 0; padding-left: 22px; }
.faq-summary li { margin: 8px 0; }
.faq-summary a { text-decoration: none; color: var(--blue); }
.faq-summary a:hover { text-decoration: underline; }

.seo-content {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.seo-content > h2 {
  text-align: center;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 10px;
}

.seo-faq {
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
  background: var(--card);
}

.seo-faq summary {
  position: relative;
  cursor: pointer;
  padding: 18px 45px 18px 16px;
  font-size: 17px;
  font-weight: 700;
  list-style: none;
}

.seo-faq summary::-webkit-details-marker { display: none; }

.seo-faq summary::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: 400;
  color: var(--blue);
}

.seo-faq[open] summary::after { content: "\2212"; }

.seo-faq summary:hover { opacity: 0.75; }

.seo-answer {
  padding: 0 45px 18px 16px;
  color: var(--muted);
  line-height: 1.65;
}

.seo-answer p { margin: 0; }

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */

footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding: 18px 12px 28px;
  color: var(--muted);
  font-size: 0.85em;
}

footer a { color: var(--muted); }

/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

  body { padding: 0 10px; }

  .converter-card {
    padding: 16px 14px;
    border-radius: 12px;
  }

  body > ul {
    padding: 16px 16px 16px 34px;
  }

  .faq-summary {
    width: calc(100% - 20px);
    padding: 18px;
  }

  .seo-faq { width: 100%; }

  .seo-faq summary {
    font-size: 16px;
    padding-left: 14px;
    padding-right: 40px;
  }

  .seo-answer {
    padding-left: 14px;
    padding-right: 32px;
  }

  #adContainer { max-width: 100%; }
}

@media (max-width: 420px) {
  h1 { font-size: 1.3em; }
  textarea { min-height: 90px; }
}
