/* 피드·내 페이지: 순위 카드 (A 테마) */
.tabs { display:flex; gap:6px; overflow-x:auto; padding:14px 0 4px; scrollbar-width:none; }
.tabs a { flex:none; padding:9px 20px; clip-path:var(--slant); background:var(--card); color:var(--sub);
  text-decoration:none; font-weight:800; font-size:14px; }
.tabs a:hover { color:var(--text); background:var(--card2); }
.tabs a.on { background:var(--red); color:#fff; }

h2 { font-family:var(--display); font-weight:400; font-size:32px; letter-spacing:1px; margin:40px 0 14px; display:flex; align-items:center; gap:12px; }
h2::before { content:""; width:8px; height:26px; background:var(--red); flex:none; }

/* 카드 격자. .ranked 의 1위는 2×2 크게 */
.cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:14px; }
.cards.ranked .card:first-child { grid-column:span 2; grid-row:span 2; }
.cards.ranked .card:first-child .kill { font-size:clamp(48px, 7vw, 92px); left:20px; bottom:16px; animation:slam .7s .2s cubic-bezier(.2,1.4,.4,1) both; }
.cards.ranked .card:first-child .t { font-size:20px; }
.cards.ranked .card:first-child .th { aspect-ratio:auto; }
.cards.ranked .card:only-child .th { flex:0 0 auto; aspect-ratio:16/9; }
.cards.ranked .card:first-child .rk { font-size:44px; padding:8px 16px 2px; animation:pulse 2s 1s infinite; }
@media (max-width: 520px) {
  .cards { grid-template-columns:1fr 1fr; gap:8px; }
  .cards.ranked .card:first-child { grid-column:1 / -1; grid-row:auto; }
  .cards.ranked .card:first-child .th { aspect-ratio:16/9; }
}

.card { position:relative; display:flex; flex-direction:column; background:var(--card); clip-path:var(--cut);
  transition:transform .25s cubic-bezier(.2,.8,.2,1); animation:up .55s cubic-bezier(.2,.8,.2,1) backwards; }
.card:nth-child(2) { animation-delay:.06s } .card:nth-child(3) { animation-delay:.12s } .card:nth-child(4) { animation-delay:.18s }
.card:nth-child(5) { animation-delay:.24s } .card:nth-child(6) { animation-delay:.3s } .card:nth-child(n+7) { animation-delay:.36s }
.card:hover { transform:translateY(-6px); }
.th { position:relative; display:block; aspect-ratio:16/9; background:#000; overflow:hidden; flex:1; min-height:0; }
.th img, .th .ph { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; transition:transform .5s cubic-bezier(.2,.8,.2,1); }
.card:hover .th img, .card:hover .th .ph { transform:scale(1.08); }
.th .ph { background:linear-gradient(135deg, rgba(255,70,85,.25), transparent 60%), repeating-linear-gradient(-45deg, #16222e 0 14px, #1a2733 14px 28px); }
.th::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, transparent 40%, rgba(15,25,35,.95)); }

/* 1위 카드에 빛이 스침 */
.r1 .th::before { content:""; position:absolute; z-index:2; top:0; bottom:0; left:0; width:30%; pointer-events:none;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); animation:sweep 3.5s 1s infinite; }

