.kira-tiktok-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(calc(calc(100% - 20px) / 4.5), 1fr));
  gap: 8px;
}

.kira-tiktok-carousel {
  position: relative;
  width: 100%;
}

.kira-tiktok-card {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kira-tiktok-media {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #000;
}

.kira-tiktok-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.kira-tiktok-media video,
.kira-tiktok-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kira-tiktok-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.kira-tiktok-icon::before {
    content: '';
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    display: inline-block;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M8 5v14l11-7z"/></svg>') no-repeat center / 18px;
}

.kira-tiktok-card:hover .kira-tiktok-icon::before {
    background: rgba(255, 255, 255, 0.35);
}

.kira-tiktok-meta {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kira-tiktok-meta p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
}

.kira-tiktok-link {
    font-weight: 600;
    color: #ff0050;
    text-decoration: none;
}

.kira-tiktok-link:hover {
    text-decoration: underline;
}

.kira-tiktok-caption {
    padding: 12px;
}

.kira-tiktok-caption p {
    margin: 0;
    font-size: 14px;
    color: #111;
}

body.kira-tiktok-modal-open {
    overflow: hidden;
}

.kira-tiktok-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-family: inherit;
}

.kira-tiktok-modal[hidden] {
    display: none;
}

.kira-tiktok-modal__backdrop {
    position: absolute;
    inset: 0;
    margin-top: auto;
    background: rgba(0, 0, 0, 0.8);
}

.kira-tiktok-modal__content {
    position: relative;
    display: flex;
    gap: 15px;
    width: min(990px, 92vw);
    max-height: 90vh;
    background: #292929;
    border-radius: 5px;
    padding: 17px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    height: 700px;
}

.kira-tiktok-modal__player {
    flex: 2;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.kira-tiktok-modal__player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.kira-tiktok-modal__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 80%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kira-tiktok-sound {
    position: relative;
    align-self: flex-start;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kira-tiktok-sound:hover {
    background: rgba(255, 255, 255, 0.25);
}

.kira-tiktok-sound::before,
.kira-tiktok-sound::after {
    content: '';
    position: absolute;
}

.kira-tiktok-sound::before {
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M5 15h3l4 4V5L8 9H5z"/><path d="M14.5 12c0-1.38.56-2.63 1.46-3.54l1.06 1.06A3.5 3.5 0 0 0 16.5 12c0 .97.39 1.84 1.02 2.47l-1.06 1.06A4.98 4.98 0 0 1 14.5 12z"/><path d="M17.5 12c0-2.03.83-3.87 2.17-5.2l1.06 1.06A5.99 5.99 0 0 0 19.5 12c0 1.66.67 3.15 1.73 4.24l-1.06 1.06A7.98 7.98 0 0 1 17.5 12z"/></svg>') no-repeat center / contain;
}

.kira-tiktok-sound[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.35);
    color: #000;
}

.kira-tiktok-sound[aria-pressed="false"]::after {
    width: 24px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.kira-tiktok-sound[aria-pressed="true"]::after {
    display: none;
}

.kira-tiktok-sound .screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0;
    border: 0;
    height: 1px;
    width: 1px;
    overflow: hidden;
    white-space: nowrap;
}

.kira-tiktok-seek {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kira-tiktok-time {
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.kira-tiktok-seek input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

.kira-tiktok-seek input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.kira-tiktok-seek input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.kira-tiktok-modal__sidebar {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.kira-tiktok-modal__desc {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 16px;
}

.kira-tiktok-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.kira-tiktok-author {
    display: flex;
    gap: 12px;
    align-items: center;
}

.kira-tiktok-author__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.kira-tiktok-author__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kira-tiktok-author__meta strong {
    font-size: 16px;
    display: block;
}

.kira-tiktok-author__meta span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
}

.kira-tiktok-follow {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 8px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.kira-tiktok-follow:hover {
    background: rgba(255, 255, 255, 0.15);
}

.kira-tiktok-stats {
    list-style: none;
    display: flex;
    gap: 24px;
    padding: 0;
    margin: 0;
}

.kira-tiktok-stats li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kira-tiktok-stats span {
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.kira-tiktok-stats small {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.kira-tiktok-modal__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fe2c55, #25f4ee);
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.kira-tiktok-modal__link:first-of-type {
    margin-top: auto;
}

.kira-tiktok-modal__link + .kira-tiktok-modal__link {
    margin-top: 10px;
}

.kira-tiktok-modal__link--outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.kira-tiktok-modal__link--outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.kira-tiktok-modal__close {
    position: absolute;
    top: -13px;
    right: -12px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.kira-tiktok-modal__close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.kira-tiktok-container {
    width: 100%;
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}

.kira-tiktok-container::-webkit-scrollbar {
    display: none;
}

.kira-tiktok-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #111;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.kira-tiktok-arrow span {
    font-size: 20px;
    line-height: 1;
}

.kira-tiktok-arrow--prev {
    left: 8px;
}

.kira-tiktok-arrow--next {
    right: 8px;
}

.kira-tiktok-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.kira-tiktok-carousel:hover .kira-tiktok-arrow:not(:disabled) {
    opacity: 1;
}
.kira-tiktok-arrow--prev{
  display: none;
}
@media (max-width: 991px) {
  .kira-tiktok-modal__content {
    flex-direction: column;
    padding: 20px;
    max-height: none;
  }

  .kira-tiktok-modal__sidebar {
    width: 100%;
  }

  .kira-tiktok-stats {
    flex-wrap: wrap;
  }
  .kira-tiktok-grid{
    grid-template-columns: repeat(10, minmax(calc(calc(100% - 20px) / 3.5), 1fr));
  }
}
@media (max-width: 991px) {
  .kira-tiktok-grid{
    grid-template-columns: repeat(10, minmax(calc(calc(100% - 20px) / 2.5), 1fr));
    gap: 6px;
  }
  .kira-tiktok-card{
    border-radius: 5px;
  }
}