/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #000;
  --color-text: #c6c6c6;
  --color-white: #fff;
  --color-gray-dim: rgba(255, 255, 255, 0.5);
  --color-border: rgba(255, 255, 255, 0.12);
  --color-card-bg: rgba(122, 122, 122, 0.1);
  --color-header-bg: rgba(0, 0, 0, 0.85);
  --color-overlay-bg: rgba(0, 0, 0, 0.6);
  --font-family: 'Inter', sans-serif;
  --font-size: 17px;
  --header-height: 80px;
  --radius: 5px;
  --radius-pill: 25px;
  --max-width: 1440px;
  --side-padding: 40px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-white);
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 25px 0;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea {
  font-family: var(--font-family);
  font-size: var(--font-size);
}

/* ===== Header ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--color-header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

header.scrolled {
  border-bottom-color: var(--color-border);
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 var(--side-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

header .menu-left ul,
header .menu-center ul,
header .menu-right ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

header .menu-left,
header .menu-right {
  flex: 1;
}

header .menu-right {
  display: flex;
  justify-content: flex-end;
}

header .menu-center .site-title {
  font-weight: 600;
  font-size: 17px;
  color: var(--color-white);
  letter-spacing: 0.02em;
}

header .menu-right ul li a {
  color: var(--color-gray-dim);
  font-size: 15px;
}

header .menu-right ul li a:hover,
header .menu-left ul li a:hover {
  color: var(--color-white);
}

/* Mobile header */
.header-mobile-on,
.header-mobile-off {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 12;
  width: 60px;
  height: var(--header-height);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
}

.header-mobile-on span,
.header-mobile-off span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.3s, opacity 0.3s;
}

.header-mobile-off {
  z-index: 15;
}

.header-mobile-off span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.header-mobile-off span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

.header-mobile-foldout {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 13;
  background: var(--color-bg);
  padding: 0 var(--side-padding);
  flex-direction: column;
}

.header-mobile-foldout .menu-center {
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-mobile-foldout .menu-center a {
  font-weight: 600;
  color: var(--color-white);
  font-size: var(--font-size);
}

.header-mobile-foldout .menu-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 40px;
}

.header-mobile-foldout .menu-wrapper ul {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.header-mobile-foldout .menu-wrapper ul li a {
  font-size: 28px;
  color: var(--color-gray-dim);
}

.header-mobile-foldout .menu-wrapper ul li a.active {
  color: var(--color-white);
}

.header-mobile-foldout .menu-wrapper ul li a:hover {
  color: var(--color-white);
}

/* ===== Intro / Hero ===== */
.intro {
  text-align: center;
  padding: calc(var(--header-height) + 60px) var(--side-padding) 70px;
}

.intro h1 {
  font-size: 38px;
  font-weight: 600;
  color: var(--color-white);
  line-height: 1.35;
  max-width: 520px;
  margin: 0 auto 14px;
}

.intro p {
  color: var(--color-gray-dim);
  margin-bottom: 28px;
  font-size: 16px;
}

.newsletter {
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: 15px;
  outline: none;
  min-width: 0;
}

.newsletter-form input::placeholder {
  color: var(--color-gray-dim);
}

.newsletter-form .newsletter-name {
  border-right: 1px solid var(--color-border);
}

.newsletter-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  color: var(--color-gray-dim);
  transition: color 0.2s;
}

.newsletter-submit:hover {
  color: var(--color-white);
}

/* ===== Search Bar ===== */
.search-bar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 400px;
  max-width: calc(100vw - 2rem);
  padding: 0 16px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  transition: background 0.2s, border-color 0.2s, width 0.3s;
}

.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  width: 480px;
}

.search-bar svg {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.4);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-white);
  font-size: 14px;
  min-width: 0;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.search-clear:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.search-bar.has-query .search-clear {
  display: flex;
}

