:root{
  --bg0:#070A12;
  --bg1:#0B1430;
  --glass: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --accent: #8be9fd;
  --accent2:#bd93f9;
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --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, Helvetica, Arial;
  color:var(--text);
  background: radial-gradient(1200px 900px at 20% 10%, #1a2b62 0%, transparent 55%),
              radial-gradient(1000px 800px at 80% 20%, #4b1d6d 0%, transparent 55%),
              linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
}

/* Canvas */
#bgCanvas{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  z-index:-2;
  opacity:.75;
}

/* Blobs */
.blobs::before,
.blobs::after{
  content:"";
  position:fixed;
  width:520px; height:520px;
  border-radius:50%;
  filter: blur(50px);
  opacity:.35;
  z-index:-3;
  animation: drift 16s ease-in-out infinite;
}
.blobs::before{
  left:-160px; top:-120px;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 60%);
}
.blobs::after{
  right:-180px; bottom:-140px;
  background: radial-gradient(circle at 60% 40%, var(--accent2), transparent 60%);
  animation-duration: 22s;
}
@keyframes drift{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(60px,30px) scale(1.08)}
}

/* Nav */
.nav{
  position:sticky; top:0;
  backdrop-filter: blur(14px);
  background: rgba(8,12,25,.55);
  border-bottom:1px solid var(--stroke);
  z-index:10;
}
.nav-inner{
  max-width:1100px; margin:0 auto;
  padding:14px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.brand{
  display:flex; align-items:center; gap:10px;
  text-decoration:none; color:var(--text);
}
.logo{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.row{display:flex; gap:14px; flex-wrap:wrap; align-items:center}
.nav a.link{color:var(--muted); text-decoration:none}
.nav a.link:hover{color:var(--text)}

.container{
  max-width:1100px; margin:18px auto 46px;
  padding:0 16px;
}

/* Base */
.card{
  background: var(--glass);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad{padding:18px}

.small{font-size:13px; color:var(--muted)}
.btn{
  cursor:pointer;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color:var(--text);
}
.btn:hover{background: rgba(255,255,255,.12)}

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  align-items:start;
}
@media (max-width: 980px){ .grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 620px){ .grid{grid-template-columns:1fr} }

/* Tile */
.tile{
  overflow:hidden;
}

/* WICHTIG: Vorschau zeigt GANZES Bild (contain) */
.img-wrap{
  height: 260px;                 /* einheitliche Kachel-Höhe */
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.12);
}

.img-wrap img{
  width:100%;
  height:100%;
  object-fit: contain;           /* GANZES Bild sichtbar */
  display:block;
  transition: transform .25s ease;
}

.tile:hover .img-wrap img{
  transform: scale(1.03);
}

/* Titel + Beschreibung sichtbar */
.tile .meta{
  padding:12px;
}
.tile .meta b{
  display:block;
  margin-bottom:6px;
}
.tile .meta p{
  margin:0;
  line-height:1.5;
}

/* Toast */
.toast{
  position:fixed; left:50%; bottom:18px;
  transform: translateX(-50%);
  background: rgba(10,14,28,.88);
  border:1px solid var(--stroke);
  padding:10px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  color: var(--muted);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
  z-index:999;
}
.toast.show{opacity:1; transform: translateX(-50%) translateY(-4px)}

/* Lightbox Modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  z-index: 9999;
  padding:16px;
}
.modal.open{ display:flex; }

.modal-card{
  width:min(1100px, 96vw);
  max-height: 92vh;
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,14,28,.88);
  box-shadow: var(--shadow);
}

.modal-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.modal-top-text{min-width:0}

.modal-imgwrap{
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.15);
}

.modal-imgwrap img{
  width:100%;
  height:auto;
  max-height: 78vh;
  object-fit: contain;   /* GANZES Bild sichtbar */
  display:block;
  border-radius: 12px;
  background: rgba(0,0,0,.12);
}