/* ==========================================================
 * TNSB Stories CSS - Organized & Clean
 * Structure:
 *  1. CSS Reset & Utility
 *  2. Story Icons & Navigation
 *  3. Story Modal Viewer
 *  4. FAB (Floating Action Button)
 *  5. Text Editor Interface
 *  6. Animations & Keyframes
 *  7. Responsive Design
 * ========================================================== */

/* =============== 1. CSS Reset & Utility =============== */

/* Force-hide elements (theme override protection) */
#tnsb-stories [hidden],
#tnsb-fab[hidden],
#tnsb-fab [hidden],
.tnsb-story-modal[hidden] {
  display: none !important;
}

/* Hidden input utility */
.tnsb-fab__input {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* =============== 2. Story Icons & Navigation =============== */

.tnsb-stories {
  margin: 0;
  position: relative;
}

.tnsb-stories__icons {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.tnsb-stories__icons::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.tnsb-story-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 60px;
}

/* Story icon ring styles */
.tnsb-story-icon .ring {
  width: 56px;
  height: 56px;
  padding: 2px;
  border-radius: 50%;
  display: block;
}

.tnsb-story-icon .ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: block;
}

.tnsb-story-icon .label {
  font-size: 10px;
  color: #555;
  line-height: 1;
}

/* Story icon states */
.tnsb-story-icon.is-active .ring {
  background: linear-gradient(45deg, 
    #5372ff 0%,
    #a349ff 25%,
    #f17bff 50%,
    #ff334e 75%,
    #00e4ff 100%
  );
  background-size: 200% 200%;
  animation: gradient-rotate 3s ease-in-out infinite;
}

@keyframes gradient-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.tnsb-story-icon.is-active .label {
  color: #000;
}

.tnsb-story-icon.is-inactive {
  cursor: default;
}

.tnsb-story-icon.is-inactive .ring {
  background: #d5d7dc !important;
  filter: none;
  animation: none !important;
}

.tnsb-story-icon.is-inactive .label {
  color: #000;
}

.tnsb-story-icon.no-posts {
  opacity: 1;
  pointer-events: none;
  cursor: default;
}

.tnsb-story-icon.no-posts .ring {
  background: #d5d7dc !important;
  animation: none !important;
  opacity: 0.3;
  filter: grayscale(100%);
}

.tnsb-story-icon.no-posts .label {
  color: #c5c5c5;
}

/* =============== 3. Story Modal Viewer =============== */

.tnsb-story-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  overscroll-behavior: contain;
}

.tnsb-story-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.tnsb-story-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(93vw, 520px);
  aspect-ratio: 9 / 16;
  height: auto;
  max-height: 92vh;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

/* Modal header */
.tnsb-story-modal__header {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.tnsb-story-modal__header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.tnsb-story-modal__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tnsb-story-modal__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
}

.tnsb-story-modal__name {
  color: #fff;
  font-size: 12px;
  font-weight: 400;
}

.tnsb-story-modal__ago {
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  line-height: 1;
  position: relative;
  top:1px;
}

.tnsb-story-modal__sep {
  display: none;
}

.tnsb-story-modal__menu {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 0;
  cursor: pointer;
  outline: none;
  font-weight: 300;
  padding: 8px;
  position: relative;
  top: -5px;
}

.tnsb-story-modal__close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 43px;
  line-height: 0;
  cursor: pointer;
  outline: none;
  font-weight: 200;
  position: relative;
  top: -2px;
  padding: 8px;
}

