.film-main {
  padding: 120px 32px 100px;
  background: #f9f7f5;
  min-height: 100vh;
}

.tiktok-section {
  padding: 80px 0;
  background-color: #f9f7f5;
  position: relative;
}

.tiktok-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(to right, transparent, #d4a977, transparent);
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: #333;
  margin-bottom: 15px;
}

.section-header p {
  font-size: 18px;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  grid-auto-rows: 1fr;
  gap: 28px;
  margin: 0 auto;
  max-width: 1300px;
  padding-top: 0;
  justify-items: stretch;
}

.film-main {
  padding: 70px 24px 80px;
}

.tiktok-video-wrapper {
  min-height: 380px;
  width: 100%;
}

.tiktok-card {
  min-height: 380px;
  min-width: 0;
}

@media (min-width: 1200px) {
  .tiktok-grid {
    gap: 30px;
  }
}

.tiktok-slider,
.tiktok-slide,
.carousel-controls,
.carousel-dots,
.dot,
.prev-btn,
.next-btn {
  display: none !important;
}

.tiktok-video-wrapper {
  position: relative;
  width: 100%;
}

.tiktok-card {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  background: #111;
}

.tiktok-preview {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tiktok-preview:hover {
  transform: translateY(-5px);
}

.tiktok-preview-image {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%;
  background-color: #000;
}

.tiktok-preview-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tiktok-preview:hover .tiktok-preview-image img {
  transform: scale(1.05);
}

.dark-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
}

.tiktok-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55px;
  height: 55px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.95;
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: none;
  padding: 0;
  z-index: 2;
}

.tiktok-play-button svg {
  width: 26px;
  height: 26px;
}

.tiktok-preview:hover .tiktok-play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.tiktok-preview-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  z-index: 2;
}

.tiktok-preview-content {
  padding: 18px 20px 24px;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tiktok-preview-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.tiktok-preview-description {
  margin: 0;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.5;
}

.tiktok-preview-link {
  color: #d4a977;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
}

.tiktok-preview-link:hover {
  color: #f7e5c7;
}

.tiktok-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.tiktok-modal-content {
  width: min(1100px, 100%);
  max-height: 90vh;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.tiktok-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.tiktok-modal-title {
  padding: 18px 20px 12px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  background: #111;
}

.tiktok-modal-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
}

.tiktok-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.tiktok-modal-content .tiktok-loading {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

@media (max-width: 1100px) {
  .tiktok-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 26px;
  }
}

@media (max-width: 820px) {
  .tiktok-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .film-main {
    padding: 60px 18px 60px;
  }

  .tiktok-preview-content {
    padding: 16px 18px 20px;
  }

  .tiktok-preview-title {
    font-size: 16px;
  }

  .tiktok-preview-description {
    font-size: 13px;
  }

  .tiktok-play-button {
    width: 50px;
    height: 50px;
  }

  .tiktok-play-button svg {
    width: 22px;
    height: 22px;
  }
}

.tiktok-embed-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tiktok-embed-wrapper iframe,
.tiktok-embed-wrapper .tiktok-iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
  position: absolute;
  inset: 0;
}

.tiktok-back-button {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.tiktok-back-button:hover {
  opacity: 1;
}

.tiktok-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.45);
  z-index: 5;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(212, 169, 119, 0.3);
  border-radius: 50%;
  border-top-color: #d4a977;
  animation: spin 1s ease-in-out infinite;
}

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

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  margin: 0 20px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #d4a977;
}

.prev-btn,
.next-btn {
  background-color: #d4a977;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.prev-btn:hover,
.next-btn:hover {
  background-color: #b78c5e;
}

.prev-btn svg,
.next-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 992px) {
  .tiktok-video-wrapper {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }

  .section-header h2 {
    font-size: 32px;
  }

  .section-header p {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .tiktok-video-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .section-header h2 {
    font-size: 28px;
  }

  .section-header p {
    font-size: 15px;
  }

  .tiktok-section {
    padding: 60px 0;
  }
}
