/* StarGallery — dark, glassy, unslop.
   Black base, glass surfaces, one warm gold accent. No gradients, no glows,
   no shadows, no purple, no emoji, no font-weight above 600. Smooth
   transitions only (opacity / transform, 200-300ms). */
:root {
  --bg: #0a0a0c;
  --surface: #121316;
  --surface-2: #181a1f;
  --glass: rgba(255, 255, 255, 0.04);
  --line: #232529;
  --text: #eceae6;
  --muted: #9a978f;
  --accent: #c9a86a;
  --accent-soft: rgba(201, 168, 106, 0.14);
  --danger: #e5484d;
  --radius: 14px;
  --radius-control: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* No-download: images cannot be selected, long-pressed or dragged.
   (A screenshot can never be blocked — this stops the easy ways.) */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.photo, .compare-panel {
  -webkit-user-select: none;
  user-select: none;
}

h1, h2, h3 { margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Top bar — glass */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link {
  color: var(--muted);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-control);
  transition: color 150ms ease, background 150ms ease;
}
.nav-link:hover { color: var(--text); background: var(--glass); }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.glass-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}
.btn:hover { background: #202329; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #14100a;
}
.btn-primary:hover { background: #d6b87e; }
.btn-ghost { background: transparent; }
.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(229, 72, 77, 0.1); }
.btn-small { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* Pills + tabs */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #14100a;
}

/* Actress grid */
.actress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.actress-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color 200ms ease, transform 200ms ease;
}
.actress-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.actress-card .name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.actress-card .meta { color: var(--muted); font-size: 13px; }

/* Photo grid (multi-view) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.photo {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms ease;
}
.photo:hover { border-color: var(--accent); transform: translateY(-2px); }
.photo img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: opacity 250ms ease;
}
.photo.selected { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.photo-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transition: opacity 150ms ease;
}
.photo:hover .photo-check, .photo.selected .photo-check { opacity: 1; }
.photo.selected .photo-check { background: var(--accent); border-color: var(--accent); color: #14100a; }
.photo-meta {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 5, 6, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.lightbox-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* Compare canvas */
.compare-wrap {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 8px 0;
}
.compare-panel {
  flex: 1 0 280px;
  min-width: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-panel img { display: block; width: 100%; }
.compare-panel .cap {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.compare-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.compare-controls label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
input[type="range"] { accent-color: var(--accent); }

/* Forms */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type="text"], input[type="password"], input[type="file"], select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border-radius: var(--radius-control);
  outline: none;
}
input[type="text"]:focus, input[type="password"]:focus, select:focus { border-color: var(--accent); }
.input-wide { width: 100%; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.form-row > * { flex: 1 1 auto; min-width: 140px; }
.form-row .btn { flex: 0 0 auto; }
.settings-row { margin-bottom: 14px; }
.row-err { color: var(--danger); font-size: 13px; }
.saved-note { color: var(--accent); font-size: 13px; }

/* Toolbar */
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }

/* Empty state */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Section header */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}
.section-head:first-child { margin-top: 0; }

@media (max-width: 640px) {
  .wrap { padding: 14px; }
  .card { padding: 16px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .photo img { height: 200px; }
  .compare-panel { flex-basis: 240px; min-width: 240px; }
  .topbar { padding: 12px 14px; }
  h1 { font-size: 22px; }
}
