:root {
  color-scheme: dark;
  --bg: #050109;
  --bg-alt: #0c0418;
  --bg-panel: #110826;
  --bg-primary: #050109;
  --bg-secondary: #0c0418;
  --bg-tertiary: #110826;
  --text: #f7f7fb;
  --text-muted: #b8b5c7;
  --text-primary: #f7f7fb;
  --text-secondary: #b8b5c7;
  --text-tertiary: #8f8aa5;
  --accent: #7c5dff;
  --accent-soft: rgba(124, 93, 255, 0.16);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 40px rgba(6, 0, 25, 0.45);
  --hero-surface: #071424;
  --hero-shadow: 0 30px 80px rgba(2, 13, 25, 0.55);
  --surface: #03070f;
  --surface-alt: #0a111f;
  --surface-soft: rgba(255, 255, 255, 0.03);
  --pill-border: rgba(131, 227, 255, 0.2);
  --pill-bg: linear-gradient(130deg, rgba(15, 26, 45, 0.85), rgba(6, 13, 23, 0.85));
  --pill-active: linear-gradient(130deg, #2f59ff, #c74dd8);
  --card-bg: #03070f;
  --card-gradient: linear-gradient(160deg, rgba(24, 32, 56, 0.95), rgba(11, 9, 20, 0.95));
  --card-border: rgba(255, 255, 255, 0.08);
  --input-bg: var(--surface-alt);
  --input-border: var(--pill-border);
  --input-focus: var(--accent);
  --sidebar-bg: var(--surface);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --chip-hover: rgba(255, 255, 255, 0.12);
  --chip-active: var(--pill-active);
  --primary-color: #f472b6;
  --secondary-color: #a78bfa;
}

:root[data-theme='light'] {
  color-scheme: light;
  /* Background colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --bg: var(--bg-primary);
  --bg-alt: var(--bg-secondary);
  --bg-panel: var(--bg-secondary);

  /* Text colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text: var(--text-primary);
  --text-muted: var(--text-secondary);

  /* Border colors */
  --border-color: #cbd5e1;
  --border-hover: #94a3b8;
  --border: var(--border-color);

  /* Card colors */
  --card-bg: #ffffff;
  --card-gradient: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  --card-border: rgba(0, 0, 0, 0.1);

  /* Input colors */
  --input-bg: #f1f5f9;
  --input-border: #cbd5e1;
  --input-focus: #3b82f6;

  /* Sidebar */
  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;

  /* Chip/button colors */
  --chip-bg: #e2e8f0;
  --chip-hover: #cbd5e1;
  --chip-active: #3b82f6;

  /* Accent */
  --accent: var(--primary-color);
  --accent-soft: rgba(124, 58, 237, 0.12);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  --hero-surface: #ffffff;
  --hero-shadow: 0 30px 60px rgba(31, 29, 43, 0.2);
  --surface: var(--card-bg);
  --surface-alt: #f8fafc;
  --surface-soft: rgba(15, 23, 42, 0.06);
  --pill-border: var(--border-color);
  --pill-bg: var(--chip-bg);
  --pill-active: linear-gradient(130deg, #7c5dff, #d946ef);
  --bg-base: var(--bg-primary);
  --primary-color: #f472b6;
  --secondary-color: #a78bfa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, #111f3b, transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(233, 68, 188, 0.3), transparent 50%),
    linear-gradient(145deg, #010208, #090b15 55%, #010208);
  color: var(--text);
  min-height: 100vh;
}

body[data-theme='light'] {
  background: var(--bg-primary);
  color: var(--text-primary);
}

body[data-theme='light'] .sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
}

body[data-theme='light'] .media-card {
  background: var(--card-gradient);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.background-orbs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.background-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: orbFloat infinite ease-in-out;
  will-change: transform;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  75% {
    transform: translate(40px, 10px) scale(1.05);
  }
}

body[data-theme='light'] .background-orb {
  opacity: 0.25;
  filter: blur(100px);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    max-height: 70vh;
    overflow-y: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .media-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }
  .hero {
    margin: 1rem;
    padding: 1rem 1.25rem;
  }
  .hero__title {
    font-size: 1.5rem;
  }
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.sidebar__brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.brand-title {
  margin: 0;
  font-size: 1.75rem;
}

.brand-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sidebar__search input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--pill-border);
  background: var(--surface-alt);
  color: var(--text);
  box-shadow: inset 0 10px 30px rgba(2, 4, 12, 0.6);
}

