/* Caption This Styles */

/* iOS Zoom Prevention */
* {
  touch-action: manipulation;
}

html, body {
  touch-action: manipulation;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: none;
}

/* Allow text selection for inputs and text areas */
input, textarea, [contenteditable] {
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}

/* Allow all touch actions on upload area for drag and drop */
#upload-dropzone-wrapper, #upload-dropzone, #file-input {
  touch-action: auto;
}

/* Footer Styles (from lander) */
#footer {
  position: relative;
  width: 100%;
  margin-top: 110px;
  margin-bottom: 40px;
  font-size: 1.3rem;
}

#footer a {
  color: #666;
  text-decoration: none;
}

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

#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 a {
  display: block;
}

#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;
  margin-top: 40px;
}

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

#footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

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

.caption-this-container {
  padding: 2rem 0;
  background: #f0f0f0;
  min-height: 100vh;
  overflow-x: hidden;
}

.caption-this-container .container {
  display: flex
  ;
      flex-direction: column;
      justify-content: center;
      align-items: center;
  margin: 0 auto;
  padding: 0 1rem;
}

.title-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.subtitle-container {
  text-align: center;
  margin-top: 0rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(25, 31, 31, 0.8);
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}

.subtitle strong {
  color: #1a1f1f;
  font-weight: 700;
}

.caption-this-container .title {
  margin: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.caption-this-container .title svg {
  width: 320px;
  height: 36px;
  max-width: 100%;
}

.caption-this-container .logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block;
  transition: opacity 0.2s ease;
}

.caption-this-container .logo-link:hover {
  opacity: 0.8;
}

