﻿/* ==================== CARLENGINE THEME FOR 4GET ==================== */
/* Single color: #00ff00 */

:root {
  --1d2021: #000000;
  --282828: #000000;
  --3c3836: #0a0a0a;
  --504945: #00ff00;
  --928374: #00ff00;
  --a89984: #00ff00;
  --bdae93: #00ff00;
  --8ec07c: #00ff00;
  --ebdbb2: #00ff00;
  --comment: #00ff00;
  --default: #00ff00;
  --keyword: #00ff00;
  --string: #00ff00;
  --green: #00ff00;
  --yellow: #00ff00;
  --red: #00ff00;
}

* { color: #00ff00 !important; }

html, body {
  background: #000000 !important;
  color: #00ff00 !important;
  margin: 0 !important;
  padding: 0 !important;
  font-family: sans-serif;
}

body { max-width: none !important; }

a, a:visited, a:hover, a:active {
  color: #00ff00 !important;
  text-decoration: none;
}
a:hover { text-decoration: underline; }
b, strong { color: #00ff00 !important; }

/* ==================== HOME PAGE ==================== */
body.home {
  background-image: url('/static/carlenginebackground.png') !important;
  background-size: cover !important;
  background-position: center !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  margin: 0 !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

body.home #center {
  width: 100% !important;
  max-width: 700px !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  text-align: center;
  position: static !important;
  top: auto !important;
  transform: none !important;
}

body.home .logo {
  width: 100% !important;
  max-width: 600px !important;
  height: auto !important;
  margin: 0 auto 40px auto !important;
  background: transparent !important;
  line-height: normal !important;
}
body.home .logo a { display: block; text-decoration: none; }
body.home .logo img {
  width: 100% !important;
  max-width: 500px !important;
  height: auto !important;
  background: transparent !important;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 12px rgba(0, 255, 0, 0.5));
}

/* ==================== SEARCH BOX (HOME) ==================== */
body.home .searchbox {
  width: 100% !important;
  max-width: 750px !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: visible !important;
  padding-left: 0 !important;
}

body.home .searchbox .wrapper {
  flex: 1;
  background: rgba(0, 0, 0, 0.7);
  border: 3px solid #00ff00;
  border-radius: 50px;
  height: 56px;
  display: flex !important;
  align-items: center;
  padding: 0 25px;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.4);
  overflow: visible !important;
  order: 1 !important;
  float: none !important;
}
body.home .searchbox:focus-within .wrapper {
  box-shadow: 0 0 16px rgba(0, 255, 0, 0.7);
}

body.home .searchbox input[type=text] {
  all: unset !important;
  width: 100% !important;
  height: 56px !important;
  line-height: 56px !important;
  color: #00ff00 !important;
  background: transparent !important;
  font-size: 18px !important;
  font-family: sans-serif !important;
  padding: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
}
body.home .searchbox input[type=text]::placeholder {
  color: #00ff00 !important;
  opacity: 0.6 !important;
  text-align: left !important;
}

body.home .searchbox input[type=submit] {
  all: unset !important;
  order: 2 !important;
  width: 56px !important;
  height: 56px !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300ff00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 24px 24px !important;
  border: 3px solid #00ff00 !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.4) !important;
  font-size: 0 !important;
  flex-shrink: 0 !important;
  transition: all 0.15s !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.home .searchbox input[type=submit]:hover {
  box-shadow: 0 0 16px rgba(0, 255, 0, 0.7) !important;
}

/* ==================== RESULTS PAGE ==================== */
body:not(.home) {
  background: #000000 !important;
  margin: 0 auto !important;
  padding: 30px 20px 60px !important;
  color: #00ff00 !important;
  max-width: none !important;
}

body:not(.home) .navigation { display: none !important; }

/* ==================== RESULTS HEADER ==================== */
.results-header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 0 auto 20px auto;
}

.results-logo {
  flex-shrink: 0;
  text-decoration: none !important;
  display: block;
}