/* Delete dialog */
.tnsb-story-delete-dialog {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.tnsb-story-delete-dialog__content {
  background: #222;
  border-radius: 12px;
  padding: 24px;
  min-width: 280px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tnsb-story-delete-dialog__delete {
  background: #ff4444;
  color: #fff;
  border: 0;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tnsb-story-delete-dialog__delete:hover {
  background: #ff2222;
}

.tnsb-story-delete-dialog__delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tnsb-story-delete-dialog__cancel {
  background: #555;
  color: #fff;
  border: 0;
  padding: 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tnsb-story-delete-dialog__cancel:hover {
  background: #666;
}

/* Progress bar */
.tnsb-story-modal__progress {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  height: 2px;
  display: flex;
  gap: 3px;
  z-index: 3;
}

.tnsb-story-modal__progress .seg {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  border-radius: 2px;
}

.tnsb-story-modal__progress .seg i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}

/* Viewport and images */
.tnsb-story-modal__viewport {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden;
  contain: paint;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.tnsb-story__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0) scale(1.002);
  -webkit-transform: translateZ(0) scale(1.002);
  will-change: transform;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.tnsb-story__img.is-on {
  visibility: visible;
  z-index: 1;
}

.tnsb-story__img.is-off {
  visibility: hidden;
  z-index: 0;
}

/* Gradient overlay */
.tnsb-story-modal__viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.12) 18%,
    rgba(0, 0, 0, 0.02) 24%,
    rgba(0, 0, 0, 0) 26%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Navigation zones */
.zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: transparent !important;
  border: 0 !important;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none !important;
  user-select: none;
  touch-action: manipulation;
  box-shadow: none !important;
}

.zone--prev {
  left: 0;
}

.zone--next {
  right: 0;
}

.zone:active,
.zone:focus,
.zone:hover {
  background: transparent !important;
  box-shadow: none !important;
}

.zone::before,
.zone::after {
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
}

/* =============== 4. FAB (Floating Action Button) =============== */

.tnsb-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 10000;
}

.tnsb-fab__btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* FAB Sheet (Preview) */
.tnsb-fab__sheet {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #111;
  display: flex;
  justify-content: center;
  padding: 16px;
  overscroll-behavior: contain;
}

.tnsb-fab__sheet-inner {
  width: min(94vw, 560px);
  height: clamp(520px, 92svh, 860px);
  background: #111;
  color: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.tnsb-fab__preview {
  flex: 1 1 auto;
  padding: 12px 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.tnsb-fab__preview img {
  height: 100%;
  width: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center;
  background: #000;
  border-radius: 12px;
}

/* Action buttons */
.tnsb-fab__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 12px;
}

.tnsb-fab__actions button {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  cursor: pointer;
}

.tnsb-fab__cancel {
  background: #2b2b2b;
  color: #fff;
}

.tnsb-fab__submit {
  background: #6d79ff;
  color: #111;
  position: relative;
}

.tnsb-fab__submit.is-busy {
  opacity: 0.8;
  pointer-events: none;
}

.tnsb-fab__submit.is-busy::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: #111;
  border-radius: 50%;
  animation: tnsb-spin 0.9s linear infinite;
}

/* =============== 5. Text Editor Interface =============== */

/* Text button */
.tnsb-fab__textbtn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 33px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  background: color(srgb 0.4258 0.4761 1);
  color: #fff;
  border: 0;
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tnsb-fab__textbtn:active {
  transform: translateY(1px);
}

