/* Global from lander.css */
body {
  font-family: "DM Sans", sans-serif;
}

/* Background from lander.css - STEP 3 */
body {
  background-repeat: no-repeat;
  background: #f0f0f0;
  color: rgb(25, 31, 31);
  margin: 0;
  padding: 0;
}


a {
  text-decoration: none;
  /* From lander.css */
}

/* Header from lander.css */
#header {
  position: relative;
  width: 100%;
  padding: 20px 0;
}

#header #header-inner {
  max-width: 1220px;
  max-width: calc(1220px + 4rem);
  padding: 0 2rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

#header #logo h1 {
  font-size: 28px;
  line-height: 1;
}

#header #logo h1 a {
  color: #000;
}

#header #navigation {
  margin-left: 40px;
}

#header #navigation a {
  color: rgb(25, 31, 31);
}

#header #navigation ul {
  display: flex;
}

#header #navigation ul li {
  margin: 0 15px;
}

#header #navigation ul li a {
  color: rgb(25, 31, 31);
  padding: 0.25rem 0;
  /* Baseline vertical padding for all nav links */
  display: inline-block;
  /* Allow padding and border to take effect */
  border-radius: 99999px;
  /* Keep shape consistent, will be visible on active */
  margin: 0;
  /* LI still has margin: 0 15px */
}

#header #ctas {
  margin-left: auto;
}

#header #ctas .cta-button svg {
  width: 1.25rem;
}

#header #ctas .cta-button {
  background-color: rgb(255, 255, 255);
  color: rgb(25, 31, 31);
  font-size: 16px;
  padding: 9.5px 25px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  box-shadow: 5px 4px 16px 0px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#header #ctas .cta-button.black {
  background-color: #000;
  color: #fff;
}

#header #ctas-inner {
  display: flex;
  gap: 16px;

}

/* /Header from lander.css */

/* Logo SVG styling from lander.css */
#logo svg {
  width: 140px;
  height: auto;
}

#logo svg * {
  fill: #444;
  /* This will override the SVG's inline fill */
}

/* User badge styling from lander.css */
.user-badge-link {
  text-decoration: none;
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background-color: rgba(176, 176, 176, 0.2);
  border:1px solid rgba(143, 139, 136, 0.25);
  border-radius: 16px;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.02), 0px 0px 0px 1px rgba(0, 0, 0, 0.01);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color 0.2s ease-in-out;
  position: relative;
}

.user-badge svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: #333;
}

/* Mobile only - darker background on active (touch) */
@media (pointer: coarse) {
  .user-badge-link:active .user-badge {
    background-color: rgb(0, 235, 96);
  }
}

/* Account label on hover (desktop only) */
.user-badge-label {
  display: none;
}

@media (pointer: fine) {
  .user-badge-label {
    display: block;
    position: absolute;
    pointer-events: none;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    background: rgb(224 224 224 / 45%);
    border: 1px solid rgb(143 139 136 / 25%);
    font-size: 14px;
    color: #000;
    padding: 4px 8px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .user-badge-link:hover .user-badge-label {
    opacity: 1;
    transform: translate(-50%, 12px);
  }
}

.user-identifier {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  text-decoration: none;
}

.user-identifier:hover {
  text-decoration: none;
}

/* /User badge styling from lander.css */

/* Responsive Header Styles from lander.css */
@media screen and (max-width: 768px) {
  #header #header-inner {
    padding: 0 1.4rem;
    flex-wrap: wrap;
  }

  #logo svg {
    width: 100px;
    top: -2px;
    position: relative;
  }

  #header #navigation {
    margin-left: auto;
  }

  /* Only break CTAs to new line when there are actual buttons (not logged in) */
  #ctas:has(.cta-button) {
    width: 100%;
    margin-top: 20px;
  }

  #header #ctas .cta-button {
    padding: 7px 12px;
    font-size: 15px;
  }

  #header #ctas-inner>.cta-button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Keep user badge small and inline when logged in */
  .user-badge {
    padding: 8px;
    border-radius: 12px;
  }

  .user-badge svg,
  #header #ctas .cta-button svg {
    width: 1rem;
    height: 1rem;
  }
}

/* Navigation adjustments for smaller mobile screens */
@media screen and (max-width: 450px) {
  #header #navigation ul {
    font-size: 15px;
  }

  #header #navigation ul li {
    margin: 0 12px;
  }
}

@media screen and (max-width: 400px) {
  #header #navigation ul {
    font-size: 14px;
  }

  #header #navigation ul li {
    margin: 0 10px;
  }
}

#header #navigation ul li:last-child {
  margin-right: 0;
}

/* Styling for active navigation link */
#header #navigation ul li a.active {

  color: #333;
  /* Darker text color for contrast */

  border-bottom: 2px solid #000;
  border-radius: 0;


}

@media screen and (min-width: 769px) {
  #header #header-inner {
    min-height: 41px;
  }
}

/* /Responsive Header Styles from lander.css */

/* Original memes.css content starts below */



/* Index page specific header styling */
.memes-index-header {
  margin-bottom: 20px;
}

.memes-page h1.index-page-title {
  font-size: 28px;
  text-align: left;
  margin-bottom: 10px;
  font-weight: 700;
  color: #222;
}

.memes-index-header p:not(:last-child) {
  margin-bottom: 10px;
}

.memes-index-header p a {
  color: rgb(0, 15, 255);
}

.memes-index-header p {
  font-size: 17px;
  line-height: 1.4;
  color: #444444
}