.results-logo img {
  width: 64px !important;
  height: 64px !important;
  display: block;
  filter: none !important;
  transition: transform 0.15s;
}
.results-logo:hover img { transform: scale(1.05); }

/* Results page search box */
body:not(.home) .searchbox {
  flex: 1 !important;
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  height: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: visible !important;
  padding-left: 0 !important;
}

body:not(.home) .searchbox .wrapper {
  flex: 1;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #00ff00;
  border-radius: 50px;
  height: 44px;
  display: flex !important;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
  overflow: visible !important;
  order: 1 !important;
  float: none !important;
}
body:not(.home) .searchbox:focus-within .wrapper {
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.6);
}

body:not(.home) .searchbox input[type="text"] {
  all: unset !important;
  width: 100% !important;
  height: 44px !important;
  line-height: 44px !important;
  color: #00ff00 !important;
  background: transparent !important;
  font-size: 15px !important;
  font-family: sans-serif !important;
  padding: 0 !important;
  text-align: left !important;
  box-sizing: border-box !important;
}
body:not(.home) .searchbox input[type="text"]::placeholder {
  color: #00ff00 !important;
  opacity: 0.6 !important;
}

body:not(.home) .searchbox input[type="submit"] {
  all: unset !important;
  order: 2 !important;
  width: 44px !important;
  height: 44px !important;
  background-color: rgba(0, 0, 0, 0.7) !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300ff00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 20px 20px !important;
  border: 2px solid #00ff00 !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.3) !important;
  font-size: 0 !important;
  flex-shrink: 0 !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body:not(.home) .searchbox input[type="submit"]:hover {
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.6) !important;
}

/* ==================== TABS ==================== */
.tabs {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 16px auto;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #003300;
  display: flex;
  justify-content: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
}
.tabs .tab {
  color: #00ff00 !important;
  text-decoration: none !important;
  padding: 8px 18px !important;
  display: inline-block;
  border-radius: 6px 6px 0 0;
  transition: all 0.15s;
  font-size: 14px;
}
.tabs .tab:hover { background: rgba(0, 255, 0, 0.1) !important; }
.tabs .tab.selected {
  border-bottom: 2px solid #00ff00 !important;
  background: rgba(0, 255, 0, 0.15) !important;
  font-weight: bold;
}

