@import url("/theme.css");

.container { max-width: 1200px; margin: var(--s-6) auto 60px; padding: 0 var(--s-4); }
h1 { margin-bottom: var(--s-4); }
.pageHeaderWithAction { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.pageHeaderWithAction h1 { margin-bottom: 6px; }
@media (max-width: 600px) {
  .pageHeaderWithAction { align-items: flex-start; flex-direction: column; }
}

/* Toolbar */
#myToolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in oklab, var(--card) 94%, transparent);
}
.toolbar-actions { display: flex; gap: 10px; }
#myToolbar .btn {
  padding: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: transparent; color: var(--text);
  transition: background 0.2s, color 0.2s;
}
#myToolbar .btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; }
#myToolbar .btn:disabled { opacity: .38; }
#downloadSelectedBtn:hover { background: rgba(59,130,246,.15); color: #3b82f6; }
#deleteSelectedBtn:hover { background: rgba(220,38,38,.15); color: #dc2626; }
#myToolbar label { cursor: pointer; font-size: 14px; color: var(--muted); }

/* Gallery */
.gallery { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.galleryItem {
  position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  padding: var(--s-3); text-align: left;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.galleryItem:hover { transform: translateY(-4px); border-color: var(--bg); box-shadow: 0 12px 28px rgba(2,8,23,.5),0 4px 12px rgba(2,8,23,.4); }
.galleryItem a { color: inherit; text-decoration: none; }
.galleryItem img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 9px; transition: transform 0.3s ease;}
.galleryItem:hover img { transform: scale(1.05); }
.galleryItem .title { margin-top: var(--s-2); font-weight: 600; }
.galleryItem .muted { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Checkbox */
.galleryItem input.selector {
  position: absolute; top: 10px; right: 10px;
  width: 18px; height: 18px;
  accent-color: var(--bg);
  opacity: 1; transition: opacity .2s; z-index: 5; cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.8));
}
.galleryItem:hover input.selector,
.galleryItem input.selector:checked { opacity: 1; }
.galleryItem.selected {
  border-color: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in oklab,var(--bg) 35%, transparent);
  transition: box-shadow .3s, border-color .3s;
}

.galleryItem a:focus-visible { outline: 3px solid var(--bg); outline-offset: 3px; }

@media (max-width: 600px) {
  .container { margin-top: 24px; padding: 0 16px; }
  #myToolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in oklab, var(--card) 94%, transparent);
    backdrop-filter: blur(10px);
  }
  .gallery { grid-template-columns: 1fr; }
}