/* Meme Variations Grid (used on show page and index for public templates) */
.meme-variations {
  margin-top: 48px;
  margin-bottom: 48px;
}

.meme-variations h2,
.all-meme-templates-heading {
  font-size: 20px;
  font-weight: 600;
  margin: 30px 0 15px;
  color: rgba(0, 0, 0, 0.9);
  line-height: 1.6;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.all-meme-templates-heading { 
  margin-top: 20px;
}

.meme-variations h2 span {
  display: block;
  font-size: 80%;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.6);
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
}

.section-title-row h2 {
  margin: 0;
  font-weight: 700;
  color: #444444;
  font-size: 20px;
  letter-spacing: -0.02em;
}



.info-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(176, 176, 176, 0.5);
  border: 1px solid rgb(143 139 136 / 35%);
  border-radius: 50%;
  color: rgb(25, 31, 31);
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.2s ease;
}

.info-icon-link:hover {
  background: rgba(255, 255, 255, 0.2);
}

.public-templates-intro {
  font-size: 17px;
  line-height: 1.4;
  color: #444444;
  margin-bottom: 16px;
}

.variations-grid-wrapper {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.variations-grid-wrapper .variations-grid {
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

.variations-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-left: max(2rem, calc((100vw - 1220px) / 2));
  padding-right: 2rem;
}

.variations-grid::-webkit-scrollbar {
  display: none;
}

.variation-item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.variation-card {
  background: #fff;
  border: 1px solid #cbc7c4;
  border-radius: 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  width: 180px;
}

.variation-card a {
  display: block;
  width: 100%;
}

.variation-media {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.variation-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.variation-title-below {
  font-size: 14px;
  color: #444;
  font-weight: 500;
  margin-top: 0;
  padding: 0 0px 2px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.variation-title-below a {
  color: #444;
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .variation-title-below a:hover {
    text-decoration: underline;
  }
}

.variation-title-below a:active {
  text-decoration: underline;
}


/* Landscape variation overrides */
.variations-grid-wrapper--landscape .variation-card {
  width: 221px;
  position: relative;
}

.variations-grid-wrapper--landscape .variation-media {
  aspect-ratio: 16 / 9;
  height: auto;
}

.variations-grid-wrapper--landscape .variation-media img {
  height: 100%;
}

.variations-grid-wrapper--landscape .variation-title-below {
  max-width: 221px;
}

/* Browse-all promo card */
.variation-card.browse-all-card {
  background-color: rgb(176 176 176 / 50%);
  border: 1px solid rgb(143 139 136 / 35%);
  color: rgb(25, 31, 31);
  border-radius: 6px;
  font-weight: bold;
}

@media (hover: hover) and (pointer: fine) {
  .variation-card.browse-all-card:hover {
    background-color: rgb(176 176 176 / 10%);
  }
}

.variation-card.browse-all-card a {
  color: #000;
  line-height: 1.2;
}

.variation-card.browse-all-card .variation-media {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

/* Public share badge */
.variation-card .public-share-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(17, 220, 102, 0.65);
  padding: 4px 8px;
  border: 1px solid rgba(5, 194, 84, 0.95);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.variation-card .public-share-badge svg {
  width: 12px;
  height: auto;
}

.variation-card .public-share-badge svg * {
  fill: #333;
}

/* Admin controls for public templates */
.variation-card .admin-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.variation-card .admin-hide-btn {
  background: rgba(255, 79, 79, 0.95);
  border: 1px solid #e63946;
  color: #fff;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.variation-card .admin-hide-btn:hover {
  background: #ff5f5f;
}

/* Scroll indicators */
.variations-more {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  width: 18px;
  border-radius: 14px;
  border: 1px solid rgb(143 139 136 / 35%);
  background: rgb(176 176 176 / 80%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.variations-more-left {
  left: 2rem;
}

.variations-more-right {
  right: 2rem;
}

.variations-more svg {
  width: auto;
  height: 14px;
}

.variations-more svg * {
  stroke: #1f1f1f;
}

/* Show page specific styles */
.meme-show-editor {
  max-width: calc(1220px + 4rem);
  padding: 0 2rem;
  margin: 0 auto;
}

.meme-image-info-section {
  margin-top: 16px;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 7px 13px;
  display: flex;
  justify-self: flex-start;
}

.meme-image-info-title {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meme-image-info-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meme-show-hq-badge {
  display: inline-block;
  line-height: 0;
}

.meme-show-hq-badge svg {
  height: 24px;
  width: auto;
  display: block;
}

.meme-show-editor .caption-this-container {
  min-height: 0 !important;
  padding: 0 !important;
}

.meme-show-editor .main-content {
  margin-bottom: 0 !important;
}

.caption-this-container .container {
  padding: 0 !important;
}

.meme-show-editor .sidebar-content {
  font-family: 'Space Mono', monospace;
}

.right-sidebar {
  top: 0 !important;
}

/* Admin collapsible */
.admin-collapsible {
  margin-top: 24px;
}

.admin-summary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  height: 44px;
  font-size: 14px;
  background-color: rgb(176 176 176 / 50%);
  border: 1px solid rgb(143 139 136 / 35%);
  color: rgb(25, 31, 31);
  border-radius: 6px;
  padding: 12px 20px;
  transition: all 0.2s ease;
  font-family: 'Space Mono', monospace;
  user-select: none;
  width: 100%;
  list-style: none;
  position: relative;
  padding-left: 36px;
}

details.admin-collapsible summary::-webkit-details-marker {
  display: none;
}

.admin-summary-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.admin-summary-button::before {
  content: '▶';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

details.admin-collapsible[open] .admin-summary-button::before {
  transform: translateY(-50%) rotate(90deg);
}

.admin-collapsible-box {
  background-color: rgba(223, 223, 223, 0.5);
  border: 1px solid rgb(143 139 136 / 35%);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 10px;
}

.admin-collapsible-box h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: bold;
  color: rgb(25, 31, 31);
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
}

.admin-collapsible-box .field {
  margin-bottom: 12px;
}

.admin-collapsible-box label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(25, 31, 31);
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.3px;
}

.admin-collapsible-box input[type="text"],
.admin-collapsible-box input[type="url"],
.admin-collapsible-box input[type="file"],
.admin-collapsible-box textarea {
  width: 100%;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  border: 1px solid rgb(143 139 136 / 45%);
  background: rgba(255, 255, 255, 0.9);
  color: rgb(25, 31, 31);
  border-radius: 10px;
  padding: 10px 12px;
}

.admin-collapsible-box input[type="file"] {
  padding: 8px 10px;
  background: #fff;
}

.admin-collapsible-box input[type="submit"],
.admin-collapsible-box button,
.admin-collapsible-box .button_to input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  height: 40px;
  font-size: 14px;
  background-color: rgb(176 176 176 / 50%);
  border: 1px solid rgb(143 139 136 / 35%);
  color: rgb(25, 31, 31);
  border-radius: 6px;
  padding: 8px 16px;
  transition: all 0.2s ease;
  font-family: 'Space Mono', monospace;
}

.admin-collapsible-box input[type="submit"]:hover,
.admin-collapsible-box button:hover,
.admin-collapsible-box .button_to input[type="submit"]:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.admin-collapsible-box .remove-kym-button input[type="submit"],
.admin-collapsible-box .dev-delete-button-show input[type="submit"] {
  background: #ff4f4f;
  border: 1px solid #e63946;
  color: #fff;
}

.admin-collapsible-box .remove-kym-button input[type="submit"]:hover,
.admin-collapsible-box .dev-delete-button-show input[type="submit"]:hover {
  opacity: 0.9;
}

/* Button styles for show page admin controls */
.edit-in-canvas-button,
.set-primary-button,
.delete-template-button,
.meme-detail-page .hq-button,
.meme-detail-page .notable-button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  height: 40px;
  font-size: 14px;
  background-color: rgb(176 176 176 / 50%);
  border: 1px solid rgb(143 139 136 / 35%);
  color: rgb(25, 31, 31);
  border-radius: 6px;
  padding: 12px 20px;
  transition: all 0.2s ease;
  font-family: 'Space Mono', monospace;
  text-decoration: none;
}

.edit-in-canvas-button:hover,
.set-primary-button:hover,
.delete-template-button:hover,
.meme-detail-page .hq-button:hover,
.meme-detail-page .notable-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.meme-detail-page .hq-button.active,
.meme-detail-page .notable-button.active {
  background-color: rgb(0 255 106 / 60%);
  border: 1px solid rgb(0 204 85 / 50%);
}

/* Allow text selection inside meme description */
.meme-description,
.meme-description * {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}

@media screen and (max-width: 768px) {
  .memes-page-container>h1 {
    margin-top: 0.5rem;
  }

  .meme-show-editor {
    padding: 0 1.4rem;
  }

  .meme-image-info-section {
    margin-top: 40px;
    padding: 10px 12px;
    width: 100%;
    justify-content: center;  
  }

  .meme-image-info-title {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .meme-show-hq-badge svg {
    height: 26px;
  }

  .variations-grid {
    gap: 12px;
    padding: 0 1.4rem 0 1.4rem;
  }

  .variation-card {
    width: 150px;
  }

  .variation-title-below {
    max-width: 150px;
  }

  .variations-grid-wrapper--landscape .variation-card {
    width: 184px;
  }

  .variations-grid-wrapper--landscape .variation-title-below {
    max-width: 184px;
  }

  .variations-more svg {
    height: 14px;
  }

  .variations-more-left {
    left: 1.4rem;
  }

  .variations-more-right {
    right: 1.4rem;
  }
}

.memes-page-container {
  position: relative;
  width: 100%;
  max-width: calc(1220px + 4rem);
  padding: 0 2rem;
  margin: 0 auto;
}

/* Meme grid styling */
.memes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

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



.meme-template {
  max-width: 600px;
  overflow: hidden;
  border: 1px solid #ababab;
}

.meme-card-wrapper {
  position: relative;


  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  overflow: hidden;
  /* Ensure image respects border-radius */
}


.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 1rem;
  align-items: center;
}

.pagination .page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination a,
.pagination span.current {
  padding: 0.5rem 1rem;
  border: 2px solid #c2c2c2;
  border-radius: 0.5rem;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination span.current {
  background: #ddd;
  color: #444;
  border-color: #8d8d8d;
}

.pagination a:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #5f5f5f;
}

.pagination .gap {
  border: none;
}

@media (max-width: 768px) {
  .pagination {
    gap: 0.25rem;
  }

  .pagination a,
  .pagination span.current {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
  }

  .pagination {
    margin: 0 auto;
  }
}

.pagination span.last {
  display: none;
}

.pagination span.page.gap {
  display: none;
}

.pagination .page {
  display: none;
}

.pagination .page.current {
  display: block;
}

.pagination {
  margin-bottom: 0;
  margin-top: 10px;
}

.meme-card {
  text-decoration: none;
  color: inherit;
  display: block;
  /* Ensure it fills the wrapper */

}

.meme-info {
  padding: 8px 0;
}

.meme-name {
  font-size: 15px;
  /* Adjusted size */
  margin-bottom: 4px;
  color: #444;
  font-weight: 500;
  /* Medium weight */
  line-height: 1.4;
}

@media (hover: hover) and (pointer: fine) {
  .meme-name:hover {
    text-decoration: underline;
  }
}

.meme-name:active {
  text-decoration: underline;
}


.meme-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.meme-year {
  font-size: 11px;
  color: #555;
  /* Softer color */
  background: #cccccc;
  padding: 5px;
  border-radius: 5px;
}

.meme-index-hq-badge {
  display: inline-block;
  line-height: 0;
}

.meme-index-hq-badge svg {
  height: 21px;
  width: auto;
  display: block;
}

/* Meme detail page styling */
.meme-detail {

  margin: 0 auto;
  margin-top: 0px;
}

.meme-title {
  font-size: 18px;
  margin-bottom: 30px;
  color: #000;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  font-family: 'Space Mono', monospace;
}

.meme-title .meme-title-all-memes {
  display: flex;
  align-items: center;
}

.meme-title .meme-title-all-memes a {
  color: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 500;
  display: inline-block;
  line-height: 1.4;
}

.meme-title .meme-title-all-memes a:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
}

.meme-title a {
  text-decoration: none;
}

.meme-title .meme-title-arrow {
  margin: 0 6px;
  line-height: 1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 32px;
  width: 6px;
}

.meme-title .meme-title-arrow::before {
  content: '';
  display: block;
  width: 6px;
  height: 10px;
  background-image: url('data:image/svg+xml;utf8,<svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L5 5L1 9" stroke="rgba(0,0,0,0.25)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.meme-title .meme-title-meme-name {
  font-weight: 700;
  font-size: 16px;
  color: #000;
  margin: 0;
  line-height: 1.4;
  max-width: 600px;
  display: inline-flex;
}

.meme-title .meme-title-meme-name a {
  color: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 500;
  display: inline-block;
  line-height: 1.4;
}

.meme-title .meme-title-meme-name a:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .meme-title {
    font-size: 14px;
    margin-bottom: 20px;
    gap: 4px;
    align-items: flex-start;
  }

  .meme-title .meme-title-all-memes a {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 6px;
  }

  .meme-title .meme-title-arrow {
    margin: 0 4px;
    width: 5px;
    height: 28px;
    align-items: center;
  }

  .meme-title .meme-title-arrow::before {
    width: 5px;
    height: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg width="5" height="8" viewBox="0 0 5 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L4 4L1 7" stroke="rgba(0,0,0,0.25)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  }

  .meme-title .meme-title-meme-name {
    font-size: 14px;
    max-width: calc(100vw - 200px);
    line-height: 1.4;
  }

  .meme-title .meme-title-meme-name a {
    padding: 4px 8px;
    font-size: 14px;
  }
}

.meme-template {
  margin-bottom: 40px;
}

.meme-description {
  color: rgba(0, 0, 0, 0.8);
  line-height: 1.6;
}

.meme-description h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 30px 0 15px;
  color: rgba(0, 0, 0, 0.9);
}

.meme-description p {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: rgb(32, 33, 34);
  font-weight: 500;
}

.meme-description a {
  color: #000fff;
  text-decoration: none;
}

.meme-description a:hover {
  text-decoration: underline;
}

.meme-origin,
.meme-aliases {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 20px;
}

.meme-template img {
  vertical-align: bottom;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .memes-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    /* Adjusted gap */
  }

  .meme-title {
    font-size: 24px;
  }

}

@media (max-width: 480px) {
  .memes-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    /* Adjusted gap */
  }

  .memes-page>h1.main-title {
    font-size: 18px;
  }

  .memes-page-container {
    padding: 0 1rem;
    /* Adjusted padding */
  }

  #memes-navigation-placeholder .h1 {
    font-size: 2.0rem;
  }

  .memes-subtitle {
    font-size: 1.0rem;
    margin-bottom: 1.5rem;
  }

}

