@font-face {
  font-family: 'Fredoka';
  src: url('Fredoka-Medium.woff') format('woff');
  font-weight: 400; /* Medium acting as Regular */
  font-style: normal;
}

@font-face {
  font-family: 'Fredoka';
  src: url('Fredoka-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
}


/* Variables */
:root {
  --pink: #ffc3d8;
  --white: #ffffff;

  --polka-bg-image: radial-gradient(rgb(255, 241, 244) 28.4%, transparent 28.4%),
    radial-gradient(rgb(255, 241, 244) 28.4%, transparent 28.4%);
  --polka-bg-color: #ffe1ed;

  --text-color: #ff91bd;
  --box-bg-color: #ffe6f0ff;
  --box-border-color: #ffc3d8;
  --box-shadow-color: #fff8fc;
}

/* Body */
body {
  background-color: var(--polka-bg-color);
  background-image: var(--polka-bg-image);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;

  font-family: "Fredoka", sans-serif;
  font-weight: 500;
  font-size: 19px;
  padding: 25px 10px;
  text-align: center;
  color: var(--text-color);
}

/* Shared pink box */
.pink-box {
  display: inline-block;
  vertical-align: top;
  position: relative;

  background-color: var(--box-bg-color);
  border: 6px solid var(--box-border-color);
  border-radius: 57px;
  padding: 20px;
  box-sizing: border-box;

  box-shadow: 0 0 0 10px var(--box-shadow-color);
  color: var(--text-color);
  text-align: center;

  margin-right: 20px;
}

/* Top box container */
.top-box-container {
  text-align: center;
  margin-bottom: 30px;
}

/* Top box */
.pink-box.top-box {
  width: 890px;
  margin: 0 auto 30px auto;
}

/* Main box */
.pink-box.main-box {
  width: 690px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 30px;
  text-align: left;
  padding: 36px 50px 60px 36px;
  box-sizing: border-box;
}

/* Search box */
.pink-box.search-box {
  width: 690px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 30px;
  text-align: center;
  padding: 30px 50px;
  box-sizing: border-box;
}

/* Filter box */
.pink-box.filter-box {
  width: 690px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 30px;
  text-align: center;
  padding: 30px 50px;
  box-sizing: border-box;
}

.filter-helper-text {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 20px;
  line-height: 1.4;
}

.filter-link {
  color: #fc62a0;
  text-decoration: none;
  background-image: radial-gradient(currentColor 2.5px, transparent 2.6px);
  background-size: 10px 6px;
  background-repeat: repeat-x;
  background-position: 0 100%;
  padding-bottom: 6px;
  cursor: pointer;
}

.filter-link:hover {
  animation: dot-wiggle 0.2s ease-in-out infinite alternate;
}

.dark-mode .filter-link {
  color: #ff9fc9;
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.filter-input {
  flex: 1;
  padding: 14px 24px;
  border-radius: 50px;
  border: none;
  background-color: var(--white);
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  color: var(--text-color);
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
}

.filter-input::placeholder {
  color: #ffb3d1;
}

.filter-input:focus {
  box-shadow: 0 0 0 4px rgba(255, 195, 216, 0.3);
}

.add-filter-btn {
  padding: 14px 30px;
  border-radius: 50px;
  border: none;
  background-color: var(--box-bg-color);
  border: 4px solid var(--box-border-color);
  color: var(--text-color);
  font-size: 18px;
  font-family: "Fredoka", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-weight: bold;
}

.add-filter-btn:hover {
  transform: scale(1.05);
}

.dark-mode .filter-input {
  color: #680032;
  background-color: var(--white);
}

.dark-mode .filter-input::placeholder {
  color: #888888;
}

/* Filter tags modal */
.filter-tags-modal {
  margin-top: 30px;
  padding: 25px;
  background-color: var(--box-bg-color);
  border: 6px solid var(--box-border-color);
  border-radius: 50px;
  box-shadow: 0 0 0 10px var(--box-shadow-color);
}

.modal-title {
  text-align: center;
  font-size: 18px;
  color: var(--text-color);
  margin-bottom: 20px;
  font-weight: bold;
}

.filtered-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
  min-height: 40px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--white);
  border: 3px solid var(--box-border-color);
  border-radius: 30px;
  font-family: "Fredoka", sans-serif;
  font-size: 16px;
  color: var(--text-color);
}

