/* =========================
   State Songs — Shared Theme
   ========================= */

/* ---------- CSS VARIABLES ---------- */
:root{
  --bg: #0b0d12;
  --bg2:#0f131a;

  --card: rgba(255,255,255,0.06);
  --card-soft: rgba(255,255,255,0.04);

  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --line: rgba(255,255,255,0.12);

  --accent: #d2ad55;

  --shadow: 0 18px 60px rgba(0,0,0,0.45);
  --radius: 18px;

  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
          "Apple Color Emoji","Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
          "Liberation Mono","Courier New", monospace;

  --wrap: 980px;
}

/* ---------- RESET / BASICS ---------- */
*{ box-sizing: border-box; }
html{ scrollbar-gutter: stable; }
body{
  margin: 0;
  font-family: var(--sans);
  color: var(--text);

  /* Ein Background für ALLE Seiten */
  background:
    radial-gradient(1200px 900px at 50% 10%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(900px 700px at 20% 25%, rgba(206,168,92,0.10), transparent 60%),
    radial-gradient(900px 700px at 80% 35%, rgba(255,255,255,0.04), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  min-height: 100vh;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible{
  outline: 2px solid rgba(210,173,85,0.55);
  outline-offset: 2px;
}

/* ---------- LAYOUT ---------- */
.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 18px 70px;
}

.card{
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---------- HEADER (Subpages) ---------- */
.header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 14px 18px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.logo{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
}

.brandText{
  display:flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.brandText strong{
  font-size: 0.98rem;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brandText span{
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topLinks{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
}
.pill:hover{ background: rgba(255,255,255,0.08); }

/* ---------- TYPO ---------- */
h1{
  margin: 0 0 8px 0;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  letter-spacing: 0.2px;
}
.sub{
  margin: 0 0 18px 0;
  color: var(--muted);
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.55;
}

.meta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.dot{ opacity: 0.5; }

/* ---------- PROMPT BOX (Subpages) ---------- */
.promptBox{
  margin-top: 18px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.promptHeader{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.promptHeader .label{
  font-size: 0.95rem;
  color: var(--muted);
}

.copyBtn{
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 650;
  cursor: pointer;
  background: rgba(255,255,255,0.92);
  color: #0b0d12;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  transition: transform .05s ease, opacity .15s ease;
  white-space: nowrap;
}
.copyBtn:active{ transform: scale(0.98); }
.copyBtn[disabled]{ opacity: 0.55; cursor: not-allowed; }

textarea.prompt{
  width: 100%;
  min-height: 520px;
  border: none;
  outline: none;
  resize: vertical;
  padding: 16px;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
  background: transparent;
  scrollbar-gutter: stable;
}

.hint{
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  line-height: 1.5;
}
.hint strong{ color: rgba(255,255,255,0.92); }

.footerInside{
  margin-top: 16px;
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- TOAST ---------- */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 50px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  font-size: 0.92rem;
  z-index: 9999;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* ---------- START PAGE ---------- */
.hero{
  text-align: center;
  padding: 22px 10px 10px;
}
.heroLogo{
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  opacity: 0.95;
}
.heroTitle{
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.heroSub{
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 60ch;
}
.heroSub strong{ color: rgba(255,255,255,0.92); }

.entryGrid{
  margin-top: 26px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 900px){
  .entryGrid{ grid-template-columns: 1fr 1fr; }
}

.entryCard{
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.03));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.entryCard:hover{
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.03));
}

/* ✅ FIX: Startseiten-Header (Titel + Tag) robust auf Mobile, ohne andere Seiten zu beeinflussen */
.entryTop{
  display:flex;
  align-items:flex-start;     /* vorher center -> kann optisch "überlagern" */
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;            /* erlaubt Umbruch statt Overlap */
}

.entryTitle{
  margin:0;
  min-width:0;                /* wichtig bei Flex */
  flex:1 1 220px;             /* Titel darf schrumpfen */
}

.tag{
  font-size: 0.95rem;
  color: rgba(255,255,255,0.86);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);

  white-space: nowrap;
  max-width: 100%;            /* nie breiter als Container */
  overflow: hidden;
  text-overflow: ellipsis;    /* statt in den Titel zu drücken */
  flex: 0 1 auto;             /* darf schrumpfen */
}

.entryText{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}
.steps{
  margin: 0;
  color: rgba(255,255,255,0.68);
  font-size: 0.96rem;
}
.sep{ opacity: .45; padding: 0 10px; }

.noteBar{
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.72);
  text-align: center;
  line-height: 1.55;
}

.pageFooter{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- SMALL SCREEN TUNING ---------- */
@media (max-width: 460px){
  .wrap{ padding: 22px 14px 70px; }
  .heroTitle{ letter-spacing: 0.18em; }
  .entryTitle{ font-size: 1.45rem; }
  .tag{ font-size: 0.9rem; }
}

/* ✅ Extra-sicher: auf schmalen Geräten Tag unter Titel, volle Breite */
@media (max-width: 560px){
  .entryTop{
    display:grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }
  .tag{
    width: 100%;
    justify-content: center;
    text-align: center;
    display: inline-flex;
  }
}

/* ---------- (Optional / legacy) Entry card header: Title + Badge ---------- */
/* Diese Klassen bleiben drin, falls du sie auf Unterseiten irgendwann nutzt. */
.entryHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
  color:rgba(255,255,255,0.85);
  font-size:0.95rem;
  line-height:1;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  flex:0 1 auto;
}

/* --- Mobile-safe Card Header (Title + Badge ohne Overlap) --- */
.entryHeader{
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.entryHeader .entryTitle,
.entryHeader h3,
.entryHeader h2{
  min-width: 0;
}

.entryHeader .badge{
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Auf Mobile: Badge unter den Titel */
@media (max-width: 560px){
  .entryHeader{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .entryHeader .badge{
    width: 100%;
    justify-content: center;
  }
}