/* ==================== FILTERS ==================== */
.filters {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 20px auto;
  padding: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.filters .filter {
  display: inline-block;
  vertical-align: bottom;
}
.filters .filter .title {
  font-size: 12px !important;
  color: #00ff00 !important;
  opacity: 0.8;
  margin: 0 0 4px 0 !important;
  display: block;
  text-align: center;
}
.filters .filter input,
.filters .filter select {
  all: unset !important;
  display: block !important;
  border: 1px solid #00ff00 !important;
  border-radius: 6px !important;
  background: rgba(0, 0, 0, 0.7) !important;
  color: #00ff00 !important;
  font-size: 13px !important;
  padding: 4px 8px !important;
  width: 120px !important;
  height: 28px !important;
  cursor: pointer;
  box-sizing: border-box !important;
  text-align: center;
}
.filters .filter input:focus,
.filters .filter select:focus {
  box-shadow: 0 0 6px rgba(0, 255, 0, 0.5) !important;
}
.filters .filter select option {
  background: #000000 !important;
  color: #00ff00 !important;
}

/* "Took X.XXs" */
.timetaken {
  width: 100%;
  max-width: 900px;
  margin: 0 auto 16px auto;
  font-size: 13px;
  color: #00ff00 !important;
  font-weight: normal !important;
  text-align: center;
  opacity: 0.8;
}

/* ==================== RESULTS LAYOUT ==================== */
.web {
  width: 100% !important;
  max-width: none !important;
}
.web .left {
  width: 100% !important;
  float: none !important;
}
.web .right-wrapper {
  width: 100% !important;
  float: none !important;
  padding-left: 0 !important;
  margin-top: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.web .right-right,
.web .right-left {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

/* ==================== TEXT RESULT CARDS ==================== */
.web .text-result {
  background: rgba(0, 20, 0, 0.3);
  border: 2px solid #00ff00;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 auto 14px auto !important;
  max-width: 800px;
  transition: all 0.15s;
  text-align: center;
  box-sizing: border-box;
}
.web .text-result:hover {
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.web .text-result .title {
  color: #00ff00 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  margin-bottom: 8px !important;
  text-align: center;
}
.web .text-result a:visited .title {
  color: #00ff00 !important;
  opacity: 0.7;
}
.web .text-result .hover:hover .title { text-decoration: underline; }

.web .url {
  margin-bottom: 8px;
  text-align: center;
  display: block;
}
.web .url .part {
  color: #00ff00 !important;
  font-size: 13px !important;
  text-decoration: none;
  opacity: 0.85;
}
.web .url .part:hover { text-decoration: underline; opacity: 1; }
.web .separator::before { color: #00ff00 !important; opacity: 0.5; }

.web .description {
  color: #00ff00 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  white-space: pre-line;
  text-align: center;
  opacity: 0.85;
}

/* Thumbnails inside text results */
.web .text-result .thumb-wrap {
  float: none !important;
  margin: 10px auto !important;
  display: block !important;
  width: 160px;
  height: auto;
}
.web .text-result .thumb-wrap img.thumb {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.web .sublinks {
  margin: 0 auto;
  max-width: 700px;
}
.web .sublinks table { margin: 0 auto; }
.web .info-table {
  margin: 10px auto !important;
  max-width: 600px;
}

.web .favicon,
.favicon-dropdown { display: none !important; }

/* ==================== "IMAGES" SIDEBAR WIDGET ON WEB TAB ==================== */
/* When images appear on the Web results page in the right column */

.web .right-wrapper > h1,
.web .right-wrapper > h2,
.web .right-wrapper > h3,
.web .right-left > h1,
.web .right-left > h2,
.web .right-left > h3,
.web .right-right > h1,
.web .right-right > h2,
.web .right-right > h3 {
  color: #00ff00 !important;
  text-align: center;
  font-size: 18px;
  margin: 20px auto 12px auto;
  max-width: 900px;
}

/* The image group inside the right-wrapper - turn into a grid */
.web .right-wrapper .image-group,
.web .right-left .image-group,
.web .right-right .image-group,
.web .right-wrapper .images,
.web .right-left .images,
.web .right-right .images,
.web .right-wrapper > div:has(.thumb),
.web .right-left > div:has(.thumb),
.web .right-right > div:has(.thumb) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto 20px auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  float: none !important;
}

/* Image items in the sidebar widget - target floated thumbnail blocks */
.web .right-wrapper a:has(> img),
.web .right-wrapper a:has(> .thumb),
.web .right-left a:has(> img),
.web .right-left a:has(> .thumb),
.web .right-right a:has(> img),
.web .right-right a:has(> .thumb) {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px !important;
  background: rgba(0, 20, 0, 0.3) !important;
  border: 2px solid #00ff00 !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
  transition: all 0.15s !important;
  text-decoration: none !important;
  text-align: center;
}

.web .right-wrapper a:has(> img):hover,
.web .right-wrapper a:has(> .thumb):hover,
.web .right-left a:has(> img):hover,
.web .right-left a:has(> .thumb):hover,
.web .right-right a:has(> img):hover,
.web .right-right a:has(> .thumb):hover {
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5) !important;
}

/* Images inside sidebar widget cards */
.web .right-wrapper a > img,
.web .right-wrapper a .thumb img,
.web .right-left a > img,
.web .right-left a .thumb img,
.web .right-right a > img,
.web .right-right a .thumb img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  background: #000000 !important;
  display: block !important;
  margin: 0 auto !important;
  float: none !important;
  border-radius: 4px !important;
}

/* Thumb wrap inside right-wrapper */
.web .right-wrapper .thumb,
.web .right-wrapper .thumb-wrap,
.web .right-left .thumb,
.web .right-left .thumb-wrap,
.web .right-right .thumb,
.web .right-right .thumb-wrap {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 0 6px 0 !important;
  position: relative !important;
  background: #000000 !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  float: none !important;
  display: block !important;
}

/* Dimension labels (like 2210x1473) under sidebar images */
.web .right-wrapper a > div,
.web .right-left a > div,
.web .right-right a > div {
  color: #00ff00 !important;
  font-size: 12px !important;
  margin-top: 4px;
  text-align: center;
}

/* Hide the weird floating checkbox/square thing */
.web .right-wrapper input[type=checkbox], .web .right-left input[type=checkbox], .web .right-right input[type=checkbox] {
  display: none !important;
}

/* ==================== IMAGE GRID (Images tab) ==================== */
#images {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  width: 100% !important;
  max-width: none !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#images .image-wrapper {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  display: block !important;
}

#images .image {
  width: 100% !important;
  margin: 0 !important;
  padding: 10px !important;
  background: rgba(0, 20, 0, 0.3) !important;
  border: 2px solid #00ff00 !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  transition: all 0.15s !important;
  overflow: hidden !important;
}
#images .image:hover {
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5) !important;
}

