/* ==========================================================================
   PIXSTUDIO RESPONSIVE DESIGN SYSTEM (Fit for all devices)
   Clean light theme, fluid typography, mobile-first, and ultra-smooth animations.
   ========================================================================== */

:root {
  /* PixStudio Palette */
  --ink: #15191B;
  --paper: #F8F9F7;
  --surface: #FFFFFF;
  --surface-hover: #F2F5F3;
  --muted: #6B7573;
  --muted-light: #9DA7A5;
  --line: #E2E7E4;
  --brand: #176B57;
  --brand-strong: #105443;
  --brand-light: #2BD99E;
  --mint: #E1F4EC;
  --sun: #F2C66D;
  --danger: #B93838;
  --success: #237A4B;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(21, 25, 27, 0.06);
  --shadow-md: 0 4px 14px rgba(21, 25, 27, 0.08);
  --shadow-lg: 0 12px 30px rgba(21, 25, 27, 0.12);
  --shadow-xl: 0 20px 48px rgba(21, 25, 27, 0.16);

  /* Transitions */
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 240ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Dimensions */
  --max-width: 1440px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --header-height: 72px;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-emblem {
  width: 40px;
  height: 40px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.logo-text span {
  font-weight: 400;
  color: var(--brand);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand);
  background-color: var(--mint);
}

/* Header Search */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 100%;
  height: 42px;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 0 42px 0 40px;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.header-search input:focus {
  background-color: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 107, 87, 0.15);
}

.search-icon-pos {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  color: var(--muted);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
}

.search-clear-btn.visible {
  display: flex;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-saved-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--mint);
  color: var(--brand-strong);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(23, 107, 87, 0.2);
  transition: all var(--transition-fast);
}

.btn-saved-header:hover, .btn-saved-header.active {
  background-color: var(--brand);
  color: #FFFFFF;
}

.badge-count {
  background-color: var(--brand);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  margin-left: 2px;
}

.btn-saved-header:hover .badge-count,
.btn-saved-header.active .badge-count {
  background-color: #FFFFFF;
  color: var(--brand);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 48px 0 32px 0;
  background: radial-gradient(circle at 50% 10%, var(--mint) 0%, var(--paper) 70%);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 14px;
}

.hero-title span {
  color: var(--brand);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  color: var(--muted);
  font-weight: 400;
  max-width: 620px;
  margin: 0 auto 28px auto;
  padding: 0 10px;
}

.hero-search-wrapper {
  max-width: 680px;
  margin: 0 auto 20px auto;
  padding: 0 10px;
}

.hero-search-box {
  display: flex;
  align-items: center;
  background-color: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-full);
  padding: 6px 8px 6px 18px;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-fast);
}

.hero-search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(23, 107, 87, 0.15), var(--shadow-lg);
}

.hero-search-box input {
  flex: 1;
  height: 44px;
  font-size: 1rem;
  background: transparent;
  color: var(--ink);
  min-width: 120px;
}

.hero-search-box .btn-search {
  background-color: var(--brand);
  color: #FFFFFF;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hero-search-box .btn-search:hover {
  background-color: var(--brand-strong);
}

.trending-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  padding: 0 10px;
}

.trending-label {
  color: var(--muted);
  font-weight: 600;
}

.tag-chip {
  background-color: var(--surface);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  color: var(--ink);
  font-size: 0.82rem;
  transition: all var(--transition-fast);
}

.tag-chip:hover {
  background-color: var(--mint);
  border-color: var(--brand);
  color: var(--brand);
}

/* ==========================================================================
   FILTER CONTROLS
   ========================================================================== */
.controls-section {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background-color: rgba(248, 249, 247, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.controls-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.type-tabs {
  display: flex;
  background-color: var(--surface);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.type-tab {
  padding: 7px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.type-tab.active {
  background-color: var(--brand);
  color: #FFFFFF;
}

.category-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all var(--transition-fast);
}

.cat-pill.active, .cat-pill:hover {
  background-color: var(--mint);
  border-color: var(--brand);
  color: var(--brand-strong);
  font-weight: 600;
}

.secondary-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select {
  height: 36px;
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 0.84rem;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}

/* Results Meta Bar */
.results-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px 0;
  font-size: 0.88rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 10px;
}

.results-count strong {
  color: var(--ink);
}

.active-filters-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip-removable {
  background-color: var(--mint);
  border: 1px solid var(--brand);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-chip-removable button {
  font-size: 0.9rem;
  color: var(--brand-strong);
}

.clear-all-link {
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 6px;
}

/* ==========================================================================
   MEDIA GRID & CARDS (Adaptive to all screen widths)
   ========================================================================== */
.media-grid-container {
  padding: 12px 0 60px 0;
  min-height: 400px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.media-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(23, 107, 87, 0.3);
}

.card-media-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #E0E5E2;
}

.card-media-wrapper img, .card-media-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.media-card:hover .card-media-wrapper img {
  transform: scale(1.03);
}

/* Card Overlay Actions */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 40%, rgba(0,0,0,0.65) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  pointer-events: none;
}

.media-card:hover .card-overlay {
  opacity: 1;
}

.card-top-actions {
  display: flex;
  justify-content: flex-end;
  pointer-events: auto;
}

/* Prominent Save Button */
.btn-card-save {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.btn-card-save:hover, .btn-card-save.saved {
  background: #FFFFFF;
  color: var(--danger);
  transform: scale(1.05);
}

.card-bottom-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  color: #FFFFFF;
  gap: 10px;
}

.card-creator {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.creator-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  object-fit: cover;
  flex-shrink: 0;
}

.creator-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Easy Direct Download Button on Card */
.btn-card-download {
  background: var(--brand);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-card-download:hover {
  background: var(--brand-strong);
  transform: scale(1.04);
}

.video-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(21, 25, 27, 0.8);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.badge-4k {
  background: var(--sun);
  color: #15191B;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 2px;
}

.card-details {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.card-specs-mini {
  font-size: 0.76rem;
  color: var(--muted);
}

/* States */
.state-container {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px auto;
}

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

/* ==========================================================================
   MODAL LIGHTBOX (Adaptive to all screen form-factors)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(10, 14, 13, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-container {
  background-color: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 1280px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
  transform: scale(0.96);
  transition: transform var(--transition-normal);
}

.modal-backdrop.open .modal-container {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background-color: var(--surface);
  gap: 12px;
}

.modal-creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.modal-creator-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
  flex-shrink: 0;
}

.modal-creator-name {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-creator-bio {
  font-size: 0.78rem;
  color: var(--muted);
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Modal Direct Download Button */
.btn-download-main {
  background-color: var(--brand);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn-download-main:hover {
  background-color: var(--brand-strong);
  transform: translateY(-1px);
}

.btn-save-modal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background-color: var(--surface);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  transition: all var(--transition-fast);
}

.btn-save-modal:hover, .btn-save-modal.saved {
  border-color: var(--danger);
  color: var(--danger);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  overflow-y: auto;
  flex: 1;
}

.modal-media-stage {
  background-color: #0F1312;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 400px;
}

.modal-media-stage img, .modal-media-stage video {
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.modal-sidebar {
  padding: 24px;
  background-color: var(--surface);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.sidebar-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.license-box {
  background-color: var(--mint);
  border: 1px solid rgba(23, 107, 87, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.license-box-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-strong);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.license-box-desc {
  font-size: 0.78rem;
  color: var(--ink);
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background-color: var(--paper);
  padding: 12px;
  border-radius: var(--radius-md);
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

.spec-val {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background-color: var(--ink);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: var(--surface);
  border-top: 1px solid var(--line);
  padding: 48px 0 24px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 320px;
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   RESPONSIVE DEVICE BREAKPOINTS (Mobile, Tablet, Desktop)
   ========================================================================== */

/* Tablet & Smaller Screens (< 1024px) */
@media (max-width: 1024px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  .modal-sidebar {
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
  }
}

/* Mobile Screens (< 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  .main-nav {
    display: none;
  }
  .header-search {
    max-width: 200px;
  }
  .btn-saved-header span.label-text {
    display: none;
  }
  .hero-section {
    padding: 32px 0 20px 0;
  }
  .hero-search-box {
    padding: 4px 6px 4px 14px;
  }
  .hero-search-box .btn-search {
    padding: 9px 16px;
    font-size: 0.9rem;
  }
  .controls-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .type-tabs {
    width: 100%;
    justify-content: space-around;
  }
  .type-tab {
    padding: 7px 12px;
    font-size: 0.84rem;
    flex: 1;
    justify-content: center;
  }
  .secondary-filters {
    justify-content: space-between;
    width: 100%;
  }
  .filter-select {
    flex: 1;
  }
  .media-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* On mobile touch devices, overlay elements are always accessible */
  .card-overlay {
    opacity: 1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, transparent 40%, rgba(0,0,0,0.65) 100%);
  }
  .modal-backdrop {
    padding: 0;
  }
  .modal-container {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .modal-media-stage {
    min-height: 280px;
    padding: 10px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Very Narrow Phones (< 400px) */
@media (max-width: 400px) {
  .logo-text {
    font-size: 1.25rem;
  }
  .header-search {
    display: none;
  }
}