.sidebar__section {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 1rem;
}

.sidebar__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.sidebar__section h2 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.section-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.chip[data-active='true'] {
  border-color: transparent;
  background: var(--pill-active);
  box-shadow: 0 18px 32px rgba(199, 73, 222, 0.35);
  transform: translateY(-1px);
}

.chip--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-muted);
  box-shadow: none;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.category-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--pill-border);
  border-radius: 16px;
  padding: 0.75rem 0.95rem;
  background: var(--pill-bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.category-list button[data-active='true'] {
  border-color: transparent;
  background: var(--pill-active);
  transform: translateX(4px);
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 0.5rem;
}

.main-content {
  padding-top: 0.5rem;
}

.hero {
  position: relative;
  margin: 0.75rem 1.5rem;
  border: 1px solid var(--hero-surface);
  background: var(--hero-surface);
  border-radius: 36px;
  box-shadow: var(--hero-shadow);
  overflow: hidden;
  padding: 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: radial-gradient(circle at 20% 20%, rgba(125, 83, 255, 0.4), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(0, 212, 255, 0.35), transparent 50%);
  opacity: 0.8;
}

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  grid-column: 2;
  grid-row: 1;
}

.hero__glyphs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin: 0;
  color: #f1f4ff;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-content: center;
}

.hero__glyphs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  min-width: 64px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(134, 95, 255, 0.35), rgba(9, 200, 255, 0.15));
  box-shadow: 0 10px 30px rgba(2, 10, 28, 0.45);
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero__subtitle {
  margin: 0.25rem 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.hero__palette {
  margin: 0;
  display: flex;
  gap: 0.5rem;
  grid-column: 2;
  grid-row: 2;
}

.hero__palette span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
}

.hero__featured {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-column: 2;
  grid-row: 2;
}

.hero__featured a {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  color: inherit;
}