.meme-template-actions {
  margin-top: 20px;
  text-align: center;
}

.meme-description h2 span {
  display: block;
  font-size: 80%;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.6);
}

/* URL Preview Card Styling (Keep as is or adapt if necessary) */
.url-preview-card {
  display: block;
  border: 1px solid #e1e1e1;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  max-width: 600px;
  background: #f8f8f8;
  text-decoration: none;
  color: inherit;
  text-align: left;
  margin: 15px 0;
  transition: background-color 0.2s, border-color 0.2s;
}

.url-preview-card:hover {
  background: #f0f0f0;
  border-color: #d1d1d1;
  text-decoration: none;
}

.preview-image {
  flex: 0 0 130px;
}

.preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-content {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.8);
}

.preview-description {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-domain {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .preview-content {
    padding: 12px;
  }
}

/* Reference styling */
.reference {
  font-size: 10px;
  vertical-align: super;
  line-height: 0;
  color: rgba(0, 0, 0, 0.6);
}

.reference-item {
  position: relative;
  padding-left: 26px;
  margin: 15px 0;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
}

.reference-number {
  position: absolute;
  left: 0;
  top: 0;
}

.reference-item a {
  color: rgba(0, 0, 0, 0.6);
  text-decoration: none;
}

.reference-item a:hover {
  text-decoration: underline;
}

.meme-image {
  width: 100%;
  padding-bottom: 100%;
  /* Creates a 1:1 aspect ratio */
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
}

.meme-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  border-radius: 14px;
}