.delete-tag-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color);
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.delete-tag-btn:hover {
  transform: scale(1.2);
}

.close-modal-btn {
  display: block;
  margin: 0 auto;
  padding: 12px 28px;
  border-radius: 30px;
  border: 6px solid var(--box-border-color);
  background-color: var(--box-bg-color);
  box-shadow: 0 0 0 10px var(--box-shadow-color);
  font-family: "Fredoka", sans-serif;
  font-size: 17px;
  color: var(--text-color);
  cursor: pointer;
  font-weight: bold;
}

.close-modal-btn:hover {
  transform: translateY(-2px);
}

.dark-mode .tag-item {
  color: #680032;
  background-color: var(--white);
}

.empty-tags-message {
  text-align: center;
  color: var(--text-color);
  font-size: 16px;
  opacity: 0.7;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.search-input {
  flex: 1;
  padding: 14px 24px;
  border-radius: 50px;
  border: none;
  background-color: var(--white);
  font-family: "Fredoka", sans-serif;
  font-size: 18px;
  color: var(--text-color);
  box-sizing: border-box;
  outline: none;
  transition: all 0.2s ease;
}

.search-input::placeholder {
  color: #ffb3d1;
}

.search-input:focus {
  box-shadow: 0 0 0 4px rgba(255, 195, 216, 0.3);
}

.search-btn,
.back-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: var(--box-bg-color);
  border: 4px solid var(--box-border-color);
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-btn:hover,
.back-btn:hover {
  transform: scale(1.1);
}

.dark-mode .search-input {
  color: #680032;
  background-color: var(--white);
}

.dark-mode .search-input::placeholder {
  color: #888888;
}

/* Small box */
.pink-box.small-box {
  width: 160px;
  text-align: left;
}

/* Bow sticker */
.pink-box .bow-sticker {
  position: absolute;
  top: -49px;
  left: -40px;
  width: 116px;
  pointer-events: none;
  transform: rotate(-15deg);
}

/* Post image */
.pink-box img.post-img {
  width: 100%;
  height: auto;
  border-radius: 40px;
  border: 5px solid #f9a6c7;
  display: block;
  margin: 0 auto;
}

.dark-mode .pink-box img.post-img {
  width: 100%;
  height: auto;
  border-radius: 40px;
  border: 5px solid #ff8ab1;
  display: block;
  margin: 0 auto;
}

/* Images in post content with lightbox functionality */
.post-content-img {
  max-width: 100%;
  height: auto;
  border-radius: 40px;
  display: block;
  margin: 20px auto;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.post-content-img:hover {
  transform: scale(1.02);
}

/* Catch-all for images in main box that should fit inside */
.pink-box.main-box
  img:not(.bow-sticker):not(.author-pfp):not(
    .chat-icon
  ):not(.pfp-placeholder):not(.custom-emoji) {
  max-width: 100%;
  height: auto;
  border-radius: 40px;
  display: block;
  margin: 20px auto;
  cursor: pointer;
}

.user-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.user-tags span {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: dashed 2px #f07db3;
  background: rgba(255, 182, 213, 0.35);
  color: #f07db3;
  white-space: nowrap;
}

/* Dark mode tag pills */
.dark-mode .user-tags span {
  border: dashed 2px #ff9fc9;
  background: rgba(255, 170, 205, 0.18);
  color: #ff9fc9;
  border-color: rgba(255, 160, 200, 0.35);
}

/* Left column (small box only) */
.left-column {
  display: inline-block;
  vertical-align: top;
  width: 215px;
  margin-right: 20px;
  text-align: center;
}

/* Main content area - contains search and posts */
.main-content-area {
  display: inline-block;
  vertical-align: top;
  width: 690px;
}

/* Prevent double spacing inside column */
.left-column .pink-box {
  margin-right: 0;
  margin-bottom: 40px;
}

/* Small box items with hearts */
.pink-box.small-box p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 1em;
}

.small-heart {
  height: 20px;
  width: auto;
  display: inline-block;
}

/* Dark mode button */
.dark-mode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 160px;
  height: auto;
  padding: 10px 20px;
  background-color: var(--box-bg-color);
  border: 6px solid var(--box-border-color);
  border-radius: 40px;
  box-shadow: 0 0 0 10px var(--box-shadow-color);
  color: var(--text-color);
  font-family: "Fredoka", sans-serif;
  font-size: 19px;
  cursor: pointer;
  text-align: center;
  margin-bottom: 15px;
}