.viral-stats {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  filter: blur(1.2px);
  opacity: 0.8;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  animation-duration: 3s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

/* Organized circular arrangement around 320px logo */
/* Top Arc - Balanced spacing around logo */
.viral-stats.pos-top-left {
  top: -45px;
  left: -65px;
  transform: rotate(-12deg);
  animation-name: float1;
  animation-delay: 0s;
}

.viral-stats.pos-top-center {
  top: -50px;
  left: 63%;
  transform: translateX(-50%) rotate(1deg);
  animation-name: float2;
  animation-delay: 0.5s;
}

.viral-stats.pos-top-right {
  top: -45px;
  right: -65px;
  transform: rotate(12deg);
  animation-name: float3;
  animation-delay: 1s;
}

/* Side Stats - Balanced at logo middle height */
.viral-stats.pos-left-side {
  top: 50%;
  left: -90px;
  transform: translateY(-50%) rotate(-20deg);
  animation-name: float4;
  animation-delay: 1.5s;
}

.viral-stats.pos-right-side {
  top: 50%;
  right: -28%;
  transform: translateY(-50%) rotate(20deg);
  animation-name: float5;
  animation-delay: 2s;
}

/* Bottom Arc - Balanced spacing around logo */
.viral-stats.pos-bottom-left {
  top: -45px;
  left: -50%;
  transform: rotate(-12deg);
  animation-name: float6;
  animation-delay: 2.5s;
}

.viral-stats.pos-bottom-left-mid {
  top: -59px;
  right: -48%;
  transform: rotate(23deg);
  animation-name: float7;
  animation-delay: 0.2s;
}

.viral-stats.pos-bottom-center {
  top: -50px;
  left: 30%;
  transform: translateX(-50%) rotate(18deg);
  animation-name: float8;
  animation-delay: 0.7s;
}

.viral-stats.pos-bottom-right {
  top: -2px;
  right: -50%;
  transform: rotate(26deg);
  animation-name: float9;
  animation-delay: 1.2s;
}

/* Icon sizes */
.stats-icon {
  width: 16px;
  height: 16px;
  fill: #6b7280;
}

.stats-icon.small {
  width: 12px;
  height: 12px;
}

.stats-icon.medium {
  width: 18px;
  height: 18px;
}

/* Number sizes */
.stat-number {
  font-weight: 600;
  color: #6b7280;
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  text-align: left;
}

.stat-number.small {
  font-size: 11px;
  min-width: 32px;
  width: 32px;
}

.stat-number.medium {
  font-size: 14.3px;
  min-width: 40px;
  width: 40px;
}

.stat-number.large {
  font-size: 17.6px;
  font-weight: 700;
  min-width: 48px;
  width: 48px;
}

/* Like and Retweet specific colors */
.like-icon {
  fill: #f91880 !important;
}

.like-number {
  color: #f91880 !important;
}

.retweet-icon {
  fill: rgb(0, 186, 124) !important;
}

.retweet-number {
  color: rgb(0, 186, 124) !important;
} 

.like-number {
  color: #6b7280 !important;
}

svg.stats-icon.like-icon {
  fill: #6b7280 !important;
}

.retweet-icon {
  fill: #6b7280 !important;
}

.retweet-number {
  color: #6b7280 !important;
}


.stats-icon {
  fill: #6b7280 !important;
}


.stat-number {
  color: #6b7280 !important;
}
/* Counter animation */
@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

.count-up {
  animation: countUp 0.5s ease-in;
}

/* Floating animations for viral stats */
@keyframes float1 {
  0% { transform: translateY(0px) translateX(0px) rotate(-12deg); }
  100% { transform: translateY(-4px) translateX(2px) rotate(-12deg); }
}

@keyframes float2 {
  0% { transform: translateX(-50%) translateY(0px) rotate(1deg); }
  100% { transform: translateX(-50%) translateY(-3px) rotate(1deg); }
}

@keyframes float3 {
  0% { transform: translateY(0px) translateX(0px) rotate(12deg); }
  100% { transform: translateY(-3px) translateX(-2px) rotate(12deg); }
}

@keyframes float4 {
  0% { transform: translateY(-50%) translateX(0px) rotate(-20deg); }
  100% { transform: translateY(-50%) translateX(-3px) rotate(-20deg); }
}

@keyframes float5 {
  0% { transform: translateY(-50%) translateX(0px) rotate(20deg); }
  100% { transform: translateY(-50%) translateX(3px) rotate(20deg); }
}

@keyframes float6 {
  0% { transform: translateY(0px) translateX(0px) rotate(-12deg); }
  100% { transform: translateY(3px) translateX(-2px) rotate(-12deg); }
}

@keyframes float7 {
  0% { transform: translateY(0px) translateX(0px) rotate(23deg); }
  100% { transform: translateY(2px) translateX(3px) rotate(23deg); }
}

@keyframes float8 {
  0% { transform: translateX(-50%) translateY(0px) rotate(18deg); }
  100% { transform: translateX(-50%) translateY(4px) rotate(18deg); }
}

@keyframes float9 {
  0% { transform: translateY(0px) translateX(0px) rotate(26deg); }
  100% { transform: translateY(3px) translateX(2px) rotate(26deg); }
}

@media (max-width: 1024px) {
 
  
  .title-container {
    flex-wrap: wrap;
    gap: 4px;
  }
}

/* Upload Section Styles */
.upload-section {
  margin: 1rem 0;
}

/* 3-Step Process Explainer */
.process-explainer {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 3rem auto;
  max-width: 900px;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
  text-align: center;
  padding: 1rem;
}

.step-icon-circle {
  width: 64px;
  height: 64px;
  background: #ff912d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(255, 145, 45, 0.2);
  margin-bottom: 8px;
  position: relative;
}

.step-icon {
  width: 28px;
  height: 28px;
  color: #000;
}

.text-icon {
  font-size: 24px;
  font-weight: normal;
  color: #000;
  font-family: 'Space Mono', monospace;
  letter-spacing: -1px;
}

.step-content {
  flex: 1;
}

.step-number-circle {
  position: absolute;
  bottom: -6px;
  left: -6px;
  width: 24px;
  height: 24px;
  background: #ff912d;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Space Mono', monospace;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.upload-step-number {
  position: absolute;
  top: -41px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  background: #fff;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Space Mono', monospace;
  border: 2px solid #e2e2e2;
  z-index: 10;
}

.step-title {
  font-size: 20px;
  font-weight: bold;
  color: rgb(25, 31, 31);
  margin: 0 0 8px 0;
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
}

.step-description {
  font-size: 15px;
  color: rgba(25, 31, 31, 0.7);
  margin: 0;
  font-family: 'Space Mono', monospace;
  line-height: 1.5;
  text-wrap: balance;
}

@media (max-width: 767px) {

  .color-picker-presets {display: flex;flex-wrap: nowrap;width: 100%;overflow: hidden;width: calc(100% + 32px);margin-right: -16px;margin-left: -16px;position: relative;}
  .process-explainer {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .process-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .step-number-circle {
    bottom: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    font-size: 12px;
    border: 1.5px solid #fff;
  }
}



#upload-dropzone-wrapper {
  background: #fbf9f8;
  padding: 1rem;
  border: 2px dashed #cdcdcd;
  text-align: center;
  cursor: pointer;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 28px;
}

.upload-dropzone {
  border: 2px solid #cbc7c4;
  background: #fff;
  padding: 3rem 2rem;
  border-radius: 18px;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
}

.upload-dropzone  {
  border-color: #ff912d;
  background: #fce8d8;
}

.upload-dropzone.drag-over {
  border-color: #ff912d;
  background: #fffbf7;
  transform: scale(1.02);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: #374151;
  transition: color 0.3s ease;
}

.upload-dropzone:hover .upload-icon,
.upload-dropzone.drag-over .upload-icon {
  color: #ff912d;
}

.upload-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.upload-subtext {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

#file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* Upload loading spinner */
.upload-loading-spinner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 3;
  border-radius: 18px;
}

.upload-loading-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 145, 45, 0.1);
  border-top-color: #FF912D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.upload-loading-spinner .loading-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Space Mono', monospace;
}

