/* css/video-feed.css — TikTok tərzi şaquli video lenti */

:root {
  --vf-bg: #000;
  --vf-text: #fff;
  --vf-accent: #ed1c24;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--vf-bg);
  color: var(--vf-text);
  overflow: hidden;
}

.vf-page {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
}

.vf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent);
}

.vf-icon-btn {
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* VACİB: "display: flex" yuxarıda [hidden]-in defolt "display: none"-unu
   üstələyirdi (ikisi də eyni spesifiklikdə, sonuncu udur) — bu, gizlədilməli
   olan zibil qutusu düyməsinin (başqasının story-sində) görünməsinə səbəb
   olmuşdu. Bu qayda ilə hidden atributu həmişə qazanır. */
.vf-icon-btn[hidden] {
  display: none !important;
}

.vf-title {
  font-weight: 700;
  font-size: 15px;
}

.vf-feed {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

/* ---- Story zolağı ---- */
.vf-top-overlay {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 54px);
  left: 0;
  right: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
}

.vf-mode-tabs {
  display: flex;
  gap: 8px;
  padding: 4px 14px 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent);
}

.vf-mode-tabs[hidden] {
  display: none !important;
}

.vf-mode-tab {
  border: 0;
  border-radius: 16px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .65);
  background: rgba(255, 255, 255, .1);
  cursor: pointer;
}

.vf-mode-tab.active {
  color: #000;
  background: #fff;
}

.vf-stories-bar {
  padding: 6px 0 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent);
}

.vf-stories-bar[hidden] {
  display: none !important;
}

.vf-stories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 14px;
  -webkit-overflow-scrolling: touch;
}

.vf-story-circle {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 60px;
  cursor: pointer;
}

.vf-story-ring {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  padding: 2px;
  background: rgba(255, 255, 255, .25);
}

.vf-story-ring.has-story {
  background: linear-gradient(135deg, #ed1c24, #ffd400, #4caf50, #1877c9);
}

.vf-story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vf-bg);
}

.vf-story-add-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--vf-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 2px solid var(--vf-bg);
}

.vf-story-circle-name {
  font-size: 10px;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  opacity: .9;
}

/* ---- Story görüntüləyici (tam ekran) ---- */
.vf-story-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #000;
  display: flex;
  flex-direction: column;
}

.vf-story-viewer[hidden] {
  display: none !important;
}

.vf-story-progress-row {
  display: flex;
  gap: 4px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 10px 0;
}

.vf-story-progress-track {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .3);
  overflow: hidden;
}

.vf-story-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff;
}

.vf-story-progress-fill.filled {
  width: 100% !important;
}

.vf-story-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.vf-story-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.vf-story-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
}

.vf-story-delete-btn i {
  color: #ff8080;
}

.vf-story-media-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.vf-story-media-wrap img,
.vf-story-media-wrap video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.vf-story-nav {
  position: absolute;
  top: 60px;
  bottom: 0;
  width: 33%;
  border: 0;
  background: transparent;
}

.vf-story-nav-left {
  left: 0;
}

.vf-story-nav-right {
  right: 0;
}

.vf-story-viewers-btn {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  transform: translateX(-50%);
  z-index: 10;
  border: 0;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.vf-story-viewers-btn[hidden] {
  display: none !important;
}

.vf-slide {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.vf-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vf-mute-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  color: rgba(255, 255, 255, .85);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.vf-mute-hint.show {
  opacity: 1;
}

.vf-overlay {
  position: absolute;
  left: 14px;
  right: 90px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.vf-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  width: fit-content;
}

.vf-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .8);
}

.vf-user-name {
  font-weight: 700;
  font-size: 14px;
}

.vf-time-ago {
  font-size: 12px;
  font-weight: 500;
  opacity: .75;
}

/* #64: duet olan videolarda orijinala keçid nişanı */
.vf-duet-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, .16);
  border-radius: 10px;
  padding: 4px 9px;
  margin-bottom: 6px;
  width: fit-content;
  cursor: pointer;
  pointer-events: auto;
}

.vf-caption {
  font-size: 13px;
  line-height: 1.4;
  opacity: .95;
}

.vf-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.vf-hashtags span {
  font-size: 12px;
  font-weight: 700;
  opacity: .85;
}

.vf-actions {
  position: absolute;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.vf-action-btn {
  border: 0;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.vf-action-btn i {
  font-size: 26px;
}

.vf-action-btn.liked i {
  color: var(--vf-accent);
}

.vf-delete-btn i {
  color: #ff8080;
}

.vf-report-btn i {
  color: rgba(255, 255, 255, .7);
}

.vf-action-btn:disabled {
  opacity: .5;
  cursor: default;
}

.vf-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vf-bg);
  z-index: 30;
}

.vf-loading[hidden] {
  display: none !important;
}

.vf-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vf-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .vf-spinner { animation: none; }
}

.vf-empty {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: .6;
  z-index: 15;
}

.vf-empty[hidden] {
  display: none !important;
}

.vf-empty i {
  font-size: 40px;
}

/* ---- Modal (yükləmə) ---- */
.vf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .8);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.vf-modal[hidden] {
  display: none !important;
}

.vf-modal-card {
  background: #181818;
  border-radius: 18px;
  padding: 18px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

/* #64 */
.vf-duet-indicator {
  font-size: 12px;
  font-weight: 600;
  background: rgba(237, 28, 36, .18);
  border-radius: 10px;
  padding: 7px 10px;
  margin-top: 8px;
}

.vf-duet-indicator.hidden {
  display: none !important;
}

.vf-file-picker {
  border: 2px dashed rgba(255, 255, 255, .25);
  border-radius: 14px;
  padding: 30px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, .7);
}

.vf-file-picker i {
  font-size: 26px;
}

.vf-preview-video {
  width: 100%;
  max-height: 260px;
  border-radius: 12px;
  background: #000;
}

.vf-caption-input {
  background: rgba(255, 255, 255, .08);
  border: 0;
  border-radius: 10px;
  padding: 10px;
  color: #fff;
  font-size: 13px;
  resize: none;
  min-height: 50px;
}

.vf-hashtag-input {
  background: rgba(255, 255, 255, .08);
  border: 0;
  border-radius: 10px;
  padding: 10px;
  color: #fff;
  font-size: 13px;
}

.vf-note {
  font-size: 11px;
  opacity: .55;
}

.vf-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.vf-btn-primary {
  background: var(--vf-accent);
  color: #fff;
}

.vf-btn-primary:disabled {
  opacity: .5;
  cursor: default;
}

/* ---- Rəy paneli ---- */
.vf-comments-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  background: #181818;
  border-radius: 18px 18px 0 0;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}

.vf-comments-panel[hidden] {
  display: none !important;
}

.vf-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.vf-comments-list {
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vf-comment-row {
  display: flex;
  gap: 8px;
}

.vf-comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.vf-comment-name {
  font-size: 12px;
  font-weight: 700;
}

.vf-comment-text {
  font-size: 13px;
  opacity: .9;
}

.vf-comment-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 10px);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.vf-comment-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, .08);
  border: 0;
  border-radius: 20px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
}

.vf-comments-empty {
  text-align: center;
  opacity: .5;
  font-size: 12px;
  padding: 20px 0;
}