/* Heart icon next to links */
.heart-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
}

/* Dark mode palette */
.dark-mode {
  --polka-bg-color: #1a1a1a;
  --polka-bg-image: radial-gradient(
      rgba(255, 255, 255, 0.05) 28.4%,
      transparent 28.4%
    ),
    radial-gradient(rgba(255, 255, 255, 0.05) 28.4%, transparent 28.4%);
  --box-bg-color: #2c2c2c;
  --box-border-color: #727272;
  --box-shadow-color: #444;
  --text-color: #ffc3d8;
  --pink: #ffb6c1;
}

.dark-mode-btn i {
  color: var(--text-color);
}

.dark-mode-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 8px var(--box-shadow-color);
}

.dark-mode-btn {
  transition: all 0.2s ease;
}

.top-box img.top-img {
  width: 20%;
  height: auto;
  border-radius: 26px;
  display: block;
  margin: 0 auto;
}

.pink-box.top-box {
  background-color: #ffffff;
  background-image: radial-gradient(
      var(--box-bg-color) 28.4%,
      transparent 28.4%
    ),
    radial-gradient(var(--box-bg-color) 28.4%, transparent 28.4%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;
  animation: top-polka-scroll 18s linear infinite,
    top-polka-bounce 3s ease-in-out infinite;
}

@keyframes top-polka-scroll {
  from {
    background-position: 0 0, 32px 32px;
  }
  to {
    background-position: -256px 0, -224px 32px;
  }
}

@keyframes top-polka-bounce {
  0%,
  100% {
    background-position-y: 0, 32px;
  }
  50% {
    background-position-y: -8px, 24px;
  }
}

.dark-mode .pink-box.top-box {
  background-color: #1f1f1f;
  background-image: radial-gradient(
      rgba(255, 195, 216, 0.18) 28.4%,
      transparent 28.4%
    ),
    radial-gradient(rgba(255, 195, 216, 0.18) 28.4%, transparent 28.4%);
}

.left-column .pink-box.small-box {
  background-color: #ffffff;
  background-image: radial-gradient(
      var(--box-bg-color) 28.4%,
      transparent 28.4%
    ),
    radial-gradient(var(--box-bg-color) 28.4%, transparent 28.4%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;
  animation: small-polka-scroll 18s linear infinite,
    small-polka-bounce 3s ease-in-out infinite;
}

.dark-mode .left-column .pink-box.small-box {
  background-color: #1f1f1f;
  background-image: radial-gradient(
      rgba(255, 195, 216, 0.18) 28.4%,
      transparent 28.4%
    ),
    radial-gradient(rgba(255, 195, 216, 0.18) 28.4%, transparent 28.4%);
}

@keyframes small-polka-scroll {
  from {
    background-position: 0 0, 32px 32px;
  }
  to {
    background-position: -256px 0, -224px 32px;
  }
}

@keyframes small-polka-bounce {
  0%,
  100% {
    background-position-y: 0, 32px;
  }
  50% {
    background-position-y: -8px, 24px;
  }
}

ul {
  list-style: none;
  padding-left: 10px;
}

ul li::before {
  content: "●";
  color: var(--text-color);
  display: inline-block;
  width: 1em;
  margin-left: -1em;
}

a {
  color: #fc62a0;
  text-decoration: none;
  background-image: radial-gradient(currentColor 2.5px, transparent 2.6px);
  background-size: 10px 6px;
  background-repeat: repeat-x;
  background-position: 0 100%;
  padding-bottom: 6px;
}

a:hover {
  animation: dot-wiggle 0.2s ease-in-out infinite alternate;
}

@keyframes dot-wiggle {
  from {
    background-position-y: 100%;
  }
  to {
    background-position-y: 85%;
  }
}

.dark-mode a {
  color: #ff9fc9;
}

ol {
  list-style: none;
  padding-left: 10px;
  counter-reset: ol-counter;
}

ol li {
  counter-increment: ol-counter;
  position: relative;
}

ol li::before {
  content: counter(ol-counter) ".";
  color: var(--text-color);
  display: inline-block;
  width: 1.2em;
  margin-left: -1.2em;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-color);
}

.author-pfp {
  width: 67px;
  height: auto;
  border-radius: 10%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.author-name {
  margin: 0;
  font-weight: bold;
  font-size: 0.95em;
}

.author-username {
  margin: 0;
  font-size: 0.85em;
  color: #fc62a0;
}

.dark-mode .author-username {
  color: #ff9fc9;
}

.post-date {
  margin-left: 6px;
  font-size: 14px;
  color: #d8709b;
  opacity: 0.9;
  white-space: nowrap;
}

.dark-mode .post-date {
  color: #ff9fc9;
}

.dashed-divider {
  border-top: 6px dashed var(--box-border-color);
  width: calc(100% + 86px);
  margin: 30px -50px 30px -36px;
  box-sizing: border-box;
}

/* Responsive video embed */
.responsive-video {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 30px;
  border: 5px solid #f9a6c7;
}

.dark-mode .responsive-video {
  border: 5px solid #ff8ab1;
}

.responsive-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 30px;
}

/* Lightbox overlay */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 182, 193, 0.5); /* hot pink semi-transparent */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Lightbox content wrapper */
#lightbox > div {
  position: relative;
  display: inline-block; /* ensures the image sizes naturally */
}