/* 썸네일 위 킬 종류 ("PENTAKILL") */
.kill { position:absolute; left:12px; bottom:8px; z-index:1; font-family:var(--display); font-size:30px; line-height:.95; letter-spacing:1px;
  color:#fff; text-shadow:0 3px 16px rgba(0,0,0,.7); }
/* 썸네일 위 닉네임 (WEB-22) — 킬 종류는 아래 .tag */
.thw { position:relative; display:flex; flex-direction:column; flex:1; min-height:0; }
.nick { position:absolute; left:12px; bottom:10px; max-width:calc(100% - 24px); z-index:2; font-weight:900; font-size:clamp(15px, 1.5vw, 20px); line-height:1.1; letter-spacing:-.3px;
  color:#fff; text-decoration:none; text-shadow:0 3px 16px rgba(0,0,0,.8); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nick:hover { text-decoration:underline; }
.cards.ranked .card:first-child .nick { font-size:clamp(30px, 4.5vw, 56px); left:20px; bottom:16px; animation:slam .7s .2s cubic-bezier(.2,1.4,.4,1) both; }
.meta .m .tag { font-family:var(--display); font-size:18px; letter-spacing:1px; line-height:1; }
.tag { color:#fff; } /* 기본 흰색, 아래 .k-* 가 덮음 (같은 우선순위라 뒤에 오는 쪽) */
.k-PENTA, .k-ACE { color:var(--red); }
.k-QUADRA { color:#ff8a5c; }
.k-potg { color:#ffd25c; }
.k-funny { color:#7cd4ff; font-family:var(--display), "Black Han Sans", sans-serif; }

/* 순위 숫자 */
.rk { position:absolute; top:0; left:12px; z-index:3; padding:6px 11px 1px; font-family:var(--display); font-size:28px; line-height:1;
  color:#fff; background:rgba(15,25,35,.85); clip-path:var(--cut-sm); }
.r1 .rk, .r2 .rk, .r3 .rk { background:var(--red); }

.meta { padding:10px 14px 14px; display:grid; gap:3px; }
.meta .t { font-weight:800; font-size:15px; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.meta .m { font-size:13px; color:var(--sub); display:flex; gap:6px; align-items:center; white-space:nowrap; overflow:hidden; min-height:18px; }
.meta .m a { text-decoration:none; overflow:hidden; text-overflow:ellipsis; }
.meta .m a:hover { color:var(--text); }
.meta .m b { color:var(--red2); font-weight:800; margin-left:auto; }
.own { display:flex; gap:6px; align-items:center; margin-top:6px; } /* 내 페이지 관리 줄 (주인만, public/user.js) */
.own button, .own a { background:var(--card2); color:var(--text); border:0; clip-path:var(--slant); padding:5px 12px; font:inherit; font-size:12px;
  font-weight:800; text-decoration:none; cursor:pointer; white-space:nowrap; }
.own button:hover, .own a:hover { background:var(--line); }
.own .vis[data-pub="0"] { background:var(--red); color:#fff; }
.own .del { margin-left:auto; }
.own .del.on { background:var(--red); color:#fff; }
.own button:disabled { opacity:.5; cursor:default; }
/* 안내 (공개·삭제 결과) — 화면 아래 잠깐 */
.toast { position:fixed; z-index:40; left:50%; bottom:40px; transform:translate(-50%, 20px); margin:0; padding:12px 18px; border-radius:12px;
  background:rgba(20,22,28,.95); border:1px solid var(--line); font-size:14px; opacity:0; pointer-events:none; transition:.2s; max-width:calc(100% - 32px); }
.toast.on { opacity:1; transform:translate(-50%, 0); }

@keyframes slam { 0% { opacity:0; transform:scale(2.4) skewX(-8deg); filter:blur(8px); } 60% { opacity:1; transform:scale(.95) skewX(-8deg); filter:none; } 100% { transform:scale(1) skewX(-8deg); } }
@keyframes sweep { 0%, 60% { transform:translateX(-120%) skewX(-20deg); } 100% { transform:translateX(420%) skewX(-20deg); } }
@keyframes pulse { 0%, 100% { scale:1; } 50% { scale:1.1; } }

/* 내 페이지 머리 */
.profile { display:flex; gap:24px; align-items:center; margin:24px 0 8px; padding:26px; clip-path:var(--cut);
  background:linear-gradient(110deg, rgba(255,70,85,.2), transparent 55%), var(--card); }
.avatar { flex:none; width:96px; height:96px; display:grid; place-items:center; clip-path:var(--cut-sm);
  font-family:var(--display); font-size:52px; color:#fff; background:var(--red); }
.uname { font-family:var(--body); font-weight:900; font-size:40px; line-height:1.1; margin:0 0 6px; letter-spacing:-.5px; word-break:break-all; } /* @아이디는 소문자 → 대문자뿐인 Bebas 안 씀 */
.usum { display:flex; flex-wrap:wrap; gap:8px; margin:0; color:var(--sub); font-size:14px; }
.usum b { color:var(--text); font-size:16px; }
.umedals { display:inline-block; margin:12px 0 0; padding:6px 14px; clip-path:var(--slant); background:rgba(255,70,85,.15); font-size:15px; }
@media (max-width: 520px) { .profile { flex-direction:column; text-align:center; } .usum { justify-content:center; } }

/* 아이디 정하기 */
.handle-box { margin:16px 0 0; padding:14px 18px; clip-path:var(--cut); background:var(--card); }
.handle-box summary { cursor:pointer; color:var(--sub); font-weight:600; }
.handle-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:10px; color:var(--sub); }
.handle-form input { background:var(--bg); color:var(--text); border:1px solid var(--line); padding:8px 10px; font:inherit; width:12em; }
.handle-form button { background:var(--red); color:#fff; border:0; clip-path:var(--slant); padding:8px 18px; font:inherit; font-weight:800; cursor:pointer; }
.handle-form .hint { flex-basis:100%; }
.handle-form .later { color:var(--sub); }

/* 관리 (/admin) */
.adm li { align-items:flex-start; flex-direction:column; }
.adm .reps { margin:4px 0; padding-left:18px; font-size:14px; }
.adm .acts { display:flex; flex-wrap:wrap; gap:6px; }

/* 아래쪽 링크 · 약관 페이지 · 가입 동의 */
.foot { margin:48px 0 0; padding-top:16px; border-top:1px solid var(--line); color:var(--sub); font-size:13px; }
.foot a { color:var(--sub); }
.legal h3 { margin:28px 0 8px; font-size:17px; }
.legal p, .legal li { line-height:1.7; color:#d6d2cc; }
.legal-t { border-collapse:collapse; width:100%; font-size:14px; }
.legal-t th, .legal-t td { border:1px solid var(--line); padding:8px 10px; text-align:left; vertical-align:top; }
.legal-t th { background:var(--card); }
.agree { display:grid; gap:12px; }
.agree label { display:flex; gap:8px; align-items:center; cursor:pointer; }
.agree a { color:var(--red2); }
.agree button[type=submit], .withdraw button { background:var(--red); color:#fff; border:0; clip-path:var(--slant); padding:8px 18px; font:inherit; font-weight:800; cursor:pointer; }
.agree .later { background:none; border:0; color:var(--sub); font:inherit; cursor:pointer; text-decoration:underline; }
.withdraw { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:10px; }
.withdraw input { background:var(--bg); color:var(--text); border:1px solid var(--line); padding:8px 10px; font:inherit; }
.withdraw .hint { flex-basis:100%; margin:0; }

/* 올리기 (/upload, 시험 운영) */
.up { display:grid; gap:12px; }
.up label { display:grid; gap:6px; color:var(--sub); }
.up label.up-pub { display:flex; align-items:center; gap:8px; color:var(--text); }
.up input:not([type=checkbox]), .up select { background:var(--bg); color:var(--text); border:1px solid var(--line); padding:8px 10px; font:inherit; }
.up video { width:100%; max-height:360px; background:#000; }
.up progress { width:100%; }
.up button { background:var(--red); color:#fff; border:0; clip-path:var(--slant); padding:10px 22px; font:inherit; font-weight:800; cursor:pointer; }
.up button:disabled { opacity:.5; cursor:default; }

/* PC 앱 내려받기 (/download) */
.dl button { background:var(--line); color:var(--sub); border:0; clip-path:var(--slant); padding:12px 28px; font:inherit; font-weight:800; }
.dl .dl-btn { display:inline-block; background:var(--red); color:#fff; clip-path:var(--slant); padding:12px 28px; font-weight:800; text-decoration:none; }
.dl .dl-btn:hover { background:var(--red2); }
.dl-specs { width:100%; table-layout:fixed; border-collapse:collapse; font-size:14px; line-height:1.5; }
.dl-specs th, .dl-specs td { border:1px solid var(--line); padding:10px 14px; text-align:left; overflow-wrap:anywhere; }
.dl-specs thead th { background:var(--card2); color:var(--text); }
.dl-specs thead th:first-child { width:21%; }
.dl-specs tbody th { background:var(--card); }
.dl-specs small { color:var(--sub); font-size:.86em; font-weight:400; }
@media (max-width:560px) {
  .dl-specs { font-size:12px; }
  .dl-specs th, .dl-specs td { padding:7px 6px; }
}

/* 첫 화면 유형 거르기 (전체·POTG·재미) — 기간 탭 위, 조금 작게 */
.tabs.cats { padding-bottom:0; }
.tabs.cats a { padding:6px 16px; font-size:13px; }
/* 올리기 유형 고르기 */
.up fieldset.up-cat { border:0; padding:0; margin:0; display:flex; gap:16px; flex-wrap:wrap; }
.up fieldset.up-cat legend { color:var(--sub); padding:0; margin-bottom:6px; }
.up fieldset.up-cat label { display:flex; align-items:center; gap:6px; color:var(--text); }
.up label[hidden] { display:none; }

/* 첫 화면 → 추천 영상 넘겨 보기 (/watch) */
.watch-btn { display:inline-block; margin:14px 0 0; padding:12px 28px; clip-path:var(--slant); background:var(--red); color:#fff;
  font-weight:900; font-size:16px; text-decoration:none; }
.watch-btn:hover { background:var(--red2); }
.feed-controls { margin:18px 0 24px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.game-controls { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 14px;
  background:linear-gradient(100deg, #263441, transparent 70%); border-radius:12px 12px 0 0; }
.game-controls .tabs { min-width:0; padding:0; }
.game-controls .watch-btn { flex:none; margin:0; white-space:nowrap; border-radius:6px; clip-path:none; }
.feed-controls .tabs a { clip-path:none; border-radius:5px; }
.feed-filters { display:flex; justify-content:space-between; gap:10px; padding:9px 14px; border-top:1px solid var(--line); }
.feed-filters .tabs { padding:0; min-width:0; }
.feed-filters .tabs a { padding:6px 12px; font-size:13px; }
.feed-filters .tabs a.on { background:var(--card2); color:var(--text); box-shadow:inset 0 -2px var(--red); }
.rank-empty p { margin:0; }
.rank-empty a { display:inline-block; margin-top:8px; color:var(--red2); font-weight:700; }
@media (max-width:700px) {
  .game-controls { flex-direction:column; align-items:stretch; gap:8px; }
  .game-controls .watch-btn { align-self:flex-start; }
  .feed-filters { flex-direction:column; gap:6px; }
}

.first-clip {
  position:relative; isolation:isolate; display:grid; align-items:center; overflow:hidden;
  min-height:clamp(320px,48vw,475px); padding:clamp(24px,6vw,65px); margin:18px 0;
  background:#101923; border:1px solid var(--line); clip-path:var(--cut);
  --first-art:url("/art/valorant-empty.jpg"); --first-accent:#ff7286;
}
.first-clip[data-game="lol"] { --first-art:url("/art/lol-anima-squad.jpg"); --first-accent:#f2c170; }
.first-clip[data-game="eternal_return"] { --first-art:url("/art/eternal-return-empty.jpg"); --first-accent:#66e7ce; }
.first-clip::before,.first-clip::after { content:""; position:absolute; inset:0; pointer-events:none; }
.first-clip::before {
  z-index:-2; background:var(--first-art) right center / auto 116% no-repeat;
  animation:first-clip-scene 4s cubic-bezier(.18,.65,.22,1) both;
}
.first-clip::after {
  z-index:-1; background:linear-gradient(90deg,#101923 0%,rgba(16,25,35,.88) 30%,rgba(16,25,35,.35) 70%,transparent);
}
.first-clip-copy { max-width:350px; animation:first-clip-copy .5s ease-out both; }
.first-clip-copy p { margin:0 0 16px; font-size:14px; line-height:1.55; color:#c8d0dc; }
.first-clip-copy .first-clip-game { color:var(--first-accent); font-size:12px; font-weight:800; letter-spacing:.08em; }
.first-clip h2 { margin:0 0 10px; font-size:clamp(26px,5vw,48px); line-height:1.18; word-break:keep-all; }
.first-clip .watch-btn { display:inline-flex; margin:0; }
@keyframes first-clip-scene { from { transform:scale(1.075); opacity:.6; } to { transform:scale(1); opacity:1; } }
@keyframes first-clip-copy { from { transform:translateY(7px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@media (max-width:600px) {
  .first-clip { min-height:430px; align-items:end; }
  .first-clip::before { background-size:auto 84%; background-position:60% top; }
  .first-clip::after { background:linear-gradient(0deg,#101923 10%,rgba(16,25,35,.94) 28%,rgba(16,25,35,.28) 72%,transparent); }
}
@media (prefers-reduced-motion:reduce) {
  .first-clip::before,.first-clip-copy { animation:none; }
}

/* 방금 올라온 클립 → 더 보기 */
.more-btn { display:block; margin:18px auto 0; padding:12px 36px; border:1px solid var(--line); border-radius:8px; background:var(--card);
  color:var(--text); font:inherit; font-weight:700; cursor:pointer; }
.more-btn:hover:not(:disabled) { border-color:var(--red); }
.more-btn:disabled { opacity:.6; cursor:default; }

/* 다운로드 받기 칸 */
.hero { margin:18px 0; padding:clamp(22px,5vw,48px); background:linear-gradient(100deg,#1d2b38,var(--card) 60%); clip-path:var(--cut); text-align:center; }
.hero > p { margin:0 auto; max-width:520px; word-break:keep-all; color:#c8d0dc; line-height:1.55; }
.ghost-btn { display:inline-block; padding:12px 24px; border:1px solid var(--line); color:var(--text); font-weight:800; text-decoration:none; clip-path:var(--slant); }
.ghost-btn:hover { border-color:var(--red2); color:var(--red2); }
.dl-hero { padding:20px; }
.dl-hero .dl { margin-top:10px; }
.dl-steps, .dl-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:0 0 8px; padding:0; list-style:none; counter-reset:step; }
.dl-steps li, .dl-cards li { padding:16px; background:var(--card); clip-path:var(--cut-sm); color:var(--sub); font-size:14px; line-height:1.5; }
.dl-steps b, .dl-cards b { display:block; margin-bottom:4px; color:var(--text); font-size:16px; }
.dl-steps b::before { counter-increment:step; content:counter(step) ". "; color:var(--red); font-family:var(--display); }
.dl-cards { margin-top:12px; }
.dl-faq details { margin:0 0 8px; padding:12px 16px; background:var(--card); clip-path:var(--cut-sm); }
.dl-faq summary { cursor:pointer; font-weight:700; }
.dl-faq p { margin:8px 0 0; color:var(--sub); line-height:1.55; }
@media (max-width:700px) { .dl-steps, .dl-cards { grid-template-columns:1fr; } }

/* 맨 위 슬라이드 배너 (WEB-10, worker/slides.ts·public/slides.js): 옆으로 밀기 = scroll-snap */
.slides { position:relative; margin:18px 0; }
.slide-track { position:relative; display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; clip-path:var(--cut); }
.slide-track::-webkit-scrollbar { display:none; }
.hero-slide { position:relative; flex:0 0 100%; scroll-snap-align:start; display:flex; align-items:center; min-height:clamp(280px,34vw,360px); overflow:hidden; background:var(--card); }
.hero-slide > video, .hero-slide > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.hero-slide::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg,#101923 10%,rgba(16,25,35,.86) 40%,rgba(16,25,35,.05) 78%); }
.s-clip { background:url("/art/lol-anima-squad.jpg") center/cover; } /* 영상 불러오기 전·실패 때 */
.s-shot > img { left:auto; width:66%; object-position:left center; }
.slide-copy { position:relative; z-index:1; max-width:440px; padding:clamp(20px,4vw,44px); }
.slide-tag { margin:0 0 6px; color:var(--red2); font-size:12px; font-weight:800; letter-spacing:.08em; }
.hero-slide h1, .hero-slide h2 { display:block; margin:0 0 8px; font:800 clamp(24px,4vw,40px)/1.2 var(--body); letter-spacing:0; word-break:keep-all; }
.hero-slide h2::before { content:none; }
.slide-copy p:not(.slide-tag) { margin:0 0 14px; color:#c8d0dc; line-height:1.55; word-break:keep-all; }
.slide-btns { display:flex; flex-wrap:wrap; gap:10px; }
.slide-btns .watch-btn { margin:0; }
.s-games { flex-direction:column; align-items:stretch; justify-content:center; }
.s-games .slide-copy { max-width:none; padding-bottom:0; }
.game-tiles { position:relative; z-index:1; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:14px 0 0; padding:0 clamp(20px,4vw,44px) clamp(20px,4vw,44px); list-style:none; }
.game-tiles a { position:relative; display:flex; flex-direction:column; justify-content:end; min-height:150px; padding:12px; overflow:hidden; clip-path:var(--cut-sm); color:var(--text); text-decoration:none; }
.game-tiles img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.game-tiles a::after { content:""; position:absolute; inset:0; background:linear-gradient(0deg,rgba(16,25,35,.95) 15%,transparent 70%); }
.game-tiles a:hover img { transform:scale(1.05); }
.game-tiles b, .game-tiles span { position:relative; z-index:1; }
.game-tiles span { color:#c8d0dc; font-size:13px; }
.slide-dots { position:absolute; right:22px; bottom:12px; z-index:2; display:flex; gap:6px; }
.slide-dots button:not(.slide-pause) { width:24px; height:20px; padding:8px 0; border:0; background:rgba(255,255,255,.35); background-clip:content-box; cursor:pointer; }
.slide-dots .slide-pause { margin-right:6px; padding:0 4px; border:0; background:none; color:var(--sub); font-size:11px; cursor:pointer; }
.slide-dots .slide-pause:hover { color:var(--text); }
.slide-dots button[aria-current="true"] { background-color:var(--red); }
@media (max-width:700px) {
  .hero-slide { align-items:end; min-height:400px; }
  .hero-slide::after { background:linear-gradient(0deg,#101923 20%,rgba(16,25,35,.85) 50%,rgba(16,25,35,.1)); }
  .s-shot > img { width:100%; height:60%; }
  .game-tiles { grid-template-columns:1fr; gap:8px; }
  .game-tiles a { min-height:64px; }
  .slide-dots { right:auto; left:50%; translate:-50% 0; bottom:4px; }
}
