*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --text-main: #111827;
  --text-muted: #4b5563;
  --font-sans: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--text-main);
}

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.app-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  color: #ffffff;
}

.hero-text {
  max-width: 640px;
}

.hero-title {
  margin: 0 0 4px;
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.6;
  font-weight: 400;
}

.lang-switcher {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-label {
  font-size: 1.1rem;
}

.lang-select {
  border-radius: 8px;
  padding: 10px 22px;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  background: #ec4899;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-select:hover {
  background: #db2777;
}

.panel {
  background: transparent;
  border-radius: 8px;
  padding: 0 0 24px;
  box-shadow: none;
  border: none;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label,
.hint {
  font-weight: 600;
  font-size: 0.98rem;
  color: #ffffff;
}

.hint {
  font-weight: 400;
  font-size: 0.9rem;
}

.textarea {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  resize: vertical;
  min-height: 110px;
  padding: 12px 13px;
  font-size: 0.96rem;
  border-radius: 8px;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.55);
  transition: box-shadow 150ms ease-out, transform 150ms ease-out, background-color 150ms ease-out;
}

.textarea:focus {
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.65);
  transform: translateY(-1px);
}

.buttons-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.buttons-row .button {
  flex: 1 1 0;
  justify-content: center;
  text-align: center;
}

.button {
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex; justify-content: center;
  align-items: center;
  gap: 0.35rem;
  transition: background-color 150ms ease-out, transform 150ms ease-out,
    box-shadow 150ms ease-out, border-color 150ms ease-out, opacity 150ms ease-out;
}

.button-primary {
  border: none;
  background: radial-gradient(circle at 30% 0%, #38bdf8, #0ea5e9);
  color: #f9fafb;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.55);
}

.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(14, 165, 233, 0.7);
}

.button-primary[disabled] {
  opacity: 0.65;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.button-secondary {
  border: none;
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
}

.button-secondary:hover {
  background: #16a34a;
}

.status {
  margin-top: 8px;
  font-size: 0.88rem;
  min-height: 1.2em;
  color: #e5e7eb;
}

.status-error {
  color: #fecaca;
}

.output {
  position: relative;
  z-index: 2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 20px;
  padding: 14px 16px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  min-height: 56px;
  font-size: 0.94rem;
  line-height: 1.5;
  max-height: none !important;
  min-height: 200px;
  overflow-y: visible !important;
  padding-bottom: 40px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.55);
}

.output-placeholder {
  margin: 0;
  color: #6b7280;
}

.output-title {
  font-weight: 600;
  margin: 0 0 6px;
}

.output-text {
  margin: 0;
}

.output h3 {
  margin-top: 16px;
  margin-bottom: 4px;
  font-size: 1.02rem;
}

.output p {
  margin: 4px 0 6px;
}

.output ul {
  margin: 4px 0 10px;
  padding-left: 22px;
}

.output-error {
  color: #b91c1c;
}

.footer {
  display: none;
}

@media (min-width: 720px) {
  .app {
    padding-top: 40px;
  }
}

/* DEMO locked recipes */
.locked-recipe { position: relative !important; pointer-events:none; }

/* ===========================
   MOBILE OPTIMIZATION (Variant A)
   =========================== */
@media (max-width: 540px) {
  .app {
      max-width: 80% !important;
      margin: 0 auto !important;
      padding: 16px 12px 30px;
  }
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: 1rem; line-height: 1.45; }
  .lang-switcher { flex-direction: row; gap: 4px; }
  .lang-select { padding: 8px 14px; font-size: 0.85rem; }
  .textarea { min-height: 90px; padding: 10px 12px; font-size: 0.92rem; }
  .buttons-row .button { flex: 1 1 100%; width: 100%; }
  .button { padding: 12px 18px; font-size: 1rem; }
  .output {
    position: relative;
    z-index: 2;
    padding: 14px 14px 16px;
    font-size: 0.92rem;
    max-height: calc(100vh - 260px);
  }
}


  .output h3 { font-size: 1rem; }
}

/* FIX: overlay always visible */
.locked-recipe { position: relative !important; }

.locked-recipe {
    position: relative !important;
    pointer-events: none;
}
.locked-blurred-content {
    filter: blur(6px);
    opacity: 0.6;
}

.locked-overlay {
  position: absolute !important;
  top: 40% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  background: rgba(255,255,255,0.92);
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  width: fit-content;
  max-width: 80%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  text-align: center;
  pointer-events: none;
}

/* === GLASS PREMIUM RECIPE BLOCK === */
.recipe-block {
    background: rgba(255,255,255,0.40) !important;
    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
    border-radius: 8px !important;
    padding: 26px 30px !important;
    margin: 26px auto !important;
    max-width: 760px !important;
    box-shadow: 0 20px 45px rgba(0,0,0,0.28) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
}

.recipe-block h3 {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    color: #1f2937 !important;
}

.recipe-block p {
    font-size: 1.15rem !important;
    color: #374151 !important;
    margin-bottom: 18px !important;
    line-height: 1.55 !important;
}

.recipe-block li {
    font-size: 1.1rem !important;
    color: #1f2937 !important;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
}

html, body, main, .app { background: transparent !important; }


/* =========================================================
   📘 DESKTOP – KNIHA
   ========================================================= */
.book-app {
  width: 100%;
  position: relative;
  text-align: center;
  margin-top: -350px; /* upravíš podle potřeby jen pro PC */
  transform: translateX(-9px); /* - doleva, + doprava */
  pointer-events: none;
  z-index: 99999;
}

.book-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 1150px;
  max-width: 100%;
  height: auto;
  pointer-events: none;
}