/* Hide upload content when loading (but maintain spacing) */
.upload-dropzone.loading .upload-content {
  visibility: hidden;
}

.upload-dropzone.loading .upload-loading-spinner {
  display: flex !important;
}

/* Main Content Layout */
.main-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 5rem;
  
  
}

.content-area {
  flex: 1;
  min-width: 0;
}

.uploaded-file {
  text-align: center;
}

.action-buttons {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

/* Right Sidebar */
.right-sidebar {
  width: 420px;
  background-color: rgba(223, 223, 223, 0.5);
  border: 1px solid rgb(143 139 136 / 35%);
  border-radius: 8px;
  position: sticky;
  top: 2rem;
 
  overflow-y: auto;
}

.sidebar-content {
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 16px;
  font-weight: bold;
  color: rgb(25, 31, 31);
  margin: 0 0 1rem 0;
  text-align: center;
  border-bottom: 1px solid rgb(143 139 136 / 35%);
  padding-bottom: 8px;
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
  user-select: none;
}

.settings-panel {
  
  
  
  margin-bottom: 8px;
  position: relative;
  overflow: visible;
}

div#header-settings-panel {
  margin-bottom: 30px;
}

.panel-title {
  font-size: 16px;
  font-weight: bold;
  color: rgb(25, 31, 31);
  margin: 0 0 12px 0;
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
  user-select: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .main-content {
    flex-direction: column;
  }
  
  .right-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
}


@media (max-width: 767px) {
  .upload-dropzone {
    padding: 2rem 1rem;
 
  }
  .feedback-section h2  .examples-title-line.second {
    font-size: 77%;
    margin-top: 14px;
}
 
  .upload-text {
    font-size: 1.125rem;
  }
  
 
  
  .sidebar-content {
    padding: 1rem;
  }
  
 
}

.main-media {
  z-index: 4;
}

.caption-this-container #add-text-btn {
  margin-bottom: 30px;
}
.caption-this-container #add-text-btn,
.caption-this-container #download-btn,
.caption-this-container #reset-settings-btn {
  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;
  user-select: none;
  width: 100%;
}

.caption-this-container #add-text-btn:hover,
.caption-this-container #download-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.caption-this-container #add-text-btn:active,
.caption-this-container #download-btn:active {
  background-color: rgba(255, 255, 255, 0.3);
}

.caption-this-container #download-btn {
  background-color: rgb(0 255 106 / 60%);
  border: 1px solid rgb(0 204 85 / 50%);
  color: rgb(25, 31, 31);
}

.caption-this-container #download-btn:hover {
  background-color: rgb(0 255 106 / 70%);
}

.caption-this-container #download-btn:active {
  background-color: rgb(0 255 106 / 80%);
}

.caption-this-container .media-container {
  border: 1px solid #cbc7c4;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
}

/* Media loading spinner - furthest back z-index */
.caption-this-container .media-loading-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  z-index: 1;
  gap: 16px;
}

.caption-this-container .media-loading-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 145, 45, 0.1);
  border-top-color: #FF912D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.caption-this-container .media-loading-spinner .loading-text {
  color: #666;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Space Mono', monospace;
}

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

.caption-this-container #uploaded-canvas {
  border-radius: 3px;
}

/* Responsive media sizing - stretch to fill container */
.caption-this-container .responsive-media {
  display: block;
  height: auto;
 
}

/* Desktop: stretch to 600px */
@media (min-width: 768px) {
  .caption-this-container .responsive-media {
    width: 600px;
  }
}

/* Large desktop: stretch to 700px */
@media (min-width: 1200px) {
  .caption-this-container .responsive-media {
    width: 700px;
  }
  
  .text-layers-list {
    max-height: calc(100vh - 250px);
  }
}

/* Mobile: stretch to fit screen */
@media (max-width: 767px) {
  .caption-this-container .responsive-media {
    width: calc(100vw - 2rem);
  }
  
  .caption-this-container .container {
    padding: 0 0.5rem;
  }
}

