.mex52-branded-header { background: rgba(228,232,230,.97) !important; border-bottom-color: rgba(55,65,60,.22) !important; box-shadow: 0 4px 16px rgba(25,34,30,.09); }
.mex52-movie-queue { grid-column: 2; grid-row: 1; position: sticky; z-index: 10; top: 92px; align-self: start; width: 100%; color: #20252a; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; }
.mex52-youtube-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 390px); align-items: start; gap: 20px; }
.mex52-youtube-layout > :first-child { grid-column: 1; grid-row: 1; min-width: 0; }
.mex52-youtube-layout > .mex52-movie-queue { grid-column: 2; grid-row: 1 / span 2; }
.mex52-youtube-layout > :not(.mex52-movie-queue):not(:first-child) { grid-column: 1; grid-row: 2; min-width: 0; }
.mex52-queue-toggle { display: none; }
.mex52-queue-toggle span { color: #e7352b; }
.mex52-queue-body { display: block; margin-top: 0; overflow: hidden; border: 1px solid #d7dde1; border-radius: 6px; background: rgba(255,255,255,.98); box-shadow: 0 8px 24px rgba(20,27,31,.1); }
.mex52-queue-body > p { margin: 8px 16px 16px; color: #68737a; font-size: 13px; line-height: 1.6; }
.mex52-queue-body > strong { display: block; padding: 16px 16px 0; }
.mex52-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 15px 10px; }
.mex52-queue-head div { display: flex; flex-direction: column; }
.mex52-queue-head small { margin-top: 2px; color: #7b858c; }
.mex52-queue-head label { display: flex; align-items: center; gap: 6px; color: #4c565d; font-size: 12px; white-space: nowrap; }
.mex52-queue-head input { width: 17px; height: 17px; accent-color: #e7352b; }
.mex52-queue-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 15px 10px; padding: 9px 11px; border-radius: 5px; background: #fff3e7; color: #8c3b08; font-size: 12px; }
.mex52-queue-notice[hidden] { display: none; }
.mex52-queue-notice button { flex: 0 0 auto; border: 0; background: transparent; color: #b42318; cursor: pointer; font-weight: 700; }
.mex52-queue-notice-floating { position: fixed; z-index: 2147483000; right: 20px; bottom: 24px; width: min(420px, calc(100vw - 32px)); margin: 0; box-shadow: 0 12px 36px rgba(0,0,0,.28); }
.mex52-queue-controls { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; gap: 7px; padding: 0 15px 12px; }
.mex52-queue-controls button, .mex52-queue-controls select { height: 36px; border: 1px solid #d7dde1; border-radius: 5px; background: #f7f8f9; color: #30383d; cursor: pointer; }
.mex52-queue-controls button { font-size: 0; }
.mex52-queue-controls button::before { font-size: 23px; line-height: 1; }
.mex52-queue-controls button[data-step="-1"]::before { content: "\2039"; }
.mex52-queue-controls button[data-step="1"]::before { content: "\203A"; }
.mex52-queue-list { max-height: min(55vh, 520px); overflow-y: auto; border-top: 1px solid #e3e7ea; }
.mex52-queue-list a { position: relative; display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 10px; min-height: 66px; padding: 7px 12px; overflow: hidden; color: #30383d; text-decoration: none; border-bottom: 1px solid #edf0f2; }
.mex52-queue-list a:hover { background: #f5f7f8; }
.mex52-queue-list a.current { color: #b42318; background: #fff3f1; }
.mex52-queue-list img, .mex52-queue-placeholder { display: block; width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: #e7ebed; }
.mex52-queue-list a > span:last-child { min-width: 0; }
.mex52-queue-list small { display: block; margin-bottom: 3px; color: #8a949a; font-size: 11px; }
.mex52-queue-list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.mex52-watch-progress { position: absolute; left: 12px; bottom: 7px; width: 96px; height: 3px; background: linear-gradient(90deg,#ef2f27 var(--watched),rgba(255,255,255,.55) var(--watched)); pointer-events: none; }
.mex52-home-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 28px max(16px, calc((100% - 1504px)/2 + 16px)) 18px; background: #15191c; color: #fff; }
.mex52-home-heading p { margin: 0 0 5px; color: #ff9f0a; font-size: 12px; font-weight: 800; }
.mex52-home-heading h1 { margin: 0; font-size: 28px; line-height: 1.2; letter-spacing: 0; }
.mex52-home-heading a { color: #dce4e8; text-decoration: none; font-size: 14px; }
.mex52-home-hero { box-sizing: border-box; position: relative; width: calc(100% - 32px); max-width: 1504px; margin: 18px auto 0; padding: 18px 48px 30px; overflow: hidden; border-radius: 6px; background: #f7f8f9; box-shadow: 0 8px 24px rgba(17,24,28,.1); }
.mex52-hero-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 13px; color: #20252a; }
.mex52-hero-head div { display: flex; flex-direction: column; }
.mex52-hero-head small { color: #df342d; font-size: 11px; font-weight: 800; }
.mex52-hero-head strong { margin-top: 2px; font-size: 21px; }
.mex52-hero-head > span { color: #7d878d; font-size: 12px; }
.mex52-hero-viewport { overflow: hidden; padding: 4px 2px 10px; }
.mex52-hero-track { display: flex; gap: 14px; width: max-content; transition: transform .65s cubic-bezier(.22,.72,.23,1); will-change: transform; }
.mex52-hero-slide { position: relative; flex: 0 0 clamp(158px,15.5vw,220px); width: clamp(158px,15.5vw,220px); min-width: 0; color: #20252a; transition: transform .22s ease,filter .22s ease; }
.mex52-hero-slide-link { display: block; color: inherit; text-decoration: none; }
.mex52-hero-poster { position: relative; display: block; width: 100%; aspect-ratio: 4/5; overflow: hidden; border-radius: 6px; background: #dfe4e7; box-shadow: 0 4px 13px rgba(21,29,33,.14); }
.mex52-hero-poster > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .32s cubic-bezier(.22,.72,.23,1),filter .25s; }
.mex52-hero-slide:hover { transform: translateY(-4px); }
.mex52-hero-slide:hover .mex52-hero-poster > img { transform: scale(1.055); filter: saturate(1.04) contrast(1.02); }
.mex52-hero-meta { position: absolute; z-index: 2; top: 9px; left: 9px; right: 9px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mex52-hero-meta i { max-width: 68%; overflow: hidden; padding: 4px 7px; border-radius: 4px; background: rgba(13,17,19,.8); color: #fff; font-size: 11px; font-style: normal; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.mex52-hero-meta i:last-child { margin-left: auto; background: rgba(220,49,42,.92); }
.mex52-hero-poster > em { position: absolute; z-index: 2; left: 9px; bottom: 9px; max-width: calc(100% - 18px); overflow: hidden; padding: 4px 7px; border-radius: 4px; background: rgba(11,14,16,.82); color: #fff; font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.mex52-hero-slide-link > strong { display: block; height: 40px; margin-top: 8px; overflow: hidden; font-size: 14px; line-height: 20px; letter-spacing: 0; }
.mex52-hero-arrow { position: absolute; z-index: 4; top: 55%; width: 34px; height: 50px; padding: 0; transform: translateY(-50%); border: 0; border-radius: 5px; background: rgba(20,25,28,.74); color: #fff; cursor: pointer; font-size: 30px; line-height: 1; }
.mex52-hero-arrow:hover { background: rgba(20,25,28,.94); }
.mex52-hero-arrow.prev { left: 8px; }
.mex52-hero-arrow.next { right: 8px; }
.mex52-hero-dots { position: absolute; z-index: 4; left: 50%; bottom: 10px; display: flex; align-items: center; gap: 6px; transform: translateX(-50%); }
.mex52-hero-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #bac2c7; cursor: pointer; transition: width .25s,background .25s,border-radius .25s; }
.mex52-hero-dot.active { width: 25px; border-radius: 999px; background: #ffae12; }
.mex52-continue { padding: 20px max(16px, calc((100% - 1504px)/2 + 16px)) 4px; background: #fff; }
.mex52-continue-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.mex52-continue-head p { margin: 0 0 2px; color: #df342d; font-size: 11px; font-weight: 800; }
.mex52-continue-head h2 { margin: 0; color: #20252a; font-size: 21px; letter-spacing: 0; }
.mex52-continue-head span { color: #7d878d; font-size: 13px; }
.mex52-continue-actions { display: flex; align-items: center; gap: 10px; }
.mex52-continue-clear { min-height: 34px; padding: 6px 10px; border: 1px solid #d5dade; border-radius: 5px; background: transparent; color: #596168; cursor: pointer; font-size: 12px; }
.mex52-continue-clear:hover { border-color: #df342d; color: #df342d; }
.mex52-continue-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 260px); gap: 14px; overflow-x: auto; overscroll-behavior-inline: contain; padding-bottom: 10px; scrollbar-width: thin; }
.mex52-continue-item { position: relative; min-width: 0; }
.mex52-continue-list a { min-width: 0; color: #20252a; text-decoration: none; }
.mex52-continue-remove { position: absolute; z-index: 3; top: 7px; right: 7px; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(12,15,17,.78); color: #fff; cursor: pointer; font-size: 22px; line-height: 1; opacity: 0; transition: opacity .18s,background .18s,transform .18s; }
.mex52-continue-item:hover .mex52-continue-remove,.mex52-continue-remove:focus-visible { opacity: 1; }
.mex52-continue-remove:hover { background: #df342d; transform: scale(1.06); }
.mex52-continue-cover { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; border-radius: 6px; background: #e7ebed; }
.mex52-continue-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mex52-continue-cover i { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg,#e8322b var(--watched),rgba(255,255,255,.72) var(--watched)); }
.mex52-continue-list strong { display: block; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mex52-continue-list small { display: block; margin-top: 2px; color: #7d878d; }
.mex52-home-shelf { padding: 20px max(16px, calc((100% - 1504px)/2 + 16px)) 4px; background: #fff; }
.mex52-shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.mex52-shelf-head p { margin: 0 0 2px; color: #df342d; font-size: 11px; font-weight: 800; }
.mex52-shelf-head h2 { margin: 0; color: #20252a; font-size: 21px; letter-spacing: 0; }
.mex52-shelf-head > span { color: #7d878d; font-size: 13px; }
.mex52-shelf-list { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 14vw, 210px); gap: 14px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 1px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.mex52-shelf-card { position: relative; min-width: 0; color: #20252a; scroll-snap-align: start; }
.mex52-shelf-card-link { display: block; color: inherit; text-decoration: none; }
.mex52-shelf-poster { position: relative; display: block; aspect-ratio: 4/5; overflow: hidden; border-radius: 6px; background: #e4e8ea; box-shadow: 0 3px 12px rgba(21,29,33,.12); }
.mex52-shelf-poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease,filter .25s ease; }
.mex52-shelf-card:hover .mex52-shelf-poster img { transform: scale(1.045); filter: saturate(1.04); }
.mex52-shelf-poster i,.mex52-shelf-poster em { position: absolute; z-index: 2; top: 8px; padding: 4px 7px; border-radius: 4px; color: #fff; font-size: 11px; font-style: normal; line-height: 1.2; }
.mex52-shelf-poster i { left: 8px; background: rgba(13,17,19,.82); }
.mex52-shelf-poster em { right: 8px; max-width: 58%; overflow: hidden; background: rgba(220,49,42,.92); text-overflow: ellipsis; white-space: nowrap; }
.mex52-shelf-card-link > strong { display: block; margin-top: 8px; overflow: hidden; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.mex52-shelf-card-link > small { display: block; margin-top: 2px; overflow: hidden; color: #7d878d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mex52-recommend-menu { position: absolute; z-index: 30; right: 6px; bottom: 48px; }
.mex52-recommend-more { display: grid; place-items: center; width: 34px; height: 34px; padding: 0 0 8px; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; background: rgba(12,15,17,.84); color: #fff; cursor: pointer; font-size: 25px; line-height: 1; opacity: 0; transition: opacity .18s,background .18s; }
.mex52-hero-slide:hover .mex52-recommend-more,.mex52-shelf-card:hover .mex52-recommend-more,.mex52-recommend-more:focus-visible,.mex52-recommend-more[aria-expanded="true"] { opacity: 1; }
.mex52-recommend-more:hover { background: #e7352b; }
.mex52-recommend-more:focus-visible { outline: 2px solid #f3a712; outline-offset: 2px; }
.mex52-recommend-popover { box-sizing: border-box; position: absolute; right: 0; bottom: 40px; width: 190px; padding: 5px; border: 1px solid rgba(255,255,255,.13); border-radius: 6px; background: #202429; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.mex52-recommend-popover[hidden] { display: none; }
.mex52-recommend-popover button { display: block; width: 100%; min-height: 38px; padding: 8px 10px; border: 0; border-radius: 4px; background: transparent; color: #eef1f3; cursor: pointer; text-align: left; font-size: 12px; }
.mex52-recommend-popover button:hover,.mex52-recommend-popover button:focus-visible { background: rgba(255,255,255,.09); outline: 0; }
.mex52-recommend-toast { position: fixed; z-index: 2147483002; right: 20px; bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: min(420px,calc(100vw - 32px)); padding: 12px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: #202429; color: #f5f6f7; box-shadow: 0 12px 36px rgba(0,0,0,.32); font-size: 13px; line-height: 1.45; }
.mex52-recommend-toast button { flex: 0 0 auto; min-height: 34px; padding: 6px 10px; border: 1px solid #f3a712; border-radius: 4px; background: transparent; color: #f3a712; cursor: pointer; font-weight: 700; }
.mex52-cinema-home [data-vod-card] { border-radius: 6px !important; }
.mex52-poster-meta { position: absolute; z-index: 12; left: 7px; right: 7px; top: 7px; display: flex; align-items: center; justify-content: space-between; gap: 6px; pointer-events: none; }
.mex52-poster-meta span { max-width: 70%; overflow: hidden; padding: 3px 6px; border-radius: 3px; background: rgba(14,18,20,.82); color: #fff; font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.28); }
.mex52-poster-meta span:last-child { margin-left: auto; background: rgba(220,49,42,.9); }
.mex52-cinema-home main .grid.grid-cols-2.md\:grid-cols-4.lg\:grid-cols-7 { grid-template-columns: repeat(6,minmax(0,1fr)) !important; gap: 22px 16px !important; }
@media (max-width: 720px) {
  .mex52-recommend-menu { right: 5px; bottom: 43px; }
  .mex52-recommend-more { width: 40px; height: 40px; opacity: 1; }
  .mex52-recommend-popover.mex52-recommend-portaled { position: fixed; z-index: 2147483003; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .mex52-recommend-toast { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .mex52-queue-notice-floating { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .mex52-branded-header { background: rgba(228,232,230,.99) !important; }
  .mex52-youtube-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
  .mex52-youtube-layout > :first-child, .mex52-youtube-layout > .mex52-movie-queue, .mex52-youtube-layout > :not(.mex52-movie-queue):not(:first-child) { grid-column: 1; grid-row: auto; }
  .mex52-movie-queue { position: static; width: 100%; }
  .mex52-queue-body { max-height: 64vh; }
  .mex52-queue-list { max-height: 42vh; }
  .mex52-queue-head { padding: 12px; }
  .mex52-queue-controls { padding: 0 12px 10px; }
  .mex52-queue-list a { grid-template-columns: 112px minmax(0,1fr); min-height: 76px; padding: 8px 10px; }
  .mex52-queue-list img, .mex52-queue-placeholder { width: 112px; }
  .mex52-watch-progress { left: 10px; bottom: 8px; width: 112px; }
  .mex52-home-heading { align-items: flex-start; padding: 20px 16px 14px; }
  .mex52-home-heading h1 { font-size: 21px; }
  .mex52-home-heading a { display: none; }
  .mex52-home-hero { width: calc(100% - 24px); margin-top: 12px; padding: 14px 27px 27px; border-radius: 5px; }
  .mex52-hero-head { margin-bottom: 10px; }
  .mex52-hero-head strong { font-size: 18px; }
  .mex52-hero-head > span { display: none; }
  .mex52-hero-track { gap: 10px; }
  .mex52-hero-slide { flex-basis: min(43vw,168px); width: min(43vw,168px); }
  .mex52-hero-slide:hover { transform: none; }
  .mex52-hero-slide:hover .mex52-hero-poster > img { transform: none; filter: none; }
  .mex52-hero-slide-link > strong { height: 36px; font-size: 13px; line-height: 18px; }
  .mex52-hero-arrow { width: 28px; height: 40px; font-size: 27px; }
  .mex52-hero-arrow.prev { left: 4px; }
  .mex52-hero-arrow.next { right: 4px; }
  .mex52-hero-dots { bottom: 7px; }
  .mex52-continue { padding: 16px 16px 0; }
  .mex52-continue-head h2 { font-size: 19px; }
  .mex52-continue-head { align-items: flex-start; }
  .mex52-continue-actions { align-items: flex-end; flex-direction: column; gap: 4px; }
  .mex52-continue-clear { min-height: 40px; }
  .mex52-continue-list { grid-auto-columns: 74vw; gap: 10px; }
  .mex52-continue-remove { width: 38px; height: 38px; opacity: 1; }
  .mex52-home-shelf { padding: 16px 16px 0; }
  .mex52-shelf-head h2 { font-size: 19px; }
  .mex52-shelf-list { grid-auto-columns: 42vw; gap: 10px; }
  .mex52-shelf-card:hover .mex52-shelf-poster img { transform: none; filter: none; }
  .mex52-cinema-home main .grid.grid-cols-2.md\:grid-cols-4.lg\:grid-cols-7 { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 18px 10px !important; }
}

.mex52-continue-undo{position:fixed;z-index:2147483000;left:50%;bottom:max(22px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:18px;box-sizing:border-box;max-width:min(560px,calc(100vw - 28px));min-height:50px;padding:10px 12px 10px 16px;border:1px solid rgba(255,255,255,.16);border-radius:6px;background:#202428;color:#f5f6f7;box-shadow:0 14px 42px rgba(0,0,0,.42);transform:translateX(-50%);font-size:13px;letter-spacing:0}.mex52-continue-undo span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mex52-continue-undo button{flex:0 0 auto;min-height:34px;padding:0 12px;border:1px solid #f3a712;border-radius:4px;background:#f3a712;color:#17191b;font-weight:800;cursor:pointer}.mex52-continue-undo button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(max-width:640px){.mex52-continue-undo{bottom:max(76px,calc(env(safe-area-inset-bottom) + 66px));width:calc(100vw - 24px);gap:10px;align-items:flex-start}.mex52-continue-undo span{white-space:normal;line-height:1.4}.mex52-continue-undo button{min-height:42px}}
@media(prefers-reduced-motion:reduce){.mex52-continue-undo{scroll-behavior:auto}}
@media (min-width: 721px) and (max-width: 1100px) {
  .mex52-youtube-layout { grid-template-columns: minmax(0,1fr); }
  .mex52-youtube-layout > :first-child, .mex52-youtube-layout > .mex52-movie-queue, .mex52-youtube-layout > :not(.mex52-movie-queue):not(:first-child) { grid-column: 1; grid-row: auto; }
  .mex52-movie-queue { position: static; }
  .mex52-cinema-home main .grid.grid-cols-2.md\:grid-cols-4.lg\:grid-cols-7 { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}
