:root{
  --bg:#0b1117;
  --tile:#101923cc;
  --tile2:#0f1720cc;
  --border:#2a3a4a;
  --glow:#3aa0ff;
  --text:#d7e3ee;
  --muted:#8ea2b5;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  font:14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  overflow-x:hidden;
}

/* Fake FS-like blurred background */
.bg{
  position:fixed; inset:0;
  background:
    radial-gradient(1200px 700px at 20% 20%, #16324a 0%, transparent 60%),
    radial-gradient(900px 600px at 80% 40%, #1b2c3e 0%, transparent 55%),
    radial-gradient(900px 800px at 50% 90%, #0d1a25 0%, transparent 60%),
    url("bg.jpg");
  background-size: cover;
  background-position:center;
  filter: blur(10px) saturate(1.2);
  transform: scale(1.05);
  opacity:.55;
}
.scrim{
  position:fixed; inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.75));
}

.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px;
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  background: rgba(10,16,22,.55);
}

.badge{
  font-weight:700;
  letter-spacing:.08em;
  color:#cfe7ff;
}
.meta{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
}
.left{display:flex; flex-direction:column; gap:2px}

.search{
  width:min(380px, 60vw);
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(16,25,35,.55);
  color:var(--text);
  outline:none;
}
.search:focus{
  border-color: rgba(58,160,255,.55);
  box-shadow: 0 0 0 3px rgba(58,160,255,.18);
}

.wrap{
  position:relative;
  padding:18px 20px 40px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap:14px;
}

.tile{
  display:block;
  text-decoration:none;
  color:inherit;
  background: linear-gradient(180deg, var(--tile), var(--tile2));
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:14px 14px 12px;
  min-height:165px;
  position:relative;
  overflow:hidden;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.tile:hover{
  transform: translateY(-2px);
  border-color: rgba(58,160,255,.55);
  box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(58,160,255,.18) inset;
}

.thumb{
  height:92px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;

  /* tmavší “FS panel” pod ikonu */
  background:
    radial-gradient(120px 90px at 50% 40%, rgba(255,255,255,.06), rgba(0,0,0,.22)),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.18));

  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 10px 25px rgba(0,0,0,.35) inset,
    0 1px 0 rgba(255,255,255,.06) inset;
}

.thumb img{
  max-height:78px;
  max-width:100%;

  /* opticky “odmaskuje” vyblednutí */
  filter: contrast(1.18) saturate(1.18) brightness(1.03)
          drop-shadow(0 6px 10px rgba(0,0,0,.45));

  image-rendering:auto;
}

.title{
  margin-top:10px;
  font-weight:600;
  color:var(--text);
  text-align:center;
  padding:0 6px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.sub{
  margin-top:6px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
}

.empty{
  margin:30px 0 0;
  padding:18px;
  border-radius:12px;
  background: rgba(16,25,35,.55);
  border:1px solid rgba(255,255,255,.08);
  color:var(--muted);
}
.empty.error{color:#ffb1b1}
.hidden{display:none}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:10px;

  /* nový “frame” */
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  box-shadow:
    0 10px 25px rgba(0,0,0,.35) inset,
    0 1px 0 rgba(255,255,255,.05) inset;
}

.logo{
  width:92px;
  height:64px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  padding:6px;
  object-fit:contain;
  object-position:center;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
}

.brandTitle{
  font-weight:800;
  letter-spacing:.02em;
  font-size:16px;
  color:#e7f2ff;
}

.brandSubtitle{
  margin-top:3px;
  font-size:12px;
  color:var(--muted);
}

.row{
  display:flex;
  align-items:center;
  gap:12px;
}

.hint{
  font-size:12px;
  color: rgba(215,227,238,.72);
  border-left: 1px solid rgba(255,255,255,.10);
  padding-left: 12px;
}

/* jemný “FS” glow akcent na topbar */
.topbar{
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 -1px 0 rgba(58,160,255,.10) inset;
}

/* ---------- MOBILE HEADER FIX ---------- */
@media (max-width: 720px){

  /* topbar do dvou řádků */
  .topbar{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 12px;
  }

  .topbar .left{
    width: 100%;
  }

  /* Brand jako “banner” přes celou šířku */
  .brand{
    width: 100%;
    margin-bottom: 0;
    padding: 10px 12px;
    gap: 12px;
  }

  /* široké logo (21:8) – řídíme šířku, výška je automatická */
  .logo{
    width: 140px;     /* změň klidně na 120–170 podle chuti */
    height: auto;
    aspect-ratio: 21 / 8;
    padding: 6px 8px;
  }

  /* text vedle loga ať se neláme do tří sloupců */
  .brandText{
    min-width: 0;     /* umožní ellipsis */
  }

  .brandTitle{
    font-size: 16px;
    line-height: 1.15;
  }

  .brandSubtitle{
    font-size: 12px;
  }

  /* druhý řádek: badge + meta + hint */
  .badge{
    margin-top: 2px;
  }

  /* search na plnou šířku (na mobilu je to nejlepší) */
  .right{
    width: 100%;
  }

  .search{
    width: 100%;
  }

  /* pokud používáš .hint (klikni na dlaždici...), ať se na mobilu nezabije layout */
  .hint{
    border-left: none;
    padding-left: 0;
    margin-top: 6px;
    opacity: .9;
  }
}

/* extra malý mobil */
@media (max-width: 420px){
  .logo{
    width: 120px;
  }
  .brandTitle{
    font-size: 15px;
  }
}