#images a {
  display: block !important;
  color: #00ff00 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}
#images a:hover .title { text-decoration: underline; }

#images .thumb {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  margin-bottom: 10px !important;
  position: relative !important;
  background: #000000 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}
#images .thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000000 !important;
  display: block !important;
}

/* Broken thumbnail placeholder */
#images .thumb.thumb-broken {
  background:
    repeating-linear-gradient(
      45deg,
      #000000,
      #000000 10px,
      rgba(0, 255, 0, 0.08) 10px,
      rgba(0, 255, 0, 0.08) 20px
    ) !important;
}
#images .thumb.thumb-broken::after {
  content: "no thumbnail";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #00ff00;
  opacity: 0.5;
}

#images .duration {
  position: absolute !important;
  bottom: 4px !important;
  right: 4px !important;
  border: 1px solid #00ff00 !important;
  background: rgba(0, 0, 0, 0.9) !important;
  color: #00ff00 !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  font-size: 11px !important;
}

#images .image .title {
  color: #00ff00 !important;
  font-size: 13px !important;
  font-weight: bold !important;
  margin-bottom: 6px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
#images .image .description {
  color: #00ff00 !important;
  opacity: 0.85 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
}

/* ==================== INFOBOX ==================== */
.infobox {
  border: 1px dashed #00ff00 !important;
  background: rgba(0, 20, 0, 0.3) !important;
  border-radius: 8px !important;
  padding: 24px !important;
  color: #00ff00 !important;
  text-align: center !important;
  max-width: 700px !important;
  margin: 30px auto !important;
}
.infobox a { color: #00ff00 !important; }
.infobox h1, .infobox h2, .infobox h3 {
  color: #00ff00 !important;
  text-align: center;
  margin-bottom: 12px;
}
.infobox ul {
  list-style: none;
  padding: 0;
  text-align: left;
  display: inline-block;
  margin: 8px auto 0;
}
.infobox li { margin: 6px 0; }
.infobox .code {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #00ff00;
  padding: 8px 12px;
  margin: 10px auto;
  display: inline-block;
  border-radius: 6px;
  font-family: monospace;
}

/* ==================== HIDE GOOGLE / GOOGLE API ==================== */
.filters .filter select[name=scraper] option[value=google], .filters .filter select[name=scraper] option[value=google_api] {
  display: none !important;
}

/* ==================== CUSTOM IMAGE POPUP ==================== */
#cew-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
#cew-popup.open { display: flex; }
#cew-popup .cew-popup-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}
#cew-popup .cew-popup-frame {
  position: relative;
  width: 92vw;
  max-width: 1200px;
  height: 88vh;
  max-height: 900px;
  background: #000000;
  border: 2px solid #00ff00;
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(0, 255, 0, 0.6);
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-sizing: border-box;
}
#cew-popup .cew-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 2px solid #00ff00;
  color: #00ff00 !important;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
