@import url('https://fonts.googleapis.com/css2?family=Kode+Mono:wght@400..700&display=swap');


:root {
  --bg: transparent;
  --bg-elevated: #fff;
  --bg-card: transparent;
  --border: #000;
  --text: #000;
  --text-muted: #000;
  --accent: #000;
  --accent-hover: #000;
  --danger: #e0555f;
  --star: #f2c14e;
  --radius: 0px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Kode Mono", monospace;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- App shell ---------- */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.navbar {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.navbar-list-select {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 10px;
  cursor: pointer;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 24px 32px 64px;
}

/* ---------- List container toolbar ---------- */

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.list-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-btn:hover {
  color: #fff;
background-color: #000;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}

.view-toggle button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.view-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ---------- Gallery / masonry view ---------- */

.gallery {
    columns: 4;
    column-gap: 16px;
}


.card {
  break-inside: avoid !important;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-card);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 320ms ease;
border: 2px solid #000;
box-shadow: 2px 2px 0 #000;
background-color: #000;
}


.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card img {
  display: block;
  width: 100%;
  height: auto;
transition: ease all 0.2s;
}

.card img:hover {
opacity: 0.4;
}

.card.hidden-by-filter {
  display: none;
}

.card-body {
  display: none;
}

/* ---------- List view ---------- */

.gallery.view-list {
  column-count: 1;
}

.gallery.view-list .card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px;
border: 2px solid #000;
box-shadow: 2px 2px 0 #000;
background-color: #fff !important;
}

.gallery.view-list .card-thumb {
  flex-shrink: 0;
  width: 72px;
  overflow: hidden;
border: 2px solid #000;
box-shadow: 2px 2px 0 #000;
}

.gallery.view-list .card-body {
  display: block;
  flex: 1;
  min-width: 0;
}

.card-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 4px;
  color: var(--text);
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.badge-type {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ---------- Stars ---------- */

.stars {
  display: inline-flex;
  gap: 2px;
  font-size: 14px;
  color: var(--border);
}

.stars .filled {
  color: var(--star);
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition);
  padding: 24px;
}

.modal-backdrop.visible {
  opacity: 1;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  max-width: 980px;
  width: 100%;
  max-height: 90vh;
  overflow-y: hidden;
  position: relative;
  transform: scale(0.96);
  transition: transform var(--transition);
  display: flex;
  align-items: stretch;
}

.modal-backdrop.visible .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
background: #fff;
  border: 1px solid #000;
  color: #000;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}



.modal-thumb img {
margin: 24px;
width: 12vw;
border: 2px solid #000;
box-shadow: 2px 2px 0 #000;
}

.modal-body {
  flex: 1;
max-height: 90vh;
overflow: auto;
  min-width: 0;
  padding: 18px 20px 22px;
}

@media (max-width: 480px) {
  .modal {
    flex-direction: column;
  }

  .modal-thumb {
    flex: none;
    max-width: 100%;
  }

  .modal-thumb img {
    height: auto;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

.modal-body h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.modal-body .stars {
  margin-bottom: 10px;
  font-size: 16px;
}

.modal-body p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
white-space: pre-wrap;
}

.empty-state {
  color: var(--text-muted);
  padding: 40px 0;
  text-align: center;
}

/* ---------- Forms / admin shared ---------- */

.btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
}

.btn.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.btn-danger {
  background: var(--danger);
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="password"],
.field textarea,
.field select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 8px;
}

.field textarea {
  resize: vertical;
  min-height: 70px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 320px;
}

.login-box h1 {
  font-size: 18px;
  margin: 0 0 18px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin: -6px 0 14px;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 280ms ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}


::-webkit-scrollbar {
  width: 6px;
  height: 4px;
}


::-webkit-scrollbar-button {
  width: 0px;
  height: 0px;
}
body::-webkit-scrollbar-thumb {
  background: #fff;
  border: 1px solid #000;
  border-radius: 0px;
}

body:hover::-webkit-scrollbar-thumb {
background: #fff;
border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: #fff;
}

::-webkit-scrollbar-thumb{
  background: #fff;
border: 1px solid #000;
}

::-webkit-scrollbar-thumb:active {
  background: #fff;
}
::-webkit-scrollbar-track {
  background: transparent;
  border: 0px;
  border-radius: 0px;
}
::-webkit-scrollbar-track:hover {
  background: #fff;
}
::-webkit-scrollbar-track:active {
  background: #fff;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

.gallery.view-list .card.hidden-by-filter {
  display: none;
}