/* Lightbox image */
#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 171, 205, 0.7);
  display: block;
}

/* Close button outside the image */
#lightbox-close {
  position: absolute;
  top: -20px; /* moves it above the image */
  right: -40px; /* moves it to the right of the image */
  width: 35px;
  height: 35px;
  background: white;
  border-radius: 50%;
  color: #ffabcd;
  font-weight: bold;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 171, 205, 0.7);
}

/* Entry image lightbox (overlays on top of journal) */
#entry-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 182, 193, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 10003;
}

#entry-lightbox > div {
  position: relative;
  display: inline-block;
}

#entry-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 171, 205, 0.7);
}

#entry-lightbox-close {
  position: absolute;
  top: -20px;
  right: -40px;
  width: 35px;
  height: 35px;
  background: white;
  border-radius: 50%;
  color: #ffabcd;
  font-weight: bold;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 171, 205, 0.7);
}

/* Lightbox navigation arrows */
#lightbox-left-arrow,
#lightbox-right-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 50%;
  color: #ffabcd;
  font-size: 24px;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 171, 205, 0.7);
  z-index: 10001;
  transition: transform 0.2s ease;
}

#lightbox-left-arrow:hover {
  transform: translateY(-50%) scale(1.1);
}

#lightbox-right-arrow:hover {
  transform: translateY(-50%) scale(1.1);
}

#lightbox-left-arrow {
  left: -60px;
}

#lightbox-right-arrow {
  right: -60px;
}


/* REMOVED: Share link box CSS */

/* SEARCH RESULTS STYLES */
.no-results-message {
  text-align: center;
  padding: 40px 20px;
  font-size: 18px;
  color: var(--text-color);
}

.post-hidden {
  display: none !important;
}

.filtered-post {
  display: none !important;
}

.chat-bubble-wrapper {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 1px;
  margin-bottom: 20px;
}