/* =========================================================
   📱 MOBIL – CENTROVÁNÍ + POSUN
   ========================================================= */
@media (max-width: 768px) {

  .book-app {
      width: 75% !important;
      margin-top: -165px !important;     /* POSUN NAHORU / DOLŮ NA MOBILU */
      position: relative !important;
      left: 50% !important;
      transform: translateX( -75%) !important;
      text-align: center !important;
  }

  .book-img {
      width: 125% !important;          /* velikost knihy na mobilu */
      max-width: none !important;
      height: auto !important;
      margin-left: auto !important;
      margin-right: auto !important;
      display: block !important;
      transform: translateX(0) !important;
  }
}

/* =========================================================
   📱 ULTRA MALÉ TELEFONY
   ========================================================= */
@media (max-width: 480px) {
  .book-img {
      width: 150% !important;
  }
}

/* === OSTŘEJŠÍ ZOBRAZENÍ TAPETY KUCHYNĚ === */
.app {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === TAPETA KUCHYNĚ NA CELÉ EATĚ === */
.app {
    background: url("https://47057a08b6.clvaw-cdnwnd.com/c4aa89400a1745afb47e5c18480b8d81/200000363-34fe434fe6/450/weg%20kuchyn%C4%9B%20ai%20generov%C3%A1no%20%E2%80%93%20upraveno.png")
                center top / cover no-repeat !important;

    border-radius: 18px;
    padding-top: 40px;      /* můžeš doladit */
    padding-bottom: 40px;   /* můžeš doladit */

    box-shadow: 0 20px 45px rgba(0,0,0,0.28);
}

/* === ODSTRANĚNÍ bílé vrstvy stránky === */
html, body, main {
    background: transparent !important;
}

/* Panel kolem formuláře necháme průhledný */
.panel {
    background: transparent !important;
}

/* Skleněný efekt uvnitř */
.output, .textarea {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* Header bez modrého podkladu */
.app-header {
    background: transparent !important;
}

/* ============================================================
   🎨 STÍNOVÁNÍ TEXTŮ – PROFESIONÁLNÍ, ABY BYLY ČITELNÉ NA FOTCE
   ============================================================ */

/* 
   Tento blok přidává silnější dvojitý stín pro bílé texty,
   jako jsou nadpisy, popisky a placeholdery.
   Dvojitý stín = lepší čitelnost na světlé i tmavé části fotky.
*/
.hero-title,
.hero-subtitle,
.label,
.hint,
.output-title,
.output-placeholder {
    text-shadow:
        /* 1) Hlavní měkký stín – větší a rozostřený */
        0 3px 6px rgba(0,0,0,0.55),
        /* 2) Menší ostrý stín – zvyšuje čitelnost přímo kolem textu */
        0 1px 2px rgba(0,0,0,0.30) !important;
}

/* 
   Tento blok přidává jemné stínování na všechny texty
   uvnitř panelu .app (běžné odstavce, text v receptech, ingredience).
   Dělá text příjemně čitelný bez rušení designu.
*/
.app * {
    text-shadow: 0 2px 4px rgba(0,0,0,0.30);
}

/* === FIX ROZMAZANÉHO TEXTU VE VÝSTUPU (OUTPUT PLACEHOLDER) === */
.output-placeholder {
    text-shadow: none !important;
    filter: none !important;
    color: #333 !important;       /* volitelné – můžeš změnit */
    font-weight: 500;             /* optická ostrost */
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* =========================================================
   🔍 OSTRÝ TEXT UVNITŘ TEXTAREY — ODSTRANĚNÍ ROZMAZÁNÍ
   ========================================================= */

/* Ostrý text – zabrání rozmazání písma uvnitř textarea */
.textarea {
    position: relative;
    z-index: 5; /* text bude nad blur vrstvou */
    color: #2a2a2a !important; /* ostrý, tmavý, čitelný text */
    text-shadow: none !important; /* žádné stíny uvnitř */
}

/* Samotné pozadí textarea necháme rozmazat */
.textarea::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.45);   /* světle skleněný efekt */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: inherit;
    z-index: -1; /* tato vrstva je pod textem */
}

/* =========================================================
   🔍 OSTRÝ TEXT UVNITŘ TEXTAREY — ODSTRANĚNÍ ROZMAZÁNÍ
   ========================================================= */

.textarea {
    position: relative;
    z-index: 5;
    color: #2b2b2b !important;  /* tvoje barva písma */
    text-shadow: none !important;
}

/* Skleněné pozadí textarea */
.textarea::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: inherit;
    z-index: -1;
}


/* =========================================================
   🔍 OSTRÝ TEXT V OUTPUT BLOKU – recepty a odpovědi Eaty
   ========================================================= */

.output {
    position: relative;
    color: #2b2b2b !important;  /* stejné písmo jako textarea */
    text-shadow: none !important;
}

.output::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: inherit;
    z-index: -1;
}


/* =========================================================
   ✨ NADPISY A HLAVIČKA – ponechat BÍLOU barvu
   ========================================================= */

.hero-title,
.hero-subtitle,
.label,
.hint {
    color: #ffffff !important;   /* BÍLÉ PÍSMO nahoře */
    text-shadow:
        0 3px 6px rgba(0,0,0,0.55),
        0 1px 2px rgba(0,0,0,0.35) !important;
}


/* Placeholder text také ztmavíme pro čitelnost */
.textarea::placeholder {
    color: #2b2b2b !important;
    opacity: 0.8;
}

.locked-recipe {
    filter: blur(5px);
    opacity: 0.35;
    position: relative;
}

.locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    font-size: 18px;
    font-weight: bold;
    color: #333;
    border-radius: 12px;
}
