html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.slide-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: none;
}

.slide-wrapper.active {
  opacity: 1;
  display: block;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.quote-overlay {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  text-align: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  padding: 0 10px;
  box-sizing: border-box;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-wrapper.active .quote-overlay {
  opacity: 1;
}

.quote-text {
  display: inline-block;
  font-family: "Nunito", "Segoe UI", "Arial Rounded MT Bold", "Verdana", sans-serif;
  font-weight: 900;
  font-size: 6.5rem;
  line-height: 1.2;
  color: #ffffff;
  -webkit-text-stroke: 0.15em #000000;
  text-stroke: 0.15em #000000;
  padding: 15px 25px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  paint-order: stroke fill;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Large desktops (1920px and up) */
@media (min-width: 1920px) {
  .quote-text {
    font-size: 7.2rem;
  }
}

/* Desktops (1200px - 1919px) - default styles apply */

/* Tablets landscape (1024px - 1199px) */
@media (max-width: 1199px) {
  .quote-text {
    font-size: 5.5rem;
    padding: 14px 22px;
  }
  
  .quote-overlay {
    bottom: 35px;
    width: 92%;
  }
}

/* Tablets portrait (768px - 1023px) */
@media (max-width: 1023px) {
  .quote-text {
    font-size: 4.6rem;
    padding: 12px 20px;
    -webkit-text-stroke: 0.12em #000000;
    text-stroke: 0.12em #000000;
  }
  
  .quote-overlay {
    bottom: 30px;
    width: 94%;
  }
}

/* Large phones landscape (667px - 767px) */
@media (max-width: 767px) {
  .quote-text {
    font-size: 4rem;
    padding: 12px 18px;
    -webkit-text-stroke: 0.1em #000000;
    text-stroke: 0.1em #000000;
  }
  
  .quote-overlay {
    bottom: 60px;
    width: 95%;
    padding: 0 15px;
  }
}

/* Large phones portrait (480px - 666px) */
@media (max-width: 666px) {
  .quote-text {
    font-size: 3.5rem;
    padding: 11px 16px;
    line-height: 1.15;
  }
  
  .quote-overlay {
    bottom: 50px;
    padding: 0 12px;
  }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
  .quote-text {
    font-size: 3rem;
    padding: 10px 14px;
    -webkit-text-stroke: 0.08em #000000;
    text-stroke: 0.08em #000000;
    line-height: 1.1;
  }
  
  .quote-overlay {
    bottom: 40px;
    width: 96%;
    padding: 0 10px;
  }
}

/* Very small phones (360px and below) */
@media (max-width: 360px) {
  .quote-text {
    font-size: 2.4rem;
    padding: 8px 12px;
    -webkit-text-stroke: 0.06em #000000;
    text-stroke: 0.06em #000000;
  }
  
  .quote-overlay {
    bottom: 35px;
    width: 98%;
    padding: 0 8px;
  }
}

/* Extra small devices (320px and below) */
@media (max-width: 320px) {
  .quote-text {
    font-size: 2rem;
    padding: 6px 10px;
    -webkit-text-stroke: 0.05em #000000;
    text-stroke: 0.05em #000000;
  }
  
  .quote-overlay {
    bottom: 30px;
    padding: 0 6px;
  }
}

/* Landscape orientation adjustments for mobile devices */
@media (max-height: 500px) and (orientation: landscape) {
  .quote-text {
    font-size: 3rem;
    padding: 8px 14px;
    line-height: 1.1;
  }
  
  .quote-overlay {
    bottom: 10px;
    max-height: calc(100vh - 20px);
    padding: 0 8px;
  }
}

/* Mobile portrait - ensure text fits vertically */
@media (max-width: 767px) and (orientation: portrait) {
  .quote-overlay {
    max-height: calc(100vh - 120px);
    bottom: 60px;
  }
}

/* Mobile landscape - ensure text fits horizontally and vertically */
@media (max-width: 767px) and (orientation: landscape) {
  .quote-overlay {
    max-height: calc(100vh - 20px);
    bottom: 10px;
    width: 96%;
  }
  
  .quote-text {
    line-height: 1.1;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .quote-text {
    /* Text shadow removed for clean meme-style appearance */
  }
}