/* Icon */
.chat-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Bubble */
.speech-bubble {
  position: relative;
  background: #fff1f7;
  border: 4px solid #ffb6cf;
  border-radius: 30px;
  padding: 22px 28px;

  width: 480px;
  flex: 0 0 480px;
}


/* Tail border (outer) */
.speech-bubble:before {
  content: "";
  position: absolute;
  right: -17px; /* moves it outside the bubble on the right */
  top: 18px; /* near top */
  width: 0;
  height: 0;
  border: 16px solid transparent; /* outer size */
  border-left-color: #ffb6cf; /* border color matches bubble border */
  border-right: 0;
  margin-top: 0; /* no centering needed */
  z-index: 0; /* behind bubble */
}

/* Tail inner (bubble color) */
.speech-bubble:after {
  content: "";
  position: absolute;
  right: -12px; /* slightly inside the border on the right */
  top: 22px; /* near top, adjust for inner triangle */
  width: 0;
  height: 0;
  border: 12px solid transparent;
  border-left-color: #fff1f7; /* bubble background */
  border-right: 0;
  margin-top: 0; /* no centering */
  z-index: 1; /* above border */
}

/* =========================
   DARK MODE – SPEECH BUBBLE
   ========================= */

.dark-mode .speech-bubble {
  background: #404040; /* bubble fill */
  border-color: #727272; /* bubble border */
  color: var(--text-color); /* keeps your pink text */
}

/* Tail border (outer) */
.dark-mode .speech-bubble:before {
  border-left-color: #727272; /* matches dark border */
}

/* Tail inner (bubble color) */
.dark-mode .speech-bubble:after {
  border-left-color: #404040; /* matches dark bubble */
}

.pfp-enter-btn {
  position: relative;
  top: -12px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: var(--box-bg-color);
  border: 4px solid var(--box-border-color);
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pfp-enter-btn:hover {
  transform: scale(1.1);
}

.comment-text {
  white-space: pre-wrap;
  /* link styles inside comments */
}

.comment-text a {
  color: #fc62a0;
  text-decoration: underline;
}

/* Responsive tweaks for long links so they wrap nicely */
.comment-text a {
  word-break: break-word;
}

@keyframes glow-fade {
  0% {
    box-shadow: 0 0 0 10px var(--box-shadow-color),
      0 0 30px 15px var(--glow-color);
  }
  100% {
    box-shadow: 0 0 0 10px var(--box-shadow-color), 0 0 0 0 transparent;
  }
}

.new-comment-glow {
  --glow-color: #ffc3d8;
  animation: glow-fade 3s ease-out forwards;
}

.dark-mode .new-comment-glow {
  --glow-color: #727272;
}

/* Dark mode styles */
.dark-mode .pfp-input-field,
.dark-mode .name-input,
.dark-mode .username-input,
.dark-mode .comment-textarea {
  color: #680032;
}

.dark-mode .username-error {
  color: #ff6b6b;
}

.dark-mode .comment-success {
  color: #00ff00;
}

/* Blocked word error messages */
.blocked-word-error {
  display: none;
  text-align: center;
  font-size: 15px;
  color: #d32f2f;
  margin-top: 10px;
  margin-bottom: 10px;
}

.dark-mode .blocked-word-error {
  color: #ff6b6b;
}

/* Anonymous comment/reply error messages */
.anonymous-error {
  display: none;
  text-align: center;
  font-size: 15px;
  color: #d32f2f;
  margin-top: 10px;
  margin-bottom: 10px;
}

.dark-mode .anonymous-error {
  color: #ff6b6b;
}

/* Responsive video embed */
.responsive-video {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 30px;
}

.responsive-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 30px;
}

/* Lightbox overlay */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 182, 193, 0.5); /* hot pink semi-transparent */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Lightbox content wrapper */
#lightbox > div {
  position: relative;
}

/* Lightbox image */
#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 171, 205, 0.7);
}

#lightbox > div {
  position: relative;
  display: inline-block; /* ensures the image sizes naturally */
}