.search-container {
  margin-bottom: 2.5rem;
  /* Space after search before grid */
}

.search-input-wrapper {
  margin-bottom: 24px;
  position: relative;
  /* For icon positioning */
}

.search-input-inner {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  /* Increased padding for icon and feel */
  font-size: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  /* Rounded like lander buttons */
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.02), 0px 0px 0px 1px rgba(0, 0, 0, 0.01);
  /* Subtle shadow */
  outline: none;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  background-color: #fff;
}

.search-icon {
  position: absolute;
  left: 18px;
  /* Adjusted for new padding */
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  /* Softer icon color */
  pointer-events: none;
  font-size: 1.2rem;
}

.search-input:focus {
  border-color: #FF5500;
  /* Lander orange for focus */
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.05), 0 0 0 1px #FF5500;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px;
  /* Match input */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 8px;
  /* Space from input */
}

.search-result {
  display: flex;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover {
  background-color: #f5f5f5;
}

.search-result-image {
  width: 50px;
  /* Slightly smaller */
  height: 50px;
  margin-right: 12px;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  /* Rounded images */
}

.search-result-info h3 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.search-result-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #666;
}

/* Admin button styling (largely unchanged but ensure consistency) */
.dev-delete-form {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.dev-delete-button {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 8px;
  /* Consistent rounding */
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, background-color 0.2s;
}

.dev-delete-button:hover {
  opacity: 1;
  background-color: #e03030;
}

/* Admin Actions section and forms */
.admin-actions {
  margin-top: 40px;
  padding: 25px;
  background-color: rgba(255, 255, 255, 0.8);
  /* Slightly transparent white against gradient */
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.admin-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 8px;
  justify-content: space-between;
  position: absolute;
  top: 12px;
  /* Adjusted for new card style */
  right: 12px;
  z-index: 10;
  width: auto;
}

.admin-buttons .dev-delete-form {
  position: static;
}

.admin-buttons .dev-delete-button {
  margin-right: 0;
}

.dev-edit-button {
  background: #17a2b8;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-block;
}

.dev-edit-button:hover {
  opacity: 1;
  color: white;
  text-decoration: none;
}

.template-upload-form,
.meme-details-form,
form.merge-form,
.delete-meme-section,
.kym-data-removal-section,
.meme-raw-data-section {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  /* Slightly off-white for forms inside admin area */
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.admin-actions h3,
.admin-actions h4 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  /* Adjusted admin section titles */
  font-weight: 600;
  color: #343a40;
}

.admin-actions .field {
  margin-bottom: 15px;
}

.admin-actions .field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  /* Slightly lighter label */
  font-size: 0.9rem;
  color: #495057;
}