.search-shortcut {
  flex-shrink: 0;
  padding: 3px 7px;
  font-size: 11px;
  font-family: var(--font-family);
  color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  line-height: 1;
  pointer-events: none;
}

.search-bar:focus-within .search-shortcut,
.search-bar.has-query .search-shortcut {
  display: none;
}

/* Light mode */
body.light .search-bar {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
}

body.light .search-bar:focus-within {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
}

body.light .search-bar svg {
  color: rgba(0, 0, 0, 0.35);
}

body.light .search-bar input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

body.light .search-clear {
  color: rgba(0, 0, 0, 0.35);
}

body.light .search-clear:hover {
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.08);
}

body.light .search-shortcut {
  color: rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ===== Mode Toggle (Sites/Brands) ===== */
.mode-toggle {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: flex;
  align-items: center;
  padding: 3px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  gap: 2px;
}

.mode-btn {
  padding: 7px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border: none;
  background: none;
}

.mode-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.mode-btn.active {
  background: var(--color-white);
  color: var(--color-bg);
}

body.light .mode-toggle {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
}

body.light .mode-btn {
  color: rgba(0, 0, 0, 0.4);
}

body.light .mode-btn:hover {
  color: rgba(0, 0, 0, 0.7);
}

body.light .mode-btn.active {
  background: var(--color-white);
  color: var(--color-bg);
}

/* ===== Filter Trigger Button ===== */
.filter-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.filter-trigger:hover {
  background: rgba(255, 255, 255, 0.18);
}

.filter-trigger.has-filters {
  background: var(--color-white);
  color: var(--color-bg);
  border-color: transparent;
}

.filter-trigger.has-filters svg {
  stroke: var(--color-bg);
}


/* ===== Filter Modal Overlay ===== */
.filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.filter-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Filter Modal ===== */
.filter-modal {
  position: fixed;
  bottom: 80px;
  right: 24px;
  transform: translateY(12px);
  z-index: 21;
  width: 420px;
  max-width: calc(100vw - 2rem);
  height: 480px;
  max-height: calc(100vh - 140px);
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.filter-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.filter-modal-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 12px 0;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.filter-tab:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
}

.filter-tab.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.filter-tab svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.filter-tab.active svg {
  opacity: 0.8;
}

/* Divider between tabs and list (only when tabs visible) */
.filter-tabs:not(:empty) + .filter-list {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 10px;
}

/* Filter list */
.filter-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.filter-list::-webkit-scrollbar {
  width: 3px;
}

.filter-list::-webkit-scrollbar-track {
  background: transparent;
}

.filter-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 14px;
  height: 36px;
  border-radius: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.filter-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
}

.filter-item.selected {
  color: rgba(255, 255, 255, 0.2);
}

.filter-item .filter-item-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  font-variant-numeric: tabular-nums;
}

.filter-item.selected .filter-item-count {
  color: rgba(255, 255, 255, 0.1);
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  margin-top: 8px;
  height: 32px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
}

.filter-group-header:first-child {
  margin-top: 4px;
}

.filter-group-header:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
}

.filter-group-header.selected {
  color: rgba(255, 255, 255, 0.15);
}

.filter-group-header .filter-item-count {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.15);
}

body.light .filter-group-header {
  color: rgba(0, 0, 0, 0.35);
}

body.light .filter-group-header:hover {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
}

body.light .filter-group-header.selected {
  color: rgba(0, 0, 0, 0.15);
}

.filter-no-results {
  padding: 24px 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 14px;
}

/* Footer */
.filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-clear {
  padding: 8px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.filter-clear:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
}

.filter-done {
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-white);
  color: var(--color-bg);
  border-radius: 8px;
  transition: opacity 0.15s;
}

.filter-done:hover {
  opacity: 0.85;
}

/* ===== About Trigger & Popup ===== */
.about-trigger {
  position: fixed;
  top: 20px;
  left: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.about-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
}

body.light .about-trigger {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
  color: rgba(0, 0, 0, 0.4);
}

