/* Base modal card (used by DM modal) */
.modal-card {
  background: var(--bg-secondary);
  border: var(--border-theme);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: var(--border-theme);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--text-primary), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close:hover {
  color: var(--accent-pink);
  transform: scale(1.1);
}

/* Story-style vertical card */
.modal-card.story-card {
  width: 380px;
  max-width: 92vw;
  max-height: 92vh;
  background: #ffffff;
  border: 1px solid #efefef;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 42, 116, 0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(0.85) translateY(40px);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-card.story-card {
  transform: scale(1) translateY(0);
}

/* Floating close button */
.btn-close-story {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}

.btn-close-story:hover {
  background: rgba(255, 42, 116, 0.5);
  transform: scale(1.1);
}

/* Story vertical layout */
.post-showcase.story-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Hero photo container — fills width, capped height so everything fits on screen */
.post-image-container.story-photo {
  background: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  max-height: 72vh;
}

#post-canvas {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  z-index: 2;
}

/* Username overlay on photo (top-left) */
.photo-overlay-username {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.overlay-username {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.3px;
}

/* Action buttons overlay on photo (bottom-right) */
.photo-overlay-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.overlay-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}

.overlay-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.overlay-btn.overlay-btn-primary {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  border-color: rgba(255, 255, 255, 0.25);
}

.overlay-btn.overlay-btn-primary:hover {
  filter: brightness(1.2);
  transform: scale(1.12);
}

/* Followers overlay on photo (bottom-left, same level as action buttons) */
.photo-overlay-followers {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.85), rgba(197, 163, 255, 0.85));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 6px 14px;
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.overlay-followers-value {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.overlay-followers-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Instagram-style action bar below photo */
.story-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 4px;
  border-bottom: 1px solid #efefef;
  background: #ffffff;
}

.action-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.action-bar-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-icon {
  color: #262626;
  cursor: pointer;
  transition: all 0.2s ease;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8px;
}

.action-icon:hover {
  transform: scale(1.15);
}

.action-icon:active {
  transform: scale(0.9) !important;
}

.action-icon-heart {
  color: #262626;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8px;
}

.action-icon-heart.liked {
  color: #ff3040;
  fill: #ff3040;
  stroke: #ff3040;
}

.action-icon-heart:hover {
  transform: scale(1.25);
}

.action-icon-bookmark {
  color: #262626;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8px;
}

.action-icon-bookmark.active {
  fill: #262626;
  stroke: #262626;
}

.action-icon-bookmark:hover {
  color: var(--accent-pink);
}

.action-count {
  font-size: 13px;
  font-weight: 600;
  color: #262626;
}

.action-bar-right {
  display: flex;
  align-items: center;
}

/* Comment section — unified block style */
.comment-carousel-section {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Comment row: container for card */
.comment-carousel-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-carousel-track {
  position: relative;
  flex: 1;
  display: flex;
  height: auto;
  min-height: 48px;
}

.comment-card {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.comment-avatar {
  font-size: 15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-equipped-card);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1.5px solid rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.comment-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.35;
  margin-right: 16px; /* Space under the right-side reaction */
}

.comment-header-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.comment-user {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  color: #262626; /* Primary contrast */
}

.verified-badge {
  flex-shrink: 0;
}

.comment-header-divider {
  color: #8e8e8e; /* Secondary contrast */
  font-weight: 700;
  font-size: 13px;
  margin: 0 2px;
}

.top-comment-badge {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  color: #8e8e8e; /* Secondary contrast */
  letter-spacing: 0.2px;
}

.comment-text {
  font-family: var(--font-main);
  font-size: 13px;
  color: #262626; /* Primary contrast */
  word-break: break-word;
}

.comment-like-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px; /* Close to each other */
  align-self: center; /* Center vertically relative to card */
  flex-shrink: 0;
}

.comment-likes-count {
  font-size: 10px;
  font-weight: 600;
  color: #8e8e8e; /* Secondary contrast */
  line-height: 1;
}

.comment-like-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #8e8e8e; /* Secondary contrast */
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.2s ease;
  flex-shrink: 0;
}

.comment-like-btn:hover {
  transform: scale(1.15);
  color: #262626;
}

.comment-like-btn.liked {
  color: #ff3040;
  animation: heartBeat 0.3s linear;
}

.comment-like-btn.liked .comment-like-icon {
  fill: #ff3040;
  stroke: #ff3040;
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Compact inline carousel arrows */
.carousel-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #737373;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.carousel-arrow svg {
  width: 12px;
  height: 12px;
}

.carousel-arrow:hover {
  color: #262626;
  background: transparent;
}

.carousel-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Dots row centered below */
.carousel-dots-row {
  display: flex;
  justify-content: center;
}

.carousel-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}

.carousel-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #dbdbdb;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: #262626;
  transform: scale(1.1);
}



   K-POP SOCIAL NETWORK / INSTAGRAM STYLE POST IN SCORE MODAL
   ============================================================ */

/*   µ!  T °  V U! Q · U !  ° »!
  U V U  W U!!  ° */
/*   µ!  T °  V U! Q · U !  ° »!
  U V U  W U!!  ° !  ‘ !S!& !    µ!  !9  X !  U  U X */
.score-box {
  max-width: 860px;
  width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: row;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  position: relative;
}

#modal-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 100;
  border-radius: inherit;
}

.score-left-col {
  width: 42%;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 12px;
  padding: 1.5rem 1.2rem;
  box-sizing: border-box;
  position: relative !important;
}

