/* assets/style.css */
:root{
  --bg: #0b0f14;
  --card: #10161f;
  --muted: #9fb0c3;
  --text: #e6eef8;
  --accent: #6aa5ff;
  --accent2: #8d7bff;
  --ok: #21c18a;
  --warn: #ffba53;
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(106,165,255,.20), transparent 60%),
              radial-gradient(1000px 700px at 110% 10%, rgba(141,123,255,.18), transparent 55%),
              var(--bg);
}

.bg {}

.shell{ max-width: 980px; margin: 40px auto; padding: 0 16px; }

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  backdrop-filter: blur(10px);
}

.hero{
  padding: 28px 28px;
}
.hero h1{ margin:0 0 10px; font-size: 36px; letter-spacing:.2px; }
.hero p{ margin:0 0 16px; color:var(--muted) }
.row{ display:flex; align-items:center; }
.right{ margin-left:auto; }
.gap > *{ margin-right: 10px; }
.gap > *:last-child{ margin-right:0; }

input[type=text]{
  background: #0d141e;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 280px;
  outline: none;
}
input[type=text]:focus{ border-color: rgba(106,165,255,.75); box-shadow: 0 0 0 3px rgba(106,165,255,.18); }

.btn{
  appearance:none;
  border:none;
  border-radius: 12px;
  padding: 10px 14px;
  background:#182233;
  color: var(--text);
  cursor:pointer;
  transition: transform .05s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover{ background:#1d2a3f; }
.btn:active{ transform: translateY(1px); }
.btn.primary{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color:#071221;
  font-weight:600;
  box-shadow: 0 8px 20px rgba(106,165,255,.35);
}
.btn.primary:hover{ box-shadow: 0 10px 26px rgba(141,123,255,.35); }

.features{ display:grid; grid-template-columns:repeat(auto-fit, minmax(220px,1fr)); gap:14px; margin-top:16px; }
.features h3{ margin:4px 0 6px; font-size:18px }
.features p{ margin:0; color:var(--muted) }

footer.center{ text-align:center; margin-top:18px; }
.muted{ color: var(--muted); }

.toolbar.stuck{
  position: sticky; top: 12px; z-index: 50;
}

.brand{
  text-decoration:none; color:var(--text); font-weight:700; padding:6px 10px;
}
.title{
  min-width: 120px;
  display:inline-block;
  outline:none;
  padding:6px 10px;
  border-radius: 10px;
  border:1px dashed rgba(255,255,255,.15);
}
.title:focus{ border-color: rgba(106,165,255,.6); background:#0d141e; }
.title:empty:before{content:attr(data-placeholder); color:var(--muted)}

.divider{
  width:1px; height: 22px; background: rgba(255,255,255,.08); margin: 0 4px; border-radius:1px;
}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  background:#0d141e; border:1px solid rgba(255,255,255,.08);
  padding:6px 10px; border-radius:999px; color:var(--muted);
}

.editor-wrap{
  margin-top: 16px;
  padding: 0;
}
#editor{
  width: 100%;
  min-height: 60vh;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--text);
  padding: 16px;
  font: 16px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  caret-color: var(--accent);
}

@media (max-width: 640px){
  .shell{ margin: 20px auto; }
  .hero h1{ font-size: 28px; }
}


/* --- Mobile fixes --- */
@media (max-width: 520px){
  .shell{ margin: 12px auto; padding: 0 10px; }
  .toolbar.stuck{ top: 8px; }
  .toolbar .row{ flex-wrap: wrap; }
  .toolbar .right{
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
    gap: 8px;
  }
  .pill{ padding: 6px 8px; font-size: 12px; }
  .btn{ padding: 8px 10px; font-size: 14px; }
  #copyLink{ white-space: nowrap; }
  .title{
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #editor{ min-height: 55vh; font-size: 15px; }
  body, html{ width:100%; overflow-x:hidden; }
}

@media (max-width: 360px){
  .pill{ display:none; } /* Hide extra pills if super narrow */
  .brand{ font-size: 14px; }
  .btn{ font-size: 13px; padding: 7px 9px; }
}


/* === Handy-Ansicht: zweizeilig & sauber === */
@media (max-width: 600px){
  /* Index: Formular auf zwei Zeilen */
  #createForm{ display:flex; flex-wrap: wrap; }
  #createForm input[type=text]{ flex:1 1 100%; min-width:0; }
  #createForm .btn{ width:100%; margin-top:8px; }

  /* Space: Toolbar auf zwei Zeilen */
  .toolbar{ display:grid; grid-template-columns: 1fr; row-gap:8px; }
  .toolbar .row{ width:100%; }
  .toolbar .line-1{ display:flex; align-items:center; gap:10px; }
  .toolbar .line-1 .title{ flex:1 1 auto; min-width:0; }
  .toolbar .line-1 #copyLink{ margin-left:auto; white-space:nowrap; }
  .toolbar .line-2{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
  .right{ margin-left:0; }

  /* Verhindere horizontales Scrollen */
  html, body{ overflow-x:hidden; }
}

.title.readonly{ outline:none; border:none; }


/* Rechtstexte (Impressum & Datenschutz) im bekannten Card-Stil */
.legal-card{
  padding: 24px 28px;
  max-width: 900px;
  margin: 40px auto;
}
.legal-card h1{
  margin-top: 0;
  margin-bottom: 12px;
}
.legal-card h2{
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 20px;
}
.legal-card p,
.legal-card li{
  color: var(--muted);
  line-height: 1.6;
}
.legal-card ul{
  padding-left: 1.2rem;
}
@media (max-width: 600px){
  .legal-card{
    padding: 18px 16px;
    margin: 20px auto;
  }
  .legal-card h1{
    font-size: 24px;
  }
}