.admin-actions .field input[type="text"],
.admin-actions .field textarea,
.admin-actions .field input[type="file"],
.admin-actions .field .template-file-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  /* Rounded inputs */
  font-size: 0.95rem;
  color: #495057;
  box-sizing: border-box;
}

.admin-actions .field input[type="text"]:focus,
.admin-actions .field input[type="file"]:focus {
  border-color: #FF5500;
  /* Lander orange for focus */
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(255, 85, 0, 0.25);
}

.admin-actions .field input[type="file"] {
  padding: 8px;
  /* Adjust padding for file input */
}

.template-file-input {
  width: 100%;
  margin-bottom: 10px;
}

/* General Button Styling in Admin Area */
.admin-actions button,
.admin-actions input[type="submit"],
.template-regions-controls .regions-button,
.regions-editor-controls .regions-button,
.variation-actions button,
.variation-actions input[type="submit"] {
  padding: 10px 18px;
  /* Standardized padding */
  border: none;
  border-radius: 8px;
  /* Consistent rounding */
  cursor: pointer;
  font-size: 0.9rem;
  /* Standardized font size */
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s, opacity 0.2s, transform 0.1s ease-out;
  color: white;
  background-color: #000;
}

.admin-actions button:hover,
.admin-actions input[type="submit"]:hover,
.template-regions-controls .regions-button:hover,
.regions-editor-controls .regions-button:hover,
.variation-actions button:hover,
.variation-actions input[type="submit"]:hover {
  opacity: 0.9;
}

.admin-actions button:active,
.admin-actions input[type="submit"]:active {
  transform: scale(0.98);
}

/* Specific Button Types in Admin Area */
.set-primary-button {
  background-color: #17a2b8;
  /* Info Blue */
}

.delete-template-button {
  background-color: #dc3545;
  /* Danger Red */
}

.upload-template-button {
  background-color: #28a745;
  /* Success Green */
}

.merge-button {
  background-color: #ffc107;
  /* Warning Yellow */
  color: #212529;
}

.update-details-button {
  background-color: #007bff;
  /* Primary Blue */
}

.remove-kym-button {
  background-color: #dc3545;
  /* Danger Red */
  margin-top: 15px;
}

/* Full-width buttons in admin forms */
.upload-template-button,
.merge-button,
.update-details-button,
.remove-kym-button,
.set-primary-button,
.delete-template-button {
  width: 100%;
  margin-top: 10px;
}

.upload-template-button {
  margin-top: 0;
}