/* Toast notification system - matching main editor */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  cursor: pointer;
  border: none;
  background: #b0b0b0;
  font-weight: 500;
  border-radius: 14px;
  padding: 8px 11px 8px 11px;
   
  position: relative;
  font-size: 13px;
  border: none;
  transition: all 0.3s ease-out;
  margin-bottom: 10px;
  transform: translateX(-100%);
  font-family: 'Space Mono', monospace;
  color: #000;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: #3ff88c;
  color: #000;
  border: 1px solid #2dd174;
}

.toast.processing {
  background: #ffdf4e;
  color: #000;
  border: 1px solid #e6c63a;
}

.toast.error {
  background: #ff4f4f;
  color: #fff;
  border: 1px solid #e63946;
}

.toast.default {
  border: 1px solid #9a9a9a;
}

.toast-spinner {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-top: 1px solid #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

.toast-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Legacy header settings panel - now moved to sidebar */

.setting-row {
  margin-bottom: 8px;
}

.setting-row:last-child {
  margin-bottom: 0;
}

/* Header color picker container */
.setting-row:has(.color-picker-button) {
  display: flex;
      flex-direction: row-reverse;
      align-items: flex-start;
}

.setting-row:has(.color-picker-button) .text-setting-label {
  margin-bottom: 6px;
}

/* Toggle Switch - Large Modern Design */
#header-settings-panel {
  padding: 14px;
  background-color: rgba(255, 255, 255, 0.2);
   
  border-radius: 12px;
  border: 1px solid rgb(178 178 178 / 70%);
  
}

.toggle-container {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
   
  transition: all 0.2s ease;
}

.toggle-container:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

 

.toggle-container input[type="checkbox"] {
  display: none;
}

.mc-toggle-slider {
  position: relative;
  width: 64px;
  height: 32px;
  background-color: rgb(249 249 249 / 85%);
  border: 1px solid rgb(143 139 136 / 45%);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 
}

.mc-toggle-slider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  width: 22px;
  height: 22px;
  background: rgb(143 139 136 / 45%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-50%);
 
}
 

.toggle-container input:checked + .mc-toggle-slider::before {
  transform: translateY(-50%) translateX(31px);
  background-color: #FF912D;
 
}

.toggle-label {
  font-weight: bold;
  color: rgb(25, 31, 31);
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
  font-size: 14px;
  user-select: none;
  flex: 1;
}

/* Active state for toggle container */
 
  
 
/* Range Slider */
.slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: rgb(176 176 176 / 50%);
  border: 1px solid rgb(143 139 136 / 35%);
  outline: none;
  margin: 8px 0;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgb(143 139 136 / 35%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  background-color: rgba(255, 255, 255, 1);
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgb(143 139 136 / 35%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  background-color: rgba(255, 255, 255, 1);
}

/* Header Settings Split Layout */
.header-settings-split {
  display: flex;
  gap: 20px;
}
 
/* Header Setting Title */
.header-setting-title {
  font-size: 14px;
  font-weight: 600;
  color: rgb(25, 31, 31);
  margin: 0 0 10px 0;
  font-family: 'Space Mono', monospace;
}

/* Header Height Slider */
.header-height-slider {
  align-items: center;
  font-size: 12px;
  width: 100%;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 29px;
  gap: 4px;
  margin-bottom: 30px;
}
.header-setting-half:first-child {
  width: 100%;
}

.header-height-slider label {
  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%);
      padding: 3px 14px 3px 14px;
  transition: 0.3s ease-out;
  overflow: hidden;
  min-height: 29px;
  z-index: 1;
}

.header-height-slider .opacity-icon {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

input#header-height {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  outline: none;
  opacity: 1;
  -webkit-transition: .2s;
  transition: opacity .2s;
  background-color: rgb(249 249 249 / 85%);
  border: 1px solid rgb(143 139 136 / 45%);
  border-radius: 4px;
  position: relative;
  z-index: 2;
}

#header-options {
  background-color: rgb(234 234 234);
  padding: 18px;
  border-radius: 12px;
  margin-top: 14px;
}

input#header-height::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: rgb(255 145 45);
  border: 1px solid rgb(143 139 136 / 45%);
  cursor: pointer;
}

input#header-height::-webkit-slider-runnable-track {
  margin-right: -1px;
  margin-left: -1px;
}

/* Text Opacity Slider */
.text-opacity-slider {
  align-items: center;
  font-size: 12px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 29px;
}

.text-opacity-slider label {
  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%);
      padding: 3px 14px 3px 14px;
      transition: 0.3s ease-out;
      overflow: hidden;
      z-index: 1;
      min-width: 72px;
      padding: 3px 10px !important;
}

