* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #0b1120;
  color: #f8fafc;
  min-height: 100vh;
}

.gallery-header {
  height: 64px;
  background-color: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: #38bdf8;
}

.badge-pro {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 500px;
  margin: 0 24px;
}

#input-search {
  flex: 1;
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 13px;
  outline: none;
}

#input-search:focus {
  border-color: #38bdf8;
}

#filter-type {
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 13px;
  outline: none;
}

.gallery-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.btn-secondary {
  background-color: #334155;
  color: #f8fafc;
}

.btn-secondary:hover {
  background-color: #475569;
}

.btn-danger {
  background-color: #991b1b;
  color: #fecaca;
}

.btn-danger:hover {
  background-color: #dc2626;
  color: #ffffff;
}

.gallery-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px;
}

.gallery-stats {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border-color: #475569;
}

.card-thumb-wrap {
  height: 180px;
  background-color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-info {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-url {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}

.card-url:hover {
  color: #38bdf8;
}

.card-meta {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: #0f172a;
  border-top: 1px solid #334155;
}

.card-footer-btns {
  display: flex;
  gap: 6px;
}

.card-btn {
  background-color: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.card-btn:hover {
  background-color: #334155;
}

.card-btn.primary {
  background-color: #0284c7;
  border-color: #38bdf8;
  color: white;
}

.card-btn.danger:hover {
  background-color: #dc2626;
  border-color: #ef4444;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
}

.empty-state h3 {
  font-size: 18px;
  color: #f8fafc;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: #94a3b8;
}

kbd {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #38bdf8;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: #f8fafc;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.25s ease;
  border: 1px solid #334155;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
}