/* Template Regions Buttons */
.template-regions-controls,
.regions-editor-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.regions-editor-controls {
  justify-content: center;
  margin-top: 15px;
}

.regions-button {
  font-size: 0.85rem;
  /* Smaller for control bar */
  padding: 8px 12px;
}

.regions-button.delete-button {
  background-color: #dc3545;
}

.regions-button.save-button {
  background-color: #28a745;
}

.regions-button.cancel-button {
  background-color: #6c757d;
}

.dev-only {
  margin-bottom: 10px;
  justify-content: flex-start;
  display: flex;
  gap: 10px;
  align-items: center;
}

.template-admin-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.template-admin-actions .hq-button,
.template-admin-actions .notable-button {
  padding: 4px 8px;
  font-size: 12px;
  width: auto;
  margin-top: 0;
}

.variation-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* Increased gap */
}

.variation-actions .edit-in-canvas-button {
  width: 100%;
  box-sizing: border-box;
}

.variation-card .hq-button,
.variation-card .notable-button {
  font-size: 12px;
  padding: 4px 8px;
}

.template-admin-actions form {
  display: inline-block;
}

.meme-raw-data-section pre {
  font-size: 13px;
  line-height: 1.5;
  width: 100%;
  overflow: scroll;
  max-height: 344px;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  background-color: #fdfdfd;
  padding: 10px;
  border-radius: 4px;
}

/* Ensure the dev-delete-button on the show page has consistent styling */
.dev-delete-button-show {
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  /* Match other admin buttons */
  font-size: 0.9rem;
  /* Match other admin buttons */
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s, background-color 0.2s;
  width: 100%;
  /* Make it full width like other form buttons */
  margin-top: 10px;
}

.dev-delete-button-show:hover {
  opacity: 1;
  background-color: #e03030;
}

.dev-delete-form-show {
  margin: 0;
  /* Reset margin if any */
}



@media screen and (max-width: 768px) {
  .memes-page-container>h1 {
    font-size: 1.8rem;
    letter-spacing: 0.06rem;
    margin-bottom: 0.4rem;
  }

}


/* Footer styles ported from lander.css */
#footer {
  position: relative;
  width: 100%;
  margin-top: 110px;
  margin-bottom: 40px;
  font-size: 1.3rem;
}

#footer a {
  color: #666;
}

#footer-container {
  max-width: 1220px;
  max-width: calc(1220px + 4rem);
  padding: 0 2rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

#footer-inner {
  width: 100%;
}

#footer-logo {
  width: 100%;
  margin-top: 11svh;
}

#footer-logo svg {
  max-width: 100%;
  height: auto;
}

#footer-navigations {
  display: flex;
  gap: 60px;
  justify-content: space-between;
}

#footer-copyright {
  display: flex;
  justify-content: space-between;
}

.footer-navigation-container>p {
  font-size: 110%;
  margin-bottom: 12px;
  font-weight: 500;
}

#footer ul li a:hover {
  text-decoration: underline;
}

#footer ul li a {
  padding: 3px 0;
  display: inline-block;
}

#footer ul li:not(:last-child) {
  margin-bottom: 10px;
}

#footer-copyright p {
  color: #666;
}

#footer-copyright {
  margin-top: 40px;
}

#footer-logo a {
  display: block;
}

@media screen and (max-width: 768px) {
  #footer {
    font-size: 1rem;
    margin-top: 70px;
  }

  #footer-navigations {
    flex-direction: column;
  }

  div#footer-copyright {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .memes-page-container {
    padding: 0 1.4rem;
  }

  #footer-container {
    padding-left: 1.4rem !important;
    padding-right: 1.4rem !important;
  }
}


@media (max-width: 768px) {
  .search-container {
    margin-bottom: 1rem;
  }

  .public-templates-intro {
    font-size: 14px;
  }

  .section-title-row h2 {
    font-size: 18px;
  }

  .memes-index-header p {
    font-size: 14px;
  }

  .memes-index-header h1 {
    font-size: 24px;
  }
}

/* Admin Pending Clusters Section */
.admin-pending-clusters {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 32px;
}

.admin-pending-clusters-title {
  margin: 0 0 16px 0;
  color: #856404;
}

.pending-cluster-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: start;
}

.pending-cluster-image {
  flex-shrink: 0;
}

.pending-cluster-img {
  width: 150px;
  height: auto;
  border-radius: 4px;
}

.pending-cluster-content {
  flex-grow: 1;
}

.pending-cluster-stats {
  font-weight: bold;
  margin-bottom: 8px;
}

.pending-cluster-time {
  color: #666;
  font-weight: normal;
  margin-left: 12px;
}

.pending-cluster-handles {
  margin-bottom: 12px;
  color: #666;
}

.pending-cluster-handles-more {
  color: #999;
}