#cew-popup .cew-popup-close:hover {
  background: rgba(0, 255, 0, 0.15);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}
#cew-popup .cew-popup-img {
  flex: 1;
  width: 100%;
  height: calc(100% - 60px);
  object-fit: contain;
  background: #000000;
  display: block;
}
#cew-popup .cew-popup-info {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
#cew-popup .cew-popup-title {
  color: #00ff00 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
#cew-popup .cew-popup-link {
  color: #00ff00 !important;
  border: 1px solid #00ff00;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
#cew-popup .cew-popup-link:hover {
  background: rgba(0, 255, 0, 0.15);
}

/* ==================== AUTOCOMPLETE ==================== */
.autocomplete {
  background: rgba(0, 0, 0, 0.95) !important;
  border: 2px solid #00ff00 !important;
  border-radius: 12px !important;
  margin-top: 8px;
}
.autocomplete .entry {
  color: #00ff00 !important;
  padding: 8px 25px !important;
}
.autocomplete .entry:hover,
.autocomplete .entry:focus {
  background: rgba(0, 255, 0, 0.15) !important;
}

/* ==================== NEXT PAGE ==================== */
.nextpage {
  border: 2px solid #00ff00 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  color: #00ff00 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.15s;
  display: block;
  text-align: center;
  margin: 20px auto;
  max-width: 300px;
}
.nextpage:hover {
  background: rgba(0, 255, 0, 0.15) !important;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
  text-decoration: none !important;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: #000000; border: 1px solid #00ff00; }
::-webkit-scrollbar-thumb { background: #000000; border: 1px solid #00ff00; }
::-webkit-scrollbar-thumb:hover { background: #001a00; box-shadow: 0 0 6px #00ff00; }
* { scrollbar-width: thin; scrollbar-color: #00ff00 #000000; }
::selection { background: #00ff00; color: #000000; }
::-moz-selection { background: #00ff00; color: #000000; }

/* ==================== RESPONSIVE ==================== */
@media only screen and (max-width: 1200px) {
  #images { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; }
  .web .right-wrapper .image-group,
  .web .right-left .image-group,
  .web .right-right .image-group,
  .web .right-wrapper > div:has(.thumb),
  .web .right-left > div:has(.thumb),
  .web .right-right > div:has(.thumb) {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  }
}

@media only screen and (max-width: 900px) {
  #images { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }
  .filters .filter input,
  .filters .filter select { width: 100px !important; font-size: 12px !important; }
}

@media only screen and (max-width: 700px) {
  body:not(.home) { padding: 20px 12px 60px !important; }
  .results-logo img { width: 48px !important; height: 48px !important; }
  #images {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .web .right-wrapper .image-group,
  .web .right-left .image-group,
  .web .right-right .image-group,
  .web .right-wrapper > div:has(.thumb),
  .web .right-left > div:has(.thumb),
  .web .right-right > div:has(.thumb) {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  #images .image { padding: 6px !important; }
  #images .image .title { font-size: 12px !important; }
  #images .image .description { font-size: 11px !important; }
  #images .duration { font-size: 10px !important; padding: 1px 4px !important; }
  .filters { gap: 6px !important; padding: 4px 0 !important; }
  .filters .filter .title { font-size: 10px !important; }
  .filters .filter input,
  .filters .filter select {
    width: 95px !important;
    height: 26px !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
  }
  .tabs .tab { padding: 6px 12px !important; font-size: 13px !important; }
  .web .text-result { padding: 12px 14px; }
  .web .text-result .title { font-size: 15px !important; }
  #cew-popup .cew-popup-frame {
    width: 96vw;
    height: 92vh;
    padding: 10px;
  }
  #cew-popup .cew-popup-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media only screen and (max-width: 400px) {
  #images { grid-template-columns: repeat(2, 1fr) !important; }
  .filters .filter input,
  .filters .filter select { width: 80px !important; }
}