body.light .about-trigger:hover {
  background: rgba(255, 255, 255, 0.85);
  color: rgba(0, 0, 0, 0.7);
}

.about-popup {
  position: fixed;
  top: 72px;
  left: 24px;
  z-index: 21;
  width: 320px;
  max-width: calc(100vw - 2rem);
  padding: 20px;
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.about-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.light .about-popup {
  background: rgba(250, 250, 250, 0.96);
  border-color: rgba(0, 0, 0, 0.08);
}

.about-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 8px;
}

.about-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.45);
}

body.light .about-desc {
  color: rgba(0, 0, 0, 0.45);
}

/* ===== Add Site Trigger ===== */
.add-site-trigger {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.add-site-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
}

body.light .add-site-trigger {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
  color: rgba(0, 0, 0, 0.4);
}

body.light .add-site-trigger:hover {
  background: rgba(255, 255, 255, 0.85);
  color: rgba(0, 0, 0, 0.7);
}

/* ===== Add Site Overlay ===== */
.add-site-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.add-site-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body.light .add-site-overlay {
  background: rgba(255, 255, 255, 0.5);
}

/* ===== Add Site Modal ===== */
.add-site-modal {
  position: fixed;
  top: 72px;
  right: 24px;
  transform: translateY(-8px);
  z-index: 21;
  width: 420px;
  max-width: calc(100vw - 2rem);
  background: rgba(18, 18, 18, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.add-site-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.light .add-site-modal {
  background: rgba(250, 250, 250, 0.96);
  border-color: rgba(0, 0, 0, 0.08);
}

.add-site-inner {
  display: flex;
  flex-direction: column;
}

.add-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light .add-site-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.add-site-heading {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-white);
}

.add-site-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.add-site-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

body.light .add-site-close {
  color: rgba(0, 0, 0, 0.35);
}

body.light .add-site-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-white);
}

.add-site-body {
  padding: 14px 16px;
}

.add-site-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 4px 0 14px;
  height: 42px;
  transition: border-color 0.2s;
}

.add-site-url-row:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
}

body.light .add-site-url-row {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light .add-site-url-row:focus-within {
  border-color: rgba(0, 0, 0, 0.2);
}

.add-site-url-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--color-white);
  font-size: 14px;
  min-width: 0;
}

.add-site-url-row input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

body.light .add-site-url-row input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.add-site-fetch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.add-site-fetch:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

body.light .add-site-fetch {
  color: rgba(0, 0, 0, 0.35);
}

body.light .add-site-fetch:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-white);
}

.add-site-preview {
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 900 / 539;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}

body.light .add-site-preview {
  background: rgba(0, 0, 0, 0.03);
}

.add-site-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.add-site-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.2);
}

body.light .add-site-preview-placeholder {
  color: rgba(0, 0, 0, 0.2);
}

.add-site-preview .add-site-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}

.add-site-spinner .loader-spinner {
  width: 28px;
  height: 28px;
}

.add-site-title-row {
  margin-top: 12px;
}

.add-site-title-row input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 14px;
  height: 38px;
  color: var(--color-white);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.add-site-title-row input:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

body.light .add-site-title-row input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light .add-site-title-row input:focus {
  border-color: rgba(0, 0, 0, 0.2);
}

.add-site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.light .add-site-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

.add-site-retake {
  padding: 8px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.add-site-retake:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
}

body.light .add-site-retake {
  color: rgba(0, 0, 0, 0.4);
}

body.light .add-site-retake:hover {
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.05);
}

.add-site-submit {
  padding: 8px 22px;
  font-size: 13px;
  font-weight: 500;
  background: var(--color-white);
  color: var(--color-bg);
  border-radius: 8px;
  transition: opacity 0.15s;
}

.add-site-submit:hover {
  opacity: 0.85;
}

.add-site-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.add-site-status {
  padding: 8px 0 0;
  font-size: 12px;
  text-align: center;
}

.add-site-status.success {
  color: #4ade80;
}

.add-site-status.error {
  color: #f87171;
}

/* ===== Skeleton Loading ===== */
.post.skeleton {
  pointer-events: none;
}

.skeleton-media {
  aspect-ratio: 900 / 539;
  border-radius: var(--radius);
  background: var(--color-card-bg);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-title {
  margin-top: 12px;
  height: 17px;
  width: 60%;
  border-radius: 4px;
  background: var(--color-card-bg);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ===== Posts Grid ===== */
.posts {
  display: flex;
  flex-wrap: wrap;
  padding: 40px 20px 0;
  justify-content: flex-start;
}

.post {
  position: relative;
  width: calc(25% - 40px);
  margin: 0 20px 35px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.post:hover {
  transform: scale(1.03);
}

.post .media {
  display: block;
  position: relative;
  background: var(--color-card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 900 / 539;
}

.post .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  opacity: 0;
  transform: scale(1.1);
  transition: filter 0.6s ease, opacity 0.4s ease, transform 0.6s ease;
}

.post .media img.loaded {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

.post .media .placeholder {
  position: absolute;
  inset: 0;
  background: var(--color-card-bg);
  transition: opacity 0.4s ease;
}

.post .media img.loaded + .placeholder,
.post .media .placeholder.hidden {
  opacity: 0;
}

.post .media .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.3s;
}

.post:hover .media .overlay {
  opacity: 1;
}

.post .media .overlay a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-pill);
  color: var(--color-white);
  font-size: 14px;
  transition: background 0.2s;
}

.post .media .overlay a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.post .title {
  display: block;
  margin-top: 12px;
  font-size: var(--font-size);
  font-weight: 400;
  color: var(--color-text);
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post:hover .title {
  color: var(--color-white);
}

/* ===== Admin Buttons ===== */
.admin-delete,
.admin-retake {
  position: absolute;
  top: 8px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  border: none;
}

.admin-delete {
  right: 8px;
  background: rgba(220, 40, 40, 0.85);
}

.admin-retake {
  right: 42px;
  background: rgba(59, 130, 246, 0.85);
}

.post:hover .admin-delete,
.post:hover .admin-retake {
  opacity: 1;
}

.admin-delete:hover {
  background: rgba(220, 40, 40, 1);
}

.admin-retake:hover {
  background: rgba(59, 130, 246, 1);
}

.retake-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ===== Infinite Scroll ===== */
.scroll-sentinel {
  height: 1px;
  width: 100%;
}

.scroll-loader {
  display: none;
  justify-content: center;
  padding: 40px 0 80px;
}

.scroll-loader.active {
  display: flex;
}

.loader-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.page-numbers.next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  padding: 0 16px;
}

.page-numbers.next:hover {
  color: var(--color-white);
}

.page-numbers.dots {
  color: var(--color-gray-dim);
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--color-border);
}

footer .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px var(--side-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

footer a {
  color: var(--color-gray-dim);
  font-size: 15px;
}

footer a:hover {
  color: var(--color-white);
}

/* ===== Bottom Pill (Theme + Back to Top) ===== */
.bottom-pill {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 7;
  display: flex;
  align-items: center;
  height: 40px;
  width: 40px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}

.bottom-pill.scrolled {
  width: 81px;
}

.pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  width: 40px;
  height: 40px;
  color: var(--color-white);
  cursor: pointer;
  transition: background 0.2s;
  border: none;
  background: none;
  flex-shrink: 0;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pill-divider {
  width: 1px;
  min-width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s;
}

#backToTop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.bottom-pill.scrolled .pill-divider {
  opacity: 1;
}

.bottom-pill.scrolled #backToTop {
  opacity: 1;
  pointer-events: auto;
}

.icon-moon {
  display: none;
}

/* Light theme: show moon, hide sun */
body.light .icon-sun {
  display: none;
}

body.light .icon-moon {
  display: block;
}

