/**
 * Single Reel Page Styles (/reels/{slug})
 * Vertical player column, metadata, transcript box, CTA banner & related cards
 */

.reel-single-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 900px) {
  .reel-single-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.reel-player-column {
  position: relative;
  z-index: 1;
}

.reel-frame-container {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  position: relative;
  margin: 0 auto;
  isolation: isolate;
  z-index: 1;
}

#reel-single-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.reel-top-ctrls {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

.reel-icon-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.15s;
}

.reel-icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.reel-floating-actions {
  position: absolute;
  right: 14px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.reel-action-btn {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.15s;
}

.reel-action-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.25);
}

.reel-action-btn.liked {
  color: #ef4444;
  border-color: #ef4444;
}

.reel-action-label {
  font-size: 10px;
  font-weight: 700;
  margin-top: 1px;
}

.reel-transcript-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 24px;
}

.reel-cta-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.share-sheet {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-top: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.share-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.share-sheet-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
}

.btn-tg { background: #e0f2fe; color: #0284c7; border-color: #bae6fd; }
.btn-wa { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.btn-vk { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.btn-copy { background: #f8fafc; color: var(--ink); }

/* Autoplay overlay */
.autoplay-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.autoplay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.autoplay-counter {
  font-size: 48px;
  font-weight: 800;
  color: var(--blue);
  width: 70px;
  height: 70px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.autoplay-cancel-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
}

/* Похожие видеоразборы: сетка и карточки */
.reels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.reel-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.reel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.reel-thumbnail-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 14;
  background: #0f172a;
  overflow: hidden;
}

.reel-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.reel-card:hover .reel-poster {
  transform: scale(1.05);
}

.reel-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.1) 45%, transparent 100%);
}

.reel-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  z-index: 2;
}

.reel-play-icon svg {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 12px;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reel-card:hover .reel-play-icon svg {
  transform: scale(1.12);
  background: var(--blue);
}

.reel-stats-bar {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 14px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.reel-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.reel-card-info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.reel-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: var(--ink);
}

.reel-card-desc {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.reel-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.reel-tap-pause-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 15;
}

.reel-tap-pause-indicator.show {
  opacity: 1;
}

.reel-tap-pause-indicator svg {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  padding: 14px;
  border-radius: 50%;
  width: 58px;
  height: 58px;
}