.text-opacity-slider .opacity-icon {
  width: 16px;
  height: 16px;
  margin-right: 5px;
}

.text-opacity-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  outline: none;
  opacity: 1;
  -webkit-transition: .2s;
  transition: opacity .2s;
  background-color: rgb(249 249 249 / 85%);
  border: 1px solid rgb(143 139 136 / 45%);
  border-radius: 4px;
  position: relative;
  z-index: 2;
}

.text-opacity-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: rgb(255 145 45);
  border: 1px solid rgb(143 139 136 / 45%);
  cursor: pointer;
}

.text-opacity-slider input[type="range"]::-webkit-slider-runnable-track {
  margin-right: -1px;
  margin-left: -1px;
}

/* Color Input */
.color-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgb(143 139 136 / 35%);
  border-radius: 4px;
  font-size: 12px;
  margin-top: 4px;
  font-family: 'Space Mono', monospace;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.color-input:focus {
  outline: none;
  border-color: rgb(250 132 24);
  background-color: rgba(255, 255, 255, 1);
}

/* Text Layers Management */
.text-layers-list {
  overflow-y: visible;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.text-layers-list::-webkit-scrollbar {
  display: none;
}

/* Empty state styling - compact like one text layer */
.layers-empty-state {
 
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(25, 31, 31, 0.5);
   
  font-family: 'Space Mono', monospace;
   
   
    border-radius: 10px;
    background: rgb(255 255 255 / 30%);
    padding: 15px;
    font-size: 13px;
    
 
  border: 1px dashed rgb(143 139 136 / 25%);
  
  margin-bottom: 4px;
}

.layers-empty-state svg {
  width: 16px;
  height: 16px;
  opacity: 0.4;
  flex-shrink: 0;
}

/* Text layer styles matching editor layers */
.text-layer-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
  margin-bottom: 4px;
  flex-direction: column;
  border: 1px solid rgb(178 178 178 / 70%);
  border-radius: 12px;
}

.text-layer-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
 

/* Layer header (icon, name, index) */
.text-layer-item > .layer-img,
.text-layer-item > .layer-name,
.text-layer-item > .layer-index {
  display: flex;
  align-items: center;
}

.layer-img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background-color: #333;
  margin-right: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

  .text-layer-item.active .layer-img .text-layer-icon{
    color: #000;
  }
  .text-layer-item.active .layer-img {
    background-color:#FF912D;
  }


.layer-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.layer-trash {
  width: 26px;
  height: 26px;
  margin-left: 10px;
  background-color: rgba(244, 67, 54, 0.6);
  border: 1px solid rgba(244, 67, 54, 0.8);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.layer-trash:hover {
  background-color: rgba(244, 67, 54, 0.8);
}

.layer-trash svg {
  width: 12px;
  height: 12px;
  stroke: white;
  stroke-width: 2;
}
 

.layer-name {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  margin-right: auto;
}

.layer-index {
  font-size: 16px;
  margin-left: 8px;
  text-align: right;
  flex-shrink: 0;
  padding: 6px;
  color: #222;
  transition: opacity 0.2s;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.text-layer-icon {
  font-size: 15px;
  color: #ADADAD;
  text-align: center;
}

/* Rearrange layout to match editor */
.text-layer-item {
  flex-direction: column;
  align-items: center;
}

.text-layer-settings {
  display: none;
  background-color: rgb(234 234 234);
  border: 1px solid rgb(178 178 178 / 70%);
  padding: 18px;
  border-radius: 12px;
  margin-top: 14px;
  width: 100%;
}

.text-layer-item.expanded .text-layer-settings {
  display: block;
}

.text-setting-row {
  margin-bottom: 21px;
}

.text-setting-row:last-child {
  margin-bottom: 0;
}

.text-setting-label {
  font-size: 12px;
  font-weight: 600;
  color: rgb(25, 31, 31);
  font-family: 'Space Mono', monospace;
  margin-bottom: 10px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
 
}

.text-setting-input {
  width: 100%;
  

  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgb(143 139 136 / 45%);
  padding: 8px 14px;

  
  
  font-size: 16px; /* Prevent iOS zoom on focus */
  font-family: 'Space Mono', monospace;
  
  transition: all 0.2s ease;
}

.text-setting-input:focus {
  outline: none;
  border-color: rgb(250 132 24);
  background-color: rgba(255, 255, 255, 0.9);
}

.text-setting-select {
  width: 100%;
 
 
 
  font-size: 16px; /* Prevent iOS zoom on focus */
  font-family: 'Space Mono', monospace;
  
 
  border-radius: 10px;
  background-color: rgb(249 249 249 / 85%);
  border: 1px solid rgb(143 139 136 / 45%);
  padding: 8px 14px;
 
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.text-setting-select:active {
  outline: none;
  border-color: rgb(250 132 24);
}

/* .text-setting-select:hover {
  border-color: rgb(143 139 136 / 60%);
} */

.text-setting-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}

.text-setting-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: rgb(250 132 24);
}

.text-setting-checkbox .text-setting-label {
  margin-bottom: 0;
  cursor: pointer;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
}

/* Split row layout for color and font */
.text-setting-row-split {
  display: flex;
  gap: 12px;
}

.text-setting-half {
  flex: 1;
}

/* When color picker is in the row, make it smaller */
.text-setting-half:has(.color-picker-button) {
  flex: 0 0 30%;  /* Color picker takes ~30% (about 100px for more label space) */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Styling options layout */
.text-styling-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 4px;
}

.text-setting-checkbox-small {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  padding: 4px 0;
}

.text-setting-checkbox-small input[type="checkbox"] {
  display: none;
}

/* Custom checkbox using pseudo-elements (based on saved-item pattern) */
.text-setting-checkbox-small::before {
  content: '';
  width: 24px;
  height: 24px;
  border: 1px solid rgb(143 139 136 / 45%);
  border-radius: 4px;
  background: rgb(249 249 249 / 85%);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.text-setting-checkbox-small input[type="checkbox"]:checked ~ .text-setting-checkbox-small::before {
  background: #FF912D;
  border-color: #e87d1c;
}

.text-setting-checkbox-small.checked::before {
  background: #FF912D;
  border-color: #e87d1c;
}

.text-setting-checkbox-small.checked::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmZmZmYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSIyMCA2IDkgMTcgNCAxMiI+PC9wb2x5bGluZT48L3N2Zz4=);
  filter: invert(1);
  background-size: 60%;
  background-repeat: no-repeat;
  background-position: center;
}