.hero__bokeh {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__bokeh span {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
  filter: blur(10px);
  animation: float 14s infinite;
}

.hero__bokeh span:nth-child(1) { top: 10%; left: 5%; }
.hero__bokeh span:nth-child(2) { top: 50%; left: 20%; animation-duration: 18s; }
.hero__bokeh span:nth-child(3) { top: 20%; right: 20%; animation-duration: 16s; }
.hero__bokeh span:nth-child(4) { bottom: 5%; right: 10%; animation-duration: 20s; }

@media (max-width: 960px) {
  .hero {
    margin: 1rem;
    padding: 1rem 1.25rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .hero__glyphs {
    font-size: 2.5rem;
    gap: 0.75rem;
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }
  .hero__copy,
  .hero__palette,
  .hero__featured {
    grid-column: 1;
  }
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0); opacity: 0.5; }
  50% { transform: translate3d(0, -40px, 0); opacity: 1; }
  100% { transform: translate3d(0, 0, 0); opacity: 0.5; }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 48px;
  align-items: center;
  background: rgba(3, 6, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  margin: 1rem 2rem 0;
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toolbar-btn,
.toolbar select,
.toolbar button {
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  color: inherit;
  font-size: 0.875rem;
  min-height: 36px;
}

.toolbar button[aria-pressed='true'] {
  border-color: transparent;
  background: var(--pill-active);
}

.results-count,
.toolbar-label {
  font-size: 0.8125rem;
}

.select {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.grid-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem 0.5rem;
  color: var(--text-muted);
  gap: 1rem;
  flex-wrap: wrap;
}

.grid-meta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.media-grid {
  flex: 1;
  padding: 2rem;
  display: grid;
  gap: 1.25rem;
}

.media-grid[data-columns='3'] {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.media-grid[data-columns='6'] {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.media-grid[data-columns='12'] {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.media-card {
  background: var(--card-gradient);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(3, 7, 18, 0.65);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.media-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.media-thumb {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-thumb img,
.media-thumb video {
  max-width: 100%;
  max-height: 320px;
  width: 100%;
  display: block;
  object-fit: cover;
}

.media-details {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-details header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.media-name {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-toggle {
  border: none;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.media-card:hover .favorite-toggle,
.media-card .favorite-toggle[aria-pressed='true'] {
  opacity: 1;
}

.media-details .media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.media-details .media-tags span {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.media-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.media-card .media-actions {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.media-card:hover .media-actions {
  opacity: 1;
  transform: translateY(0);
}

.media-card.is-focused .media-actions {
  opacity: 1;
  transform: translateY(0);
}

.media-actions .btn {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.4rem 0.6rem;
  background: var(--pill-bg);
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 180ms ease, background 180ms ease;
}

.media-actions .btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
}

.media-grid[data-density='compact'] .media-details,
.media-grid[data-density='minimal'] .media-details {
  gap: 0.35rem;
}

.media-grid[data-density='minimal'] .media-actions,
.media-grid[data-density='minimal'] .media-tags {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

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

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 1, 9, 0.75);
  backdrop-filter: blur(6px);
}

.lightbox__panel {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: min(960px, calc(100% - 3rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 860px) {
  .lightbox__panel {
    grid-template-columns: 1fr;
  }
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 2;
}

.lightbox__media {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__media img,
.lightbox__media video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox__body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lightbox__path {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.lightbox__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
}

.lightbox__meta dt {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lightbox__meta dd {
  margin: 0;
  font-weight: 600;
}

.lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lightbox__actions button {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.6rem 0.75rem;
  background: var(--chip-bg);
  cursor: pointer;
}

.reaction-picker {
  position: absolute;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 40;
}

.reaction-picker.hidden {
  display: none;
}

.reaction-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.reaction-option:hover {
  background: var(--chip-bg);
}

.reaction-option img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.reaction-pill {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.reaction-pill img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.media-thumb .favorite-toggle {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.media-thumb .favorite-toggle[aria-pressed='true'] {
  background: rgba(124, 93, 255, 0.85);
}

.empty-state {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

#reaction-picker {
  min-width: 240px;
}

.active-filters-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem;
  margin: 0 2rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  align-items: center;
}

.active-filters-bar:empty {
  display: none;
}

.active-filter-pill {
  background: linear-gradient(135deg, var(--primary-color, #f472b6) 0%, var(--secondary-color, #a78bfa) 100%);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.active-filter-pill:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.active-filter-pill .remove-icon {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: bold;
}

.clear-all-filters-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.clear-all-filters-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.media-card-skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 22px;
  aspect-ratio: 1;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.tag-search-container {
  position: relative;
  margin-bottom: 1rem;
}

.tag-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.tag-search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color, #f472b6);
}

.tag-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}

.tag-chips-container {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.tag-chips-container::-webkit-scrollbar {
  width: 6px;
}

.tag-chips-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.tag-chips-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.tag-chips-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .media-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .chip {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    min-height: 44px;
  }
  .media-card {
    border-radius: 16px;
  }
  .media-card .media-actions {
    opacity: 1;
    transform: translateY(0);
  }
  .toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .toolbar button,
  .toolbar select {
    min-height: 40px;
    padding: 0.5rem 0.85rem;
  }
  .hero {
    margin: 1rem;
    padding: 1rem;
  }
  .hero__title {
    font-size: 1.5rem;
  }
  .active-filters-bar {
    margin: 0 1rem 1rem;
  }
}

@media (max-width: 400px) {
  .hero {
    padding: 0.75rem 1rem;
  }
  .hero__title {
    font-size: 1.25rem;
  }
  .hero__subtitle {
    font-size: 0.8rem;
  }
}