/* Close button outside the image */
#lightbox-close {
  position: absolute;
  top: -20px; /* moves it above the image */
  right: -40px; /* moves it to the right of the image */
  width: 35px;
  height: 35px;
  background: white;
  border-radius: 50%;
  color: #ffabcd;
  font-weight: bold;
  font-size: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 171, 205, 0.7);
}

/* Bubble */
.speech-bubble {
  position: relative;
  background: #fff1f7; /* bubble color */
  border: 4px solid #ffb6cf; /* bubble border */
  border-radius: 30px; /* rounded corners */
  padding: 22px 28px;
  flex: 1;
  max-width: 85%;
}

/* Tail border (outer) */
.speech-bubble:before {
  content: "";
  position: absolute;
  right: -17px; /* moves it outside the bubble on the right */
  top: 18px; /* near top */
  width: 0;
  height: 0;
  border: 16px solid transparent; /* outer size */
  border-left-color: #ffb6cf; /* border color matches bubble border */
  border-right: 0;
  margin-top: 0; /* no centering needed */
  z-index: 0; /* behind bubble */
}

/* Tail inner (bubble color) */
.speech-bubble:after {
  content: "";
  position: absolute;
  right: -12px; /* slightly inside the border on the right */
  top: 22px; /* near top, adjust for inner triangle */
  width: 0;
  height: 0;
  border: 12px solid transparent;
  border-left-color: #fff1f7; /* bubble background */
  border-right: 0;
  margin-top: 0; /* no centering */
  z-index: 1; /* above border */
}

/* =========================
   DARK MODE – SPEECH BUBBLE
   ========================= */

.dark-mode .speech-bubble {
  background: #404040; /* bubble fill */
  border-color: #727272; /* bubble border */
  color: var(--text-color); /* keeps your pink text */
}

/* Tail border (outer) */
.dark-mode .speech-bubble:before {
  border-left-color: #727272; /* matches dark border */
}

/* Tail inner (bubble color) */
.dark-mode .speech-bubble:after {
  border-left-color: #404040; /* matches dark bubble */
}