.text-setting-label-small {
  font-size: 11px;
  font-weight: 600;
  color: rgb(25, 31, 31);
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Text layer delete button */
.text-layer-delete-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background-color: rgba(244, 67, 54, 0.6);
  border: 1px solid rgba(244, 67, 54, 0.8);
  border-radius: 4px;
  color: white;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.text-layer-delete-button:hover {
  background-color: rgba(244, 67, 54, 0.8);
}

.text-layer-delete-button svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Text Color Picker Button */
.color-picker-button {
  width: 44px;
  height: 44px;
 
 
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: rgb(249 249 249 / 85%);
  border: 1px solid rgb(143 139 136 / 45%);
  padding: 3px 14px 3px 14px;
  flex-shrink: 0;
}

.color-picker-button:hover {
  border-color: rgb(143 139 136 / 60%);
}

.color-picker-button .color-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 1px solid rgb(143 139 136 / 45%);

  border-radius: 6px;
}

/* Text Color Picker Modal */
.color-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background: #ededed;
  border: 1px solid rgb(143 139 136 / 35%);
  border-radius: 8px;
  padding: 16px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.color-picker-handle {
  display: none !important;
}
 

.color-picker.open {
  opacity: 1;
  pointer-events: all;
}

 

 
.color-picker-content {
  width: 280px;
}

.color-picker-gradient {
  width: 100%;
  height: 180px;
  border-radius: 4px;
  position: relative;
  cursor: crosshair;
  margin-bottom: 16px;
}

.color-picker-selector {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.color-picker-hue {
  width: 100%;
  height: 10px;
  margin-bottom: 16px;
  border-radius: 4px;
  background: linear-gradient(to right, 
    hsl(0, 100%, 50%) 0%,
    hsl(60, 100%, 50%) 16.66%,
    hsl(120, 100%, 50%) 33.33%,
    hsl(180, 100%, 50%) 50%,
    hsl(240, 100%, 50%) 66.66%,
    hsl(300, 100%, 50%) 83.33%,
    hsl(360, 100%, 50%) 100%
  );
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.color-picker-hue::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-picker-hue::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.2);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

 
/* Header Options */
 



.logo-container {
  padding: 45px 0 40px;
}

/* Viral Examples Section */
.viral-examples-section {
  text-align: center;
  padding: 4rem 1rem 2rem;
  color: rgba(25, 31, 31, 0.7);
  background: #f0f0f0;
  margin-top: 3rem;
  overflow-x: hidden;
  max-width: 100%;
}

.viral-examples-section h2 {
  font-size: 1.8rem;
  font-weight: bold;
  color: rgb(25, 31, 31);
  margin: 0 0 0.5rem 0;
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.examples-subtitle {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 2.5rem;
  font-family: 'Space Mono', monospace;
  color: rgba(25, 31, 31, 0.6);
  text-wrap: balance;
}

.tweet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem;
  align-items: start;
}

/* Twitter embed styling - compact grid layout */
.twitter-tweet {
  margin: 0 auto !important;
  max-width: 320px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 12px;
  transform-origin: center;
}

/* Ensure loading state matches twitter embed behavior */
.twitter-tweet.tweet-loading {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 200px;
}

/* Single tweets loading element */
.tweets-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  min-height: 300px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: #64748b;
  margin: 2rem auto;
  max-width: 500px;
}