/* Top toolbar */
.tnsb-fab__text-topbar {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.tnsb-fab__text-topbar.is-active {
  opacity: 1;
  visibility: visible;
}

/* Text modes */
.tnsb-fab__text-modes {
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2px;
  backdrop-filter: blur(10px);
}

.tnsb-fab__text-mode {
  padding: 6px 8px;
  border-radius: 18px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  min-width: 36px;
}

.tnsb-fab__text-mode.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

/* Done button */
.tnsb-fab__text-done {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tnsb-fab__text-done:active {
  transform: scale(0.95);
}

/* Font size slider */
.tnsb-fab__font-slider {
  position: absolute;
  right: 30px;
  top: 50%;
  width: 100px;
  height: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 9;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center center;
}

.tnsb-fab__font-slider.is-visible {
  opacity: 1;
  visibility: visible;
}

.tnsb-fab__font-range,
.tnsb-fab__sheet input[type="range"],
.tnsb-fab input[type="range"] {
  width: 100% !important;
  max-width: 100px !important;
  min-width: 100px !important;
  height: 3px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: rgba(255, 255, 255, 0.3) !important;
  border-radius: 2px !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tnsb-fab__font-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tnsb-fab__font-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Color picker */
.tnsb-fab__color-picker {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 25px;
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 9;
}

.tnsb-fab__color-picker.is-visible {
  opacity: 1;
  visibility: visible;
}

.tnsb-fab__color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.tnsb-fab__color-option.is-active {
  border-color: #fff;
  transform: scale(1.1);
}

/* Color option variants */
.tnsb-fab__color-option[data-color="white"] { background: #fff; }
.tnsb-fab__color-option[data-color="black"] { background: #000; }
.tnsb-fab__color-option[data-color="red"] { background: #ff3040; }
.tnsb-fab__color-option[data-color="orange"] { background: #ff8c00; }
.tnsb-fab__color-option[data-color="yellow"] { background: #ffd700; }
.tnsb-fab__color-option[data-color="green"] { background: #00c851; }
.tnsb-fab__color-option[data-color="blue"] { background: #007bff; }
.tnsb-fab__color-option[data-color="purple"] { background: #6f42c1; }
.tnsb-fab__color-option[data-color="pink"] { background: #e91e63; }

/* Alignment tools */
.tnsb-fab__alignment-tools {
  position: absolute;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 9;
}

.tnsb-fab__alignment-tools.is-visible {
  opacity: 1;
  visibility: visible;
}

.tnsb-fab__align-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.tnsb-fab__align-btn.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

/* Text input element */
.tnsb-fab__text {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  text-shadow: none;
  max-width: 85%;
  padding: 8px 12px;
  -webkit-user-select: text;
  user-select: text;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-height: 28px;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: keep-all;
  cursor: text;
  text-align: center;
}

.tnsb-fab__text.is-placeholder {
  opacity: 0.6;
  color: rgba(255, 255, 255, 0.8);
}

.tnsb-fab__text:focus,
.tnsb-fab__text.is-editing {
  outline: 3px solid #6A5ACD;
  outline-offset: 6px;
  box-shadow: 0 0 0 6px rgba(106, 90, 205, 0.3);
  animation: blue-pulse 2s ease-in-out infinite;
}

/* Text alignment variations */
.tnsb-fab__text[style*="text-align: left"] {
  transform: translate(-85%, -50%);
  left: 15%;
}

.tnsb-fab__text[style*="text-align: right"] {
  transform: translate(-15%, -50%);
  left: 85%;
}

.tnsb-fab__text[style*="text-align: center"] {
  transform: translate(-50%, -50%);
  left: 50%;
}

/* Text mode styles */
.tnsb-fab__text.mode-classic {
  background: transparent;
  text-shadow: none;
}

.tnsb-fab__text.mode-modern {
  background: rgba(0, 0, 0, 0.4);
  text-shadow: none;
  backdrop-filter: blur(4px);
}

.tnsb-fab__text.mode-neon {
  background: transparent;
  text-shadow: 0 0 8px currentColor;
  filter: brightness(1.2);
}

.tnsb-fab__text.mode-typewriter {
  background: rgba(255, 255, 255, 0.95);
  color: #000 !important;
  text-shadow: none;
  font-family: 'Courier New', monospace;
  font-weight: 400;
}

/* Background for text */
.tnsb-fab__text-bg {
  position: absolute;
  inset: -8px;
  border-radius: 8px;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: -1;
}

.tnsb-fab__text.has-bg .tnsb-fab__text-bg {
  opacity: 0.9;
}

/* Animation classes */
.tnsb-fab__text.animate-fadeIn {
  animation: tnsbFadeIn 0.3s ease;
}

.tnsb-fab__text.animate-slideUp {
  animation: tnsbSlideUp 0.3s ease;
}

.tnsb-fab__text.animate-bounce {
  animation: tnsbBounce 0.5s ease;
}

/* =============== 6. Animations & Keyframes =============== */

@keyframes tnsb-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tnsbFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes tnsbSlideUp {
  from {
    transform: translate(-50%, -30%) translateY(20px);
  }
  to {
    transform: translate(-50%, -50%) translateY(0);
  }
}

@keyframes tnsbBounce {
  0%, 20%, 60%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  40% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  80% {
    transform: translate(-50%, -50%) scale(0.95);
  }
}

@keyframes blue-pulse {
  0%, 100% {
    box-shadow: 0 0 0 6px rgba(106, 90, 205, 0.3);
    outline-color: #6A5ACD;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(106, 90, 205, 0.15);
    outline-color: #7B68EE;
  }
}

/* =============== 7. Responsive Design =============== */

/* Mobile landscape adjustments */
@media (max-width: 736px) {
  .tnsb-stories__icons {
    gap: 8px;
    padding: 0 16px;
    margin: 0 -16px;
  }
  
  .tnsb-story-icon:first-child {
    margin-left: 0;
  }
  
  .tnsb-story-icon:last-child {
    margin-right: 0;
  }
  
  .tnsb-fab__font-slider {
    right: 0;
    width: 60px;
  }
  
  .tnsb-fab__font-slider input[type="range"] {
    width: 30vw;
    height: 4px;
  }
  
  .tnsb-fab__color-picker {
    bottom: 20px;
    gap: 10px;
  }
  
  .tnsb-fab__color-option {
    width: 20px;
    height: 20px;
  }
  
  .tnsb-fab__alignment-tools {
    bottom: 56px;
    gap: 10px;
  }
  
  .tnsb-fab__align-btn {
    width: 20px;
    height: 20px;
  }
}

/* FAB sheet responsive layouts */
@media (max-width: 640px) {
  .tnsb-fab__sheet {
    align-items: flex-start;
    padding-top: max(39px, calc(env(safe-area-inset-top, 0px) + 20px));
  }
}

@media (min-width: 641px) {
  .tnsb-fab__sheet {
    align-items: center;
    padding: 40px 24px;
  }
}

/* Tablet and desktop story icons */
@media (max-width: 768px) {
  .tnsb-stories {
    position: relative;
  }
  
  .tnsb-stories::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    pointer-events: none;
    z-index: 1;
  }
}


/* =============== いいねボタン機能 =============== */

.tnsb-story-like-container {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.tnsb-story-like-container.is-visible {
  opacity: 1;
  visibility: visible;
}

.tnsb-story-like-btn {
  background: #fff;
  border: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.tnsb-story-like-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}

.tnsb-story-like-btn:active {
  transform: scale(0.95);
}

.tnsb-story-like-btn.tnsb-liked {
  background: rgba(0, 0, 0, 0.5);
  animation: like-pulse 0.3s ease;
}

.tnsb-story-like-icon {
  width: 20px;
  height: 20px;
  display: block;
  transition: all 0.2s ease;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.tnsb-story-like-icon.liked {
  background-image: url('images/iine-on.png');
}

.tnsb-story-like-icon.not-liked {
  background-image: url('images/iine-off.png');
}

.tnsb-story-like-count {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  min-width: 20px;
  text-align: left;
}

@keyframes like-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.tnsb-story-like-btn.animate-heart .tnsb-story-like-icon {
  animation: heart-bounce 0.4s ease;
}

@keyframes heart-bounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1.4); }
  75% { transform: scale(1.1); }
}

@media (max-width: 480px) {
  .tnsb-story-like-container {
    left: 12px;
    bottom: 12px;
  }
  
  .tnsb-story-like-btn {
    width: 38px;
    height: 38px;
  }
  
  .tnsb-story-like-icon {
    width: 18px;
    height: 18px;
  }
  
  .tnsb-story-like-count {
    font-size: 13px;
  }
}