.copy-bar-wrapper {
  position: sticky;
  top: 10px;
  background: var(--white);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.copy-bar {
  display: flex;
  width: 100%;
  max-width: 800px;
  gap: 0;
}

#copy-input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1rem;
  font-size: 1.5rem;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  outline: none;
  color: var(--primary-color);
  text-align: center;
}

#clear-btn {
  background: white;
  border: 2px solid var(--border-color);
  border-left: none;
  border-right: none;
  color: #ff3d00;
  font-weight: bold;
  padding: 0 1.5rem;
  cursor: pointer;
  font-size: 1.2rem;
}

#clear-btn:hover {
  background: #fff0ed;
}

#copy-btn {
  background: var(--primary-color) !important;
  color: white;
  border: none;
  padding: 0 2rem;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background 0.2s;
}

#copy-btn:hover {
  background: #062a66;
}

.toast {
  position: absolute;
  bottom: -40px;
  background: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.hidden {
  display: none;
}

.page-header {
  text-align: center;
  margin: 2rem 0;
}

.faces-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 10px;
}

.face-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.face-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.category-tag {
  background: #3f51b5;
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.1s;
}

.category-tag:hover {
  background: #2c3e50;
  transform: scale(1.05);
}

.content-sections, .related-pages {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.related-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.related-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}
.related-links a:hover {
  text-decoration: underline;
}

/* Load More CSS */
.hidden-face {
    display: none !important;
}
.load-more-container {
    text-align: center;
    margin: 10px 0;
}

/* Style for Load More Button */
#load-more-btn {
    background: var(--secondary-color, #05a04a);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: var(--radius-md, 8px);
    margin: 10px 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#load-more-btn:hover {
    background: #048a40;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}


/* Share Box Styles */
.share-box {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 10px 0;
    box-shadow: var(--hover-shadow);
    text-align: center;
}

.share-title {
    position: relative;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.share-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.share-title span {
    background: #fff;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.share-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #000000; }
.share-btn.telegram { background: #0088cc; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.pinterest { background: #E60023; }
.share-btn.reddit { background: #FF4500; }
.share-btn.copy-link { 
    background: #fff; 
    color: #333; 
    border: 1px solid #d1d1d1; 
}
.share-btn.copy-link:hover {
    background: #f4f4f4;
}

@media (max-width: 600px) {
    #copy-input {
        font-size: 1.1rem;
        padding: 0.6rem 0.5rem;
    }
    #clear-btn {
        padding: 0 0.8rem;
    }
    #copy-btn {
        padding: 0 1rem;
        font-size: 1rem;
    }
    .copy-bar-wrapper {
        padding: 0.5rem;
        top: 0;
        margin: 0;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }
}

/* v32: mobile copy bar must use the full viewport width without horizontal overflow. */
@media (max-width: 768px) {
    .copy-bar-wrapper {
        width: calc(100% + 2rem);
        max-width: none;
        margin-left: -1rem;
        margin-right: -1rem;
        box-sizing: border-box;
        padding: 0.5rem;
        border-radius: 0;
        top: 0;
    }

    .copy-bar {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    #copy-input {
        min-width: 0;
        width: auto;
    }

    #clear-btn,
    #copy-btn {
        flex: 0 0 auto;
    }

    /* Avoid tiny viewport rounding/overflow issues on narrow devices. */
    .container {
        width: 100%;
        max-width: 100%;
    }
}


/* v33 FINAL: full-width mobile copy bar without 100vw/negative-margin overflow. */
@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .copy-bar-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0.5rem !important;
        box-sizing: border-box;
        overflow: hidden;
    }
    .copy-bar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    #copy-input {
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
}


/* v34 FINAL: restore sticky copy bar and keep it at 95% width on mobile. */
.copy-bar-wrapper { position: sticky !important; top: 10px !important; z-index: 100 !important; }
@media (max-width: 768px) {
  .copy-bar-wrapper {
    position: sticky !important; top: 0 !important;
    width: 95% !important; max-width: 95% !important;
    margin: 0 auto !important; padding: 0.5rem !important;
    box-sizing: border-box; border-radius: 8px;
  }
  .copy-bar { width: 100% !important; max-width: 100% !important; min-width: 0; }
}

/* v36: global sticky copy bar on every device. Keep it in normal document flow
   and make it stick near the top while scrolling. */
.copy-bar-wrapper {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 10px !important;
  z-index: 1000 !important;
  align-self: flex-start;
}

/* Sticky positioning must not be trapped by the copy wrapper itself. */
.copy-bar-wrapper {
  overflow: visible !important;
}

@media (max-width: 768px) {
  .copy-bar-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 5px !important;
    z-index: 1000 !important;
    width: 95% !important;
    max-width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* v37 FINAL: robust copy-bar sticky behavior on mobile.
   Keep the wrapper itself overflow-visible; overflow on the sticky element
   can interfere with sticky behavior in some mobile WebKit engines. */
.copy-bar-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 10px !important;
    z-index: 1100 !important;
    overflow: visible !important;
    align-self: stretch !important;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: clip !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    main.container {
        overflow: visible !important;
        transform: none !important;
        contain: none !important;
    }

    .copy-bar-wrapper {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 5px !important;
        z-index: 1100 !important;
        width: 95% !important;
        max-width: 95% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: visible !important;
        align-self: stretch !important;
        box-sizing: border-box !important;
    }

    .copy-bar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}


/* SEO Kaomoji samples inside content sections */
.seo-kaomoji-samples {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 1rem 0 1.5rem;
}
.seo-kaomoji-samples .kaomoji-seo-face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.65rem 0.75rem;
  font-size: 1.35rem;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}
.content-sections h2 {
  margin-top: 0;
  margin-bottom: 0.85rem;
}
.content-sections h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.content-sections p {
  line-height: 1.75;
}
@media (max-width: 900px) {
  .seo-kaomoji-samples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .seo-kaomoji-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .seo-kaomoji-samples .kaomoji-seo-face {
    font-size: 1.1rem;
    min-height: 48px;
    padding: 0.55rem;
  }
}


/* SEO content face examples */
.content-sections .seo-face-collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0 22px;
}
.content-sections .seo-face-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .content-sections .seo-face-collection {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .content-sections .seo-face-item {
    min-height: 46px;
    padding: 8px;
  }
}