.pfp-enter-btn {
  position: relative;
  top: -12px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: var(--box-bg-color);
  border: 4px solid var(--box-border-color);
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pfp-enter-btn:hover {
  transform: scale(1.1);
}
.pfp-enter-btn {
  display: flex;
}

.comment-text {
  white-space: pre-wrap;
}

/* remove browser/other underline for links inside comments but keep global polka background */
.comment-text a {
  text-decoration: none !important;
}

/* ===============================
   REPLY MODAL PFP INPUT FIX
   =============================== */

.reply-modal .pfp-input-field {
  width: 100%;
  flex: 1;
}

.reply-modal .pfp-input-wrapper,
.reply-modal .pfp-input-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-modal .pfp-enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* NSFW blur container */
.nsfw-blur {
  position: relative;
  width: fit-content;
  margin: 20px auto;
}

.nsfw-img {
  display: block;
  border: solid 5px #ff91bd;
  border-radius: 40px;
  filter: blur(15px);
  transition: filter 0.3s ease;
}

.nsfw-overlay {
  position: absolute;
  inset: 0;
  background: rgba(249, 176, 205, 1);
  border-radius: 40px;
  border: 7px solid #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffabcd;
  transition: all 0.3s ease;
}

.nsfw-overlay-inner {
  width: 300px;
  height: 200px;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  max-width: 80%;
  text-align: center;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.nsfw-overlay i {
  font-size: 28px;
  flex-shrink: 0;
  margin-bottom: 8px;
  color: #ffabcd;
}

.nsfw-overlay p {
  color: #ffabcd;
  margin: 0;
  font-weight: bold;
  overflow-y: auto;
  max-height: 80px;
  width: 100%;
  text-align: center;
}

.nsfw-button {
  margin-top: 10px;
  background-color: #ffabcd;
  border: 6px solid #ffffff;
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* DARK MODE NSFW */
.dark-mode .nsfw-blur .nsfw-img {
  filter: blur(15px);
}

.dark-mode .nsfw-blur .nsfw-overlay {
  background: rgba(70, 40, 55, 1);
  border-color: #ffb6cf;
  color: #a3768e;
}

.dark-mode .nsfw-blur .nsfw-overlay-inner {
  background: rgba(50, 30, 40, 0.9);
  box-shadow: 0 0 15px rgba(255, 182, 193, 0.3);
}

.dark-mode .nsfw-blur .nsfw-overlay i,
.dark-mode .nsfw-blur .nsfw-overlay p {
  color: #d297b7;
}

.dark-mode .nsfw-blur .nsfw-button {
  background-color: #a3768e;
  border-color: #3b2a33;
  color: #2a1f27;
}

/* Censored text */
.censored-text {
  background-color: #ffffff;
  color: #ffffff;
  padding: 0 4px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.censored-text.revealed {
  background: none;
  color: #ff91bd;
  cursor: default;
}

.dark-mode .censored-text.revealed {
  background: none;
  color: #ffc3d8;
  cursor: default;
}

/* Empty comment/reply error messages */
.empty-comment-error {
  display: none;
  text-align: center;
  font-size: 15px;
  color: #d32f2f;
  margin-top: 10px;
  margin-bottom: 10px;
}

.dark-mode .empty-comment-error {
  color: #ff6b6b;
}

/* ===============================
   TAG FILTERING STYLES - NEW
   =============================== */

/* Make tags clickable */
.user-tags span {
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-tags span:hover {
  transform: scale(1.05);
  background-color: rgba(255, 195, 216, 0.5);
}

.dark-mode .user-tags span:hover {
  background-color: rgba(255, 195, 216, 0.35);
}

/* Active tag filter box */
.pink-box.active-tag-box {
  width: 690px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 30px;
  text-align: center;
  padding: 30px 50px;
  box-sizing: border-box;
}

.active-tag-box p {
  margin: 0 0 15px 0;
  font-weight: 600;
  color: var(--text-color);
  font-size: 18px;
}

/* Active tag pill (contains tag name and X) */
.active-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  padding: 10px 14px 10px 20px;
  border-radius: 30px;
  border: 4px solid var(--box-border-color);
  box-shadow: 0 2px 8px rgba(255, 195, 216, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.active-tag-pill:hover {
  transform: scale(1.02);
  box-shadow: 0 3px 12px rgba(255, 195, 216, 0.4);
}

.active-tag-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-color);
  font-family: "Fredoka", sans-serif;
}

.active-tag-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--text-color);
  color: white;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.active-tag-close:hover {
  background: #ff1493;
  transform: scale(1.15);
}

.dark-mode .active-tag-pill {
  background: var(--white);
}

.dark-mode .active-tag-name {
  color: #680032;
}

.dark-mode .active-tag-close {
  background: var(--text-color);
}

/* Filtered tag item styling (for the modal) */
.filtered-tag-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: var(--white);
  border: 3px solid var(--box-border-color);
  border-radius: 30px;
  font-family: "Fredoka", sans-serif;
  font-size: 16px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filtered-tag-item:hover {
  background-color: rgba(255, 195, 216, 0.3);
  transform: scale(1.05);
}

.dark-mode .filtered-tag-item {
  color: #680032;
  background-color: var(--white);
}

.pfp-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===============================
   CUSTOM EMOJIS
   =============================== */
.custom-emoji {
  display: inline !important;
  width: 1.2em !important;
  height: 1.2em !important;
  vertical-align: -0.2em !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  object-fit: contain;
  cursor: default !important;
}

/* =========================
   POST ACTIONS - Comment/Like/Share Buttons
   ========================= */

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 0;
  border-radius: 0;
}

.post-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font-family: "Fredoka", sans-serif;
  font-size: 16px;
  color: var(--text-color);
  cursor: pointer;
}

.post-action-btn i {
  font-size: 30px;
  transition: transform 0.15s ease;
  color: var(--text-color);
}

.post-action-btn:hover i {
  transform: scale(1.15);
}

/* Share link box */
.share-link-box {
  background-color: white;
  border: 3px dashed var(--text-color);
  color: var(--text-color);
}

.dark-mode .share-link-box {
  border: dashed 3px #ffc3d8;
  background-color: #404040;
  border-color: #ffc3d8;
  color: #ffc3d8;
}

/* Like embed */
.like-embed {
  margin-top: 30px;
  padding: 20px;
  border-radius: 26px;
  border: 3px dashed var(--text-color);
  background-color: var(--box-bg-color);
  display: none;
}

/* Comment section */
.comment-section {
  margin-top: 30px;
  padding: 20px;
  border-radius: 26px;
  border: 3px dashed var(--text-color);
  background-color: var(--box-bg-color);
  display: none;
}

/* ===============================
   JOURNAL HEART FEATURE
   =============================== */

.journal-heart-container {
  position: relative;
  width: 160px;
  margin-top: 5px;
  margin-left: 23px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.journal-heart-container:hover {
  transform: scale(1.05);
}

.journal-heart {
  width: 100%;
  height: auto;
  display: block;
}

/* Green blinking indicator */
.journal-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  background-color: #4ade80;
  border-radius: 50%;
  border: 3px solid white;
  animation: pulse-green 1.5s ease-in-out infinite;
  display: none; /* Hidden by default, show with JS when there are new entries */
}

@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* Journal overlay */
.journal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.journal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Journal container (the rectangle) */
.journal-container {
  position: relative;
  background-color: var(--box-bg-color);
  border: 6px solid var(--box-border-color);
  border-radius: 30px;
  padding: 40px 50px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: zoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 0 10px var(--box-shadow-color), 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Close button */
.journal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 40px;
  color: var(--text-color);
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10001;
}

.journal-close:hover {
  transform: scale(1.2) rotate(90deg);
  color: #ff1493;
}

/* Journal entry content */
.journal-entry {
  color: var(--text-color);
  font-family: "Fredoka", sans-serif;
  font-size: 19px;
  line-height: 1.6;
  text-align: left;
  min-height: 200px;
}

.journal-entry h1, 
.journal-entry h2, 
.journal-entry h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.journal-entry p {
  margin-bottom: 15px;
}

/* Next button (arrow) */
.journal-next-btn {
  position: fixed;
  right: calc(45% - 360px);
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 4px solid var(--box-border-color);
  background-color: var(--box-bg-color);
  color: var(--text-color);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 6px var(--box-shadow-color);
  z-index: 10002;
}

.journal-next-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Previous button (arrow) */
.journal-prev-btn {
  position: fixed;
  left: calc(45% - 360px);
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 4px solid var(--box-border-color);
  background-color: var(--box-bg-color);
  color: var(--text-color);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 6px var(--box-shadow-color);
  z-index: 10002;
}

.journal-prev-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Responsive positioning for smaller screens */
@media (max-width: 800px) {
  .journal-next-btn {
    right: 10px;
  }
  .journal-prev-btn {
    left: 10px;
  }
}

/* Slide animation for transitioning entries */
@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.journal-entry.slide-out {
  animation: slideOutLeft 0.3s ease forwards;
}

.journal-entry.slide-in {
  animation: slideInRight 0.3s ease forwards;
}

.journal-entry.slide-out-right {
  animation: slideOutRight 0.3s ease forwards;
}

.journal-entry.slide-in-left {
  animation: slideInLeft 0.3s ease forwards;
}

.entry.slide-out {
  animation: slideOutLeft 0.3s ease forwards;
}

.entry.slide-in {
  animation: slideInRight 0.3s ease forwards;
}

.entry.slide-out-right {
  animation: slideOutRight 0.3s ease forwards;
}

.entry.slide-in-left {
  animation: slideInLeft 0.3s ease forwards;
}

/* Dark mode adjustments */
.dark-mode .journal-overlay {
  background-color: rgba(0, 0, 0, 0.9);
}

.dark-mode .journal-indicator {
  border-color: #404040;
}