.pending-cluster-tweets {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-cluster-tweet-link {
  font-size: 12px;
  padding: 4px 8px;
  background: #e8f5fe;
  border: 1px solid #90caf9;
  border-radius: 4px;
  text-decoration: none;
  color: #1976d2;
}

.pending-cluster-approve-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pending-cluster-slug-input {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
}

.pending-cluster-approve-btn {
  padding: 6px 16px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.pending-cluster-reject-btn {
  padding: 6px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 8px;
}

/* Trending Memes Section */
.trending-memes-description {
  color: #666;
  margin-bottom: 16px;
}

.trending-variation-card {
  position: relative;
}

.trending-sightings-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 10;
}

.trending-sighting-link {
  text-decoration: none;
}

.trending-sighting-badge {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  display: inline-block;
}

.trending-tweet-count {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  font-size: 12px;
  border-radius: 7px;
  background-color: rgb(224 224 224 / 85%);
  border: 1px solid rgb(143 139 136 / 45%);
  transition: 0.3s ease-out;
  overflow: hidden;
  z-index: 1;

  padding: 3px 6px;
  pointer-events: none;
}

/* Tweet Examples Section */
.tweet-examples-intro {
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: rgb(32, 33, 34);
  font-weight: 500;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* .tweet-examples-grid inherits from .variations-grid */

.tweet-example-item {
  position: relative;
}

.tweet-example-card-link {
  text-decoration: none;
  display: block;
}

.tweet-example-card {
  background: #fff;
  border: 1px solid #cbc7c4;
  border-radius: 14px;
  padding: 12px;
  width: 320px;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}



.tweet-admin-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  gap: 4px;
}

.tweet-reject-btn,
.tweet-delete-btn {
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.tweet-reject-btn {
  background: #ffc107;
  font-size: 18px;
}

.tweet-delete-btn {
  background: #dc3545;
}

.tweet-reject-btn:hover,
.tweet-delete-btn:hover {
  opacity: 0.85;
}

.tweet-header {
  display: flex;
  align-items: start;
  gap: 8px;
  margin-bottom: 12px;
}

.tweet-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tweet-avatar-placeholder {
  width: 32px;
  height: 32px;
  background: #1da1f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.tweet-user-info {
  flex-grow: 1;
}

.tweet-display-name {
  font-weight: bold;
  font-size: 15px;
  color: #000;
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}

.tweet-display-name:hover {
  text-decoration: underline;
}

.tweet-handle {
  font-size: 14px;
  color: #666;
  text-decoration: none;
  display: block;
}

.tweet-handle:hover {
  text-decoration: underline;
}

.tweet-text {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  user-select: text;
  cursor: text;
  white-space: pre-line;
}

.tweet-mention {
  color: #1DA1F2;
  text-decoration: none;
}

.tweet-mention:hover {
  text-decoration: underline;
}

.tweet-media {
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.tweet-media img {
  width: 100%;
  height: auto;
  display: block;
}

.tweet-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  max-height: 400px;
}

.tweet-media-grid.has-3 {
  grid-template-columns: repeat(2, 1fr);
}

.tweet-media-grid.has-3 .tweet-media-item:first-child {
  grid-row: 1 / 3;
}

.tweet-media-grid.has-4 {
  grid-template-columns: repeat(2, 1fr);
}

.tweet-media-item {
  width: 100%;
  height: 100%;
  min-height: 150px;
  display: block;
  object-fit: cover;
}

.tweet-timestamp {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  display: block;
}

.tweet-timestamp:hover {
  text-decoration: underline;
}

.meme-variations.trending-memes-section {
  margin: 28px 0 20px;
}

.meme-variations.trending-memes-section h2 {
  color: #222;
  position: relative;
  display: flex;
  align-items: center;
}

.trending-title-text {
  display: inline-block;
  position: relative;
}

.trending-status-dot {
  width: 10px;
  height: 10px;
  display: block;
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
}

.trending-status-dot::before {
  content: "";
  height: 10px;
  width: 10px;
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 100%;
  background-color: #00ff6a;
  filter: blur(2.5px);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.7;
    filter: blur(1px);
    transform: scale(1.3);
  }

  50% {
    opacity: 1;
    filter: blur(1.5px);
    transform: scale(1.5);
  }
}

.meme-variations.trending-memes-section .variation-card {
  width: 100%;
  max-width: 235px;
}


.meme-variations.trending-memes-section .tweet-header img {
  vertical-align: bottom;
}

.meme-variations.trending-memes-section .tweet-avatar,
.meme-variations.trending-memes-section .tweet-avatar-placeholder {
  width: 24px;
  height: 24px;
}

.meme-variations.trending-memes-section .tweet-info-column {
  gap: 4px;
  display: flex;
  flex-direction: column;
}



.meme-variations.trending-memes-section .tweet-handle {
  font-size: 12px;
  text-decoration: none;
  color: #555;
}

.meme-variations.trending-memes-section .tweet-handle:hover {
  text-decoration: underline;
}

.meme-variations.trending-memes-section .tweet-header {
  gap: 9px;
  padding: 6px 10px 8px 10px;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0;
}

.meme-variations.trending-memes-section .tweet-text {
  font-size: 13px;
  padding: 10px 10px 4px 10px;
  margin: 0;
}

.meme-variations.trending-memes-section .tweet-example-card {
  padding: 0;
  max-width: 205px;
}

.meme-variations.trending-memes-section .trending-sightings-captions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
  width: 100%;
  margin-top: 5px;
}

.meme-variations.trending-memes-section .tweet-time-ago {
  font-size: 10px;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
}

.meme-variations.trending-memes-section .tweet-time-ago:active {
  text-decoration: underline;
}

@media (hover: hover) and (pointer: fine) {
  .meme-variations.trending-memes-section .tweet-time-ago:hover {
    text-decoration: underline;
  }
}




.meme-variations.trending-memes-section .variation-title-below {
  max-width: 235px;
}

.meme-variations.trending-memes-section .hidden-tweet {
  display: none;
}

.meme-variations.trending-memes-section .hidden-tweet.shown {
  display: block;
}

.meme-variations.trending-memes-section .show-more-container {
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
  cursor: pointer;
}