.tweets-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: tweets-loading-spin 1s linear infinite;
  margin-bottom: 1.5rem;
}

.tweets-loading-text {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b;
  font-family: 'Space Mono', monospace;
  text-align: center;
}

@keyframes tweets-loading-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Individual tweet loading state styles (simplified) */
.tweet-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-height: 200px;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  box-sizing: border-box;
}

.tweet-loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: tweet-loading-spin 1s linear infinite;
  margin-bottom: 1rem;
}

.tweet-loading-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  font-family: 'Space Mono', monospace;
}

@keyframes tweet-loading-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.twitter-tweet:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments for compact tweet grid */
@media (max-width: 1200px) {
  .tweet-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  .tweet-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.8rem;
    padding: 0 0;;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Hide tweets 4+ on mobile - more specific selector */
  .tweet-grid.mobile-limited blockquote.twitter-tweet:nth-child(n+4) {
    display: none !important;
  }
  
  .viral-examples-section {
    padding: 3rem 1rem 2rem;
  }
  
  .show-more-tweets-btn {
    display: block;
    margin: 2rem auto 0;
    padding: 12px 24px;
    background: #FF912D;
    color: #000;
    border: none;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .show-more-tweets-btn:hover {
    background: #e87d1c;
    transform: translateY(-1px);
  }
  
  .show-more-tweets-btn.hidden {
    display: none;
  }
}

/* Mobile tweet limiting - works on all mobile devices */
@media (max-width: 768px) {
  .tweet-grid.mobile-limited blockquote.twitter-tweet:nth-child(n+4),
  .tweet-grid.mobile-limited .twitter-tweet:nth-child(n+4) {
    display: none !important;
  }
}

/* Hide show more button on desktop */
@media (min-width: 769px) {
  .show-more-tweets-btn {
    display: none !important;
  }
}

@media (max-width: 768px) {
  
  
  .viral-examples-section h2 {
    font-size: 1.5rem;
  }
  
  .twitter-tweet {
    max-width: 280px !important;
    min-width: 220px !important;
  }
  
  .tweet-loading-container {
    padding: 2rem 1.5rem;
    min-height: 160px;
    max-width: 280px;
  }
  
  .tweet-loading-spinner {
    width: 20px;
    height: 20px;
  }
  
  .twitter-tweet.tweet-loading {
    min-height: 160px;
  }
  
  .tweets-loading {
    padding: 3rem 1.5rem;
    min-height: 250px;
    margin: 1.5rem auto;
  }
  
  .tweets-loading-spinner {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .tweet-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 0 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Hide tweets 4+ on mobile - more specific selector */
  .tweet-grid.mobile-limited blockquote.twitter-tweet:nth-child(n+4) {
    display: none !important;
  }
  
  .twitter-tweet {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  .viral-examples-section {
    padding: 2rem 1rem 1.5rem;
  }
 
  
  .viral-examples-section h2 {
    font-size: 1.3rem;
  }
  
  .tweet-loading-container {
    padding: 1.5rem 1rem;
    min-height: 140px;
    max-width: 100%;
  }
  
  .tweet-loading-text {
    font-size: 0.8rem;
  }
  
  .twitter-tweet.tweet-loading {
    min-height: 140px;
  }
  
  .tweets-loading {
    padding: 2rem 1rem;
    min-height: 200px;
    margin: 1rem auto;
  }
  
  .tweets-loading-spinner {
    width: 24px;
    height: 24px;
  }
  
  .tweets-loading-text {
    font-size: 0.9rem;
  }
}

/* Feedback Section */
.feedback-section {
  text-align: center;
  padding: 4rem 1rem 6rem;
  color: rgba(25, 31, 31, 0.7);
  background: #f0f0f0;
  margin-top: 1rem;
}

.feedback-section h2 {
  font-size: 1.5rem;
  font-weight: bold;
  color: rgb(25, 31, 31);
  margin: 0 0 1.5rem 0;
  font-family: 'Space Mono', monospace;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.feedback-section h2 * {
  line-height: 1.4;
  font-weight: 600;
}

.feedback-section p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 19px;
  font-family: 'Space Mono', monospace;
  color: rgba(25, 31, 31, 0.8);
}

.feedback-link {
  color: rgb(25, 31, 31);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: opacity 0.2s;
  font-weight: 600;
}

.feedback-link:hover {
  opacity: 0.7;
}

.x-logo-small {
  width: 14px;
  height: 14px;
}

/* Responsive adjustments for viral stats */
@media (max-width: 768px) {
  .caption-this-container .title svg {
    width: 280px;
    height: 32px;
  }

 
  .viral-stats.pos-bottom-left-mid,
  .viral-stats.pos-bottom-right,
  .viral-stats.pos-bottom-left
   {
    display: none;
  }

  .viral-stats.pos-right-side {
    right: -38%;
  }

  .viral-stats.pos-left-side {
    left: -38%;
  }
  
  .subtitle {
    font-size: 1.1rem;
    line-height: 1.5;
    padding: 0 1rem;
  }
  

  .upload-section {
  padding-left: 1rem;
  padding-right: 1rem;
  }
  .subtitle-container {
    margin-top: 1rem;
    max-width: 100%;
  }
  
  /* Adjust viral stats positions for smaller screens */
  /* .viral-stats.pos-top-left,
  .viral-stats.pos-bottom-left {
    left: -50px;
  }
  
  .viral-stats.pos-top-right,
  .viral-stats.pos-bottom-right {
    right: -50px;
  }
  
  .viral-stats.pos-left-side {
    left: -75px;
  }
  
  .viral-stats.pos-right-side {
    right: -75px;
  }
  
  .viral-stats.pos-top-center {
    top: -40px;
  }
  
  .viral-stats.pos-bottom-center {
    bottom: -40px;
  }
  
  .viral-stats.pos-bottom-left-mid {
    bottom: -45px;
    left: 15%;
  } */
}

@media (max-width: 480px) {
  .caption-this-container .title svg {
    width: 240px;
    height: 27px;
  }
  
  /* Further adjust for mobile */
  /* .viral-stats.pos-top-left,
  .viral-stats.pos-bottom-left {
    left: -40px;
  }
  
  .viral-stats.pos-top-right,
  .viral-stats.pos-bottom-right {
    right: -40px;
  }
  
  .viral-stats.left-side {
    left: -80px;
  }
  
  .viral-stats.right-side {
    right: -80px;
  }
  
  .viral-stats.pos-top-left,
  .viral-stats.pos-top-right {
    top: -45px;
  }
  
  .viral-stats.pos-bottom-left,
  .viral-stats.pos-bottom-right {
    bottom: -45px;
  }
  
  .viral-stats.pos-top-center {
    top: -50px;
  }
  
  .viral-stats.pos-bottom-center {
    bottom: -50px;
  }
  
  .viral-stats.pos-bottom-left-mid {
    bottom: -40px;
    left: 13%;
  }
  
  /* Reduce stat text size slightly on mobile */
  /* .viral-stats .stat-number {
    font-size: 0.9em;
  }  */
}

div#header-options {
    background-color: rgb(234 234 234);
    padding: 18px;
    border-radius: 12px;
    margin-top: 14px;
    border: 1px solid rgb(178 178 178 / 70%);
}

.text-opacity-slider {
    flex-direction: row-reverse;
    gap: 4px;
}

.text-setting-half:has(.color-picker-button) {
    flex: 0;
}

.text-setting-row.text-setting-row-split {
    gap: 20px;
}

/* Responsive Footer Styles */
@media screen and (max-width: 768px) {
  #footer {
    font-size: 1rem;
    margin-top: 70px;
  }
  
  #footer-navigations {
    flex-direction: column;
  }
  
  #footer-copyright {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    text-align: center;
  }
}

span.copyright-unicode {
 
  position: relative;
  bottom: -4px;
}

@media (max-width: 768px) {
  .layer-name {
    display: block !important;
  }

  p.upload-text {
    line-height: 1.4;
    text-wrap: balance;
}

  /* Stack font family and weight vertically on mobile */
  .text-setting-row-split {
    flex-direction: column;
    gap: 16px;
  }
  
  .text-setting-half {
    flex: none;
    width: 100%;
  }
  
  /* Ensure color picker row still works properly on mobile */
  .text-setting-half:has(.color-picker-button) {
    flex: none;
    width: auto;
  }

  .feedback-section h2 {
    font-size: 1.3rem;
  }
}


#uploaded-media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

main-media #uploaded-media {
  position: relative;
  z-index: 2;
}
 