/* ===== Light Theme ===== */
body.light {
  --color-bg: #f5f5f5;
  --color-text: #555;
  --color-white: #111;
  --color-gray-dim: rgba(0, 0, 0, 0.5);
  --color-border: rgba(0, 0, 0, 0.1);
  --color-card-bg: rgba(0, 0, 0, 0.04);
  --color-header-bg: rgba(245, 245, 245, 0.85);
  --color-overlay-bg: rgba(255, 255, 255, 0.6);
}

/* Bottom pill in light mode */
body.light .bottom-pill {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
}

body.light .pill-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.light .pill-divider {
  background: rgba(0, 0, 0, 0.12);
}

/* Filter trigger in light mode */
body.light .filter-trigger {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.8);
}

body.light .filter-trigger:hover {
  background: rgba(255, 255, 255, 0.8);
}

body.light .filter-trigger.has-filters {
  background: var(--color-white);
  color: var(--color-bg);
  border-color: transparent;
}


/* Filter overlay in light mode */
body.light .filter-overlay {
  background: rgba(255, 255, 255, 0.5);
}

/* Filter modal in light mode */
body.light .filter-modal {
  background: rgba(250, 250, 250, 0.96);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light .filter-tab {
  color: rgba(0, 0, 0, 0.4);
}

body.light .filter-tab:hover {
  color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.04);
}

body.light .filter-tab.active {
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.08);
}

body.light .filter-tabs + .filter-list {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light .filter-list {
  scrollbar-color: rgba(0, 0, 0, 0.08) transparent;
}

body.light .filter-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
}

body.light .filter-item {
  color: rgba(0, 0, 0, 0.7);
}

body.light .filter-item:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-white);
}

body.light .filter-item.selected {
  color: rgba(0, 0, 0, 0.2);
}

body.light .filter-item .filter-item-count {
  color: rgba(0, 0, 0, 0.25);
}

body.light .filter-item.selected .filter-item-count {
  color: rgba(0, 0, 0, 0.1);
}

body.light .filter-no-results {
  color: rgba(0, 0, 0, 0.25);
}

body.light .filter-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

body.light .filter-clear {
  color: rgba(0, 0, 0, 0.35);
}

body.light .filter-clear:hover {
  color: var(--color-white);
  background: rgba(0, 0, 0, 0.05);
}

body.light .filter-done {
  background: var(--color-white);
  color: var(--color-bg);
}

/* Loader spinner in light mode */
body.light .loader-spinner {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--color-white);
}

/* Post overlay in light mode */
body.light .post .media .overlay a {
  border-color: rgba(0, 0, 0, 0.3);
}

body.light .post .media .overlay a:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .post {
    width: calc(33.333% - 30px);
  }
}

@media (max-width: 900px) {
  :root {
    --side-padding: 24px;
  }

  .post {
    width: calc(50% - 20px);
    margin: 0 10px 25px;
  }

  .intro h1 {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  header .inner .menu-left,
  header .inner .menu-right {
    display: none;
  }

  header .inner {
    justify-content: center;
  }

  .header-mobile-on {
    display: flex;
  }

  body.mobile-menu-open .header-mobile-on {
    display: none;
  }

  body.mobile-menu-open .header-mobile-off {
    display: flex;
  }

  body.mobile-menu-open .header-mobile-foldout {
    display: flex;
  }

  .intro {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 50px;
  }

  .filter-modal {
    border-radius: 14px;
    height: 440px;
    bottom: 72px;
  }

}

@media (max-width: 540px) {
  .post {
    width: calc(100% - 20px);
    margin: 0 10px 25px;
  }

  .newsletter-form {
    flex-direction: column;
    border: none;
    gap: 10px;
  }

  .newsletter-form input {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
  }

  .newsletter-form .newsletter-name {
    border-right: none;
  }

  .newsletter-submit {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    justify-content: center;
  }

  .scroll-loader {
    padding: 30px 0 60px;
  }
}
