/* ============================================================
   comp-feed-shell.css (Lego Block)
   틱톡/릴스 스타일 세로 스와이프 피드의 공용 뼈대 — 뮤비(/shorts/)와 워드아트
   (/wordart/reels/) 둘 다 이 파일을 쓴다. 모바일: 진짜 풀스크린. 데스크톱(900px~):
   헤더/푸터가 보이는 채로 화면 중앙에 폰 프레임 모양 카드로 축소 — 유튜브 쇼츠/인스타
   릴스 데스크톱 웹과 같은 패턴. 콘텐츠별 차이(음소거 버튼, 다운로드 링크 등)는 각
   피드의 자체 CSS에 얹는다(2026-08-14 신설, shorts/feed.css에서 분리).
   ============================================================ */
body {
  overflow: hidden;
  margin: 0;
}

.feed-container {
  height: 100dvh;
  width: 100vw;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  background: #000;
  -webkit-overflow-scrolling: touch;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 900;
  scrollbar-width: none; /* Firefox — 스크롤바 없이 스와이프 느낌만 남김 */
}
.feed-container::-webkit-scrollbar {
  display: none; /* Chrome/Edge/Safari */
}

.feed-card {
  position: relative;
  height: 100dvh;
  width: 100vw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
  overflow: hidden;
}

.feed-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.feed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-media iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: auto;
}

.feed-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
  pointer-events: none;
}

.feed-meta {
  position: absolute;
  bottom: 30px;
  left: 20px;
  right: 20px;
  z-index: 10;
  color: #fff;
  text-align: left;
}

.feed-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.feed-desc {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 4px;
}

.feed-genre {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  margin-bottom: 8px;
}

/* 닫기 버튼 (우상단) */
.feed-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

/* 잠금 상태 카드 */
.feed-locked-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 30px;
  z-index: 10;
}

.feed-locked-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.feed-locked-text {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 20px;
}

/* 데스크톱: 헤더/푸터가 보이는 채로 화면 중앙에 폰 프레임처럼 축소 */
@media (min-width: 900px) {
  body {
    overflow: auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .feed-container {
    position: relative;
    width: min(420px, 92vw);
    height: min(760px, 82dvh);
    /* 상하좌우 중앙 정렬 — flex column 안에서 margin:auto가 헤더 아래 남는 공간을
       그대로 흡수해 카드를 가운데로 밀어준다(2026-08-14, 위쪽에만 붙어있던 걸 수정). */
    margin: auto;
    flex-shrink: 0;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08);
    z-index: auto;
  }

  .feed-card {
    height: 100%;
    width: 100%;
    border-radius: 28px;
  }
}