.meme-variations.trending-memes-section .show-more-container.hidden {
  display: none;
}

.meme-variations.trending-memes-section .hidden-tweet-avatars {
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.meme-variations.trending-memes-section .hidden-tweet-avatar,
.meme-variations.trending-memes-section .hidden-tweet-avatar-placeholder {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -8px;
  opacity: 0.9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.meme-variations.trending-memes-section .hidden-tweet-avatar:first-child,
.meme-variations.trending-memes-section .hidden-tweet-avatar-placeholder:first-child {
  margin-left: 0;
}

.meme-variations.trending-memes-section .hidden-tweet-avatar-placeholder {
  background-color: #999;
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meme-variations.trending-memes-section .show-more-tweets-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: rgb(210 210 210 / 35%);
  border: 1px solid rgb(180 180 180 / 40%);
  transition: 0.15s ease-out;
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  color: #555;
  flex-shrink: 0;
}

.meme-variations.trending-memes-section .show-more-tweets-btn:hover {
  background-color: rgb(190 190 190 / 90%);
  color: #222;
}

/* Hide mobile-all-avatars on desktop, show on mobile */
.meme-variations.trending-memes-section .mobile-all-avatars {
  display: none;
}

/* Hide button on desktop for single short tweet */
.meme-variations.trending-memes-section .show-more-container.hide-btn-desktop .show-more-tweets-btn {
  display: none;
}

@media screen and (max-width: 768px) {
  .tweet-example-card {
    width: 280px;
  }

  .pending-cluster-card {
    flex-direction: column;
  }

  .pending-cluster-img {
    width: 100%;
    max-width: 300px;
  }

  .pending-cluster-approve-form {
    flex-direction: column;
    align-items: stretch;
  }

  .meme-variations.trending-memes-section {
    margin-top: 0;
  }

  .meme-variations.trending-memes-section h2,
  .all-meme-templates-heading {
    margin-top: 16px;
    font-size: 18px;
    text-align: left;
    margin-bottom: 10px;
    font-weight: 600;
  }

  .trending-status-dot {
    width: 6px;
    height: 6px;
    right: -18px;
  }

  .trending-status-dot::before {
    width: 6px;
    height: 6px;
  }

  .meme-variations.trending-memes-section .variation-card {
    width: auto;
    max-width: 172px;
  }

  .meme-variations.trending-memes-section .tweet-example-card {
    max-width: 150px;
  }

  .meme-variations.trending-memes-section .variation-title-below {
    max-width: 172px;
  }

  .meme-variations.trending-memes-section .tweet-avatar,
  .meme-variations.trending-memes-section .tweet-avatar-placeholder {
    width: 18px;
    height: 18px;
  }

  .meme-variations.trending-memes-section .tweet-handle {
    font-size: 10px;
  }

  .meme-variations.trending-memes-section .tweet-time-ago {
    font-size: 9px;
  }

  .meme-variations.trending-memes-section .tweet-header {
    gap: 6px;
    padding: 4px 10px 6px 10px;
  }

  span.desktop-only {
    display: none;
  }

  /* Mobile avatar styling - visibility controlled by JS */
  .meme-variations.trending-memes-section .mobile-all-avatars {
    align-items: center;
    padding-left: 8px;
  }

  /* Always show button on mobile, even for single short tweets */
  .meme-variations.trending-memes-section .show-more-container.hide-btn-desktop .show-more-tweets-btn {
    display: block;
  }

  /* Mobile styles for trending CTA card - double width */
  .trending-cta-card {
    width: auto;
    padding: 20px 16px;
  }

  .trending-cta-buttons {
    flex-direction: row;
    gap: 10px;
  }


  .trending-cta-description {
    font-size: 13px;
  }

  .trending-cta-button {
    padding: 10px 20px;
    font-size: 13px;
    flex: 1;
  }
  .variation-item.trending-cta-item .variation-card {
    max-width: 320px !important;
    max-height: 170px !important;
    min-height: 0 !important;
}
.trending-cta-buttons {
  flex-direction: row !important;
}
}

/* Trending CTA card for non-logged-in users */
.trending-cta-spacer {
  color: transparent;
  user-select: none;
}

.trending-cta-card {
  width: 100%;
   
 
    min-height: 235px;
    min-width: 235px;
    background: rgba(223, 223, 223, 0.5);
    border: 2px solid rgb(143 139 136 / 35%);
 
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.trending-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
}

.trending-cta-title {
  font-size: 15px;
  font-weight: 700;
  color: #000;
  margin: 0;
  line-height: 1.2;
}

.trending-cta-description {
  font-size: 13px;
  color: #444;
  margin: 0;
  line-height: 1.4;
}

.trending-cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.trending-cta-button, a.trending-cta-button {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
}

.trending-cta-button-primary {
  background: #F50;
  color: white;
  border-color: #F50;
}

.trending-cta-button-secondary {
  background: white;
  color: #F50;
  border-color: rgba(255, 85, 0, 0.3);
}

@media screen and (max-width: 450px) {
  .memes-page h1.index-page-title {
    font-size: 21px;
  }

  .memes-index-header p:not(:last-child) {
    margin-bottom: 5px;
  }

  .memes-index-header p {
    font-size: 13px;
  }



  .meme-variations.trending-memes-section h2,
  .all-meme-templates-heading {
    font-size: 17px;
  }

  .meme-variations.trending-memes-section {
    margin-bottom: 24px;
  }
}
