:root {
  --bg: #0f172a;
  --card: #111827;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --primary: #38bdf8;
  --accent: #22d3ee;
}
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin:0; background:linear-gradient(180deg,#0b1220,#0f172a); color:var(--text); }
.topbar { position:sticky; top:0; z-index:10; background:rgba(17,24,39,.8); backdrop-filter: blur(6px); padding:14px 20px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(255,255,255,.06); }
.topbar a { color:var(--text); text-decoration:none; }
.brand { display:flex; gap:10px; align-items:center; font-weight:700; letter-spacing:.3px; }
.brand .dot { width:10px; height:10px; background:var(--primary); border-radius:50%; box-shadow:0 0 16px var(--primary); }
.container { max-width:1200px; margin:24px auto; padding:0 16px; }
.search { display:inline-flex; gap:8px; align-items:center; margin-right:16px; }
.search input[type="text"]{ background:#0b1220; color:var(--text); border:1px solid rgba(255,255,255,.1); border-radius:10px; padding:10px 12px; min-width:280px; }
button { background:linear-gradient(90deg,var(--primary),var(--accent)); color:#0b1220; border:0; padding:10px 14px; border-radius:10px; font-weight:600; cursor:pointer; box-shadow:0 6px 18px rgba(34,211,238,.2); }
button:hover { transform: translateY(-1px); }
.tg-icon { background:#229ED9; padding:8px 10px; border-radius:10px; color:white; text-decoration:none; font-weight:600; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap:16px; }
.card { background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.06); border-radius:16px; overflow:hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow:0 12px 30px rgba(0,0,0,.35); }
.thumb { width:100%; height:160px; object-fit:cover; display:block; background:#0b1220; }
.thumb.placeholder { display:flex; align-items:center; justify-content:center; color:var(--muted); }
.card-body { padding:12px; }
.card h3 { margin:8px 0 6px; font-size:16px; }
small { color: var(--muted); }
.footer { text-align:center; padding:20px; color:var(--muted); border-top:1px solid rgba(255,255,255,.06); margin-top:32px; }

/* Manager */
.manager-nav a { color:var(--text); margin-right:10px; text-decoration:none; }
table { width:100%; border-collapse: collapse; border:1px solid rgba(255,255,255,.06); }
th, td { padding:10px; border-bottom:1px solid rgba(255,255,255,.06); }
tr:hover td { background:rgba(255,255,255,.03); }
form label { display:block; margin:10px 0 4px; color:var(--muted); }
input[type="text"], input[type="number"], input[type="password"], textarea {
  width:100%; padding:10px; border-radius:10px; border:1px solid rgba(255,255,255,.1); background:#0b1220; color:var(--text);
}
.gallery { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.gallery-item img { width:240px; height:160px; object-fit:cover; border:1px solid rgba(255,255,255,.1); border-radius:10px; }
.success { color:#22c55e; }
.error { color:#ef4444; }
.badge { display:inline-block; font-size:12px; background:rgba(56,189,248,.15); border:1px solid rgba(56,189,248,.35); padding:2px 8px; border-radius:999px; color:var(--text); }


/* Square cards / thumbs */
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:16px; }
.card { border-radius:16px; overflow:hidden; background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02)); border:1px solid rgba(255,255,255,.06); }
.thumb { width:100%; aspect-ratio: 1 / 1; height:auto; object-fit:cover; display:block; background:#0b1220; }
.thumb.placeholder { display:flex; align-items:center; justify-content:center; color:#94a3b8; }

/* Locked images styling */
.gallery { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.gallery-item { position:relative; }
.gallery-item.locked img { filter: blur(6px) grayscale(30%); }
.lock-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center;
  background: rgba(0,0,0,0.45); color:#fff; font-weight:700; padding:10px; border-radius:10px; }
.lock-overlay a { color:#fff; text-decoration: underline; }
.pagination { display:flex; gap:8px; flex-wrap:wrap; margin-top:16px; }
.page-link { padding:8px 12px; border-radius:10px; border:1px solid rgba(255,255,255,.1); text-decoration:none; color:#e5e7eb; }
.page-link.active { background: linear-gradient(90deg,#38bdf8,#22d3ee); color:#0b1220; border-color: transparent; }