/* Instagram Post Container styles */
.instagram-post {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #ffffff;
  border: 1px solid #dbdbdb;
  border-radius: 12px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

/* Media container to hold image and overlay header */
.instagram-media-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.instagram-header-left {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  box-sizing: border-box;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: none !important;
}

.instagram-avatar-left {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.instagram-avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
  padding: 1.5px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instagram-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background-color: #ffffff;
  box-sizing: border-box;
}

.instagram-meta-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.instagram-meta-author-row {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.instagram-author-left {
  font-size: 0.76rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.instagram-verified-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  user-select: none;
}

.instagram-meta-dot {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.instagram-meta-time {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.72rem;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.instagram-location-left {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  line-height: 1.1;
  margin-top: 1px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Hide post time and location on mobile screens */
@media (max-width: 650px), (max-height: 620px) and (orientation: landscape) {
  .instagram-meta-dot,
  .instagram-meta-time,
  .instagram-location-left {
    display: none !important;
  }
}

.instagram-dots-left {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  pointer-events: none;
  padding: 4px;
  color: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
  opacity: 0.9;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.instagram-dots-left svg {
  width: 16px;
  height: 16px;
}

/* Actions Row */
.instagram-actions-left-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
}

.instagram-actions-left-group {
  display: flex;
  gap: 14px;
}

.instagram-action-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.instagram-action-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: #262626;
  user-select: none;
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
  display: inline-block;
}

.instagram-action-btn-new {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #262626;
  transition: transform 0.15s ease, color 0.15s ease;
}
.instagram-action-btn-new:hover {
  transform: scale(1.15);
  color: #ff3040;
}
.instagram-action-btn-new.bookmark:hover {
  color: #fbbf24;
}
.instagram-action-btn-new svg {
  display: block;
  stroke: #262626;
  fill: none;
  transition: stroke 0.15s ease, fill 0.15s ease;
}
.instagram-action-btn-new.liked svg {
  stroke: #ff3040;
  fill: #ff3040;
  animation: heartBeatInstagram 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBeatInstagram {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  60% { transform: scale(0.85); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.instagram-action-btn-new.bookmark.saved svg {
  stroke: #262626;
  fill: #262626;
  animation: bookmarkPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bookmarkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.instagram-action-btn-new#instagram-post-share-btn {
  position: relative;
}

.instagram-action-btn-new#instagram-post-share-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid #262626;
  opacity: 0;
  pointer-events: none;
}

.instagram-action-btn-new#instagram-post-share-btn.sharing svg {
  animation: airplanePulse 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.instagram-action-btn-new#instagram-post-share-btn.sharing::after {
  animation: rippleSpread 0.45s cubic-bezier(0.1, 0.8, 0.3, 1);
}

@keyframes airplanePulse {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.3) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes rippleSpread {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Likes Count (removed, counters now inline with icons) */

/* Tags Info (hashtags) */
.instagram-tags-left {
  font-size: 0.78rem;
  text-align: left;
  padding: 2px 12px 6px 12px;
  line-height: 1.4;
  word-break: break-word;
  color: #262626;
}
.instagram-tags-left span, .instagram-tags-left a {
  color: #00376b !important;
  margin-right: 5px;
  font-weight: 500;
}

/* Comments Section */
.instagram-comments-container-left {
  padding: 6px 0 0 0;
  border-top: 1px solid #efefef;
  width: 100%;
}

.instagram-comments-container-left .score-comment-overlay {
  position: relative !important;
  background: #fafafa !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  padding: 8px 10px !important;
  height: 82px !important;
  display: flex;
  align-items: center;
  width: 100%;
  color: #262626;
  box-sizing: border-box;
  border-bottom: 1px solid #efefef;
}

.instagram-comments-container-left .score-comment-arrow {
  color: #737373;
  font-size: 2.2rem;
  padding: 0 4px;
  line-height: 1;
}
.instagram-comments-container-left .score-comment-arrow:hover {
  color: #262626;
}

.instagram-comments-container-left .score-comment-avatar {
  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
  padding: 1.5px;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
}

.instagram-comments-container-left .score-comment-nick {
  color: #262626;
  font-weight: 600;
  font-size: 0.78rem;
}

.instagram-comments-container-left .score-comment-text {
  color: #262626;
  font-size: 0.76rem;
}

.instagram-comments-container-left .score-comment-actions-row {
  margin-left: 38px;
  color: #737373;
  font-size: 0.65rem;
}

.instagram-comments-container-left .score-comment-action-btn {
  color: #737373;
}
.instagram-comments-container-left .score-comment-action-btn:hover {
  color: #262626;
}

/* Unlock Celebration Modal */
.unlock-card {
  width: 340px;
  max-width: 90vw;
  padding: 30px 24px;
  text-align: center;
  align-items: center;
  gap: 16px;
  background: var(--bg-secondary);
  border: var(--border-theme);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 45px rgba(227, 141, 170, 0.35);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.unlock-emoji {
  font-size: 56px;
}

.unlock-card h2 {
  font-family: var(--font-title);
  font-size: 24px;
  margin: 0;
  background: linear-gradient(135deg, var(--accent-pink), #c5a3ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.unlock-followers-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.unlock-followers-text span {
  font-weight: 700;
  color: var(--accent-pink);
}

.unlocked-item-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  width: 160px;
  box-sizing: border-box;
}

#unlock-item-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#btn-unlock-close {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
}



.photo-overlay-followers.negative {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.85), rgba(255, 107, 129, 0.85));
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.photo-overlay-followers.neutral {
  background: rgba(85, 75, 85, 0.8);
  box-shadow: 0 4px 15px rgba(45, 30, 47, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}
