.downloads-page { min-height: 100vh; background: #f7f8fa; color: #202228; }
.downloads-page [hidden] { display: none !important; }
.downloads-page .site-header { grid-template-columns: 330px minmax(0,1fr) 132px; }
.downloads-page .top-nav { gap: 24px; }
.downloads-page .downloads-home { display: inline-flex; justify-content: flex-end; align-items: center; gap: 5px; color: #737783; font-size: 12px; white-space: nowrap; }
.downloads-main { display: block; width: min(1600px, calc(100% - 112px)); margin: 52px auto 80px; padding: 0; min-height: calc(100vh - 270px); }
.downloads-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.downloads-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; }
.downloads-heading h1 { margin: 0; font-size: 30px; line-height: 1.3; }
.downloads-count { color: #868b97; font-size: 13px; }
.downloads-search input { width: 260px; height: 42px; padding: 0 14px; border: 1px solid #e2e5eb; border-radius: 6px; background: #fff; color: #202228; font: inherit; font-size: 13px; }
.downloads-search input:focus { outline: 2px solid #c5bcfc; outline-offset: 2px; }
.download-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px 24px; }
.download-card { min-width: 0; border: 1px solid #e6e8ed; border-radius: 8px; background: #fff; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.download-card:hover { border-color: #c8c0ef; box-shadow: 0 8px 24px #1c22300a; }
.download-card > button { display: block; width: 100%; padding: 0; border: 0; text-align: left; background: transparent; cursor: pointer; color: inherit; }
.download-card > button:focus-visible { outline: 3px solid #6951e8; outline-offset: -3px; }
.download-cover { display: block; position: relative; aspect-ratio: 16/10; overflow: hidden; background: #e9ebef; }
.download-cover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.download-play { position: absolute; bottom: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #ffffff4a; border-radius: 50%; background: #16191ccc; }
.download-play img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.download-title { display: -webkit-box; min-height: 64px; padding: 17px 18px; font-size: 15px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.download-cover.is-missing { background: #e9ebef url('./assets/icons/clapperboard.svg') center/36px no-repeat; }
.download-skeleton { overflow: hidden; border: 1px solid #e9ebef; border-radius: 8px; background: #fff; }
.download-skeleton span { display: block; aspect-ratio: 16/10; background: #eceef2; }
.download-skeleton i { display: block; width: 64%; height: 12px; margin: 24px 18px; border-radius: 3px; background: #eceef2; }
.downloads-empty { display: grid; justify-items: center; gap: 16px; padding: 90px 16px; color: #9298a4; }
.downloads-empty img { opacity: .5; }
.downloads-empty h2 { margin: 0; font-size: 16px; font-weight: 500; }
.downloads-empty button { padding: 9px 18px; border: 1px solid #dddfe6; border-radius: 6px; background: #fff; color: #353944; cursor: pointer; }
.library-status { text-align: center; color: #ab3f43; font-size: 13px; }
.downloads-footer { padding: 24px; text-align: center; color: #9297a1; font-size: 12px; }
.downloads-page .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#resource-player { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: #0d0f13; color: #fff; overflow: hidden; }
#resource-player::backdrop { background: #0d0f13; }
.resource-player-shell { position: relative; display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: 100%; height: 100%; background: #0d0f13; }
.preview-bar { z-index: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 24px; min-height: 72px; padding: max(14px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 14px max(24px,env(safe-area-inset-left)); border-bottom: 1px solid #ffffff12; background: #15171c; }
.preview-bar h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 550; }
.preview-actions { display: flex; align-items: center; gap: 10px; }
.preview-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 6px; cursor: pointer; font: inherit; }
.copy-canvas { padding: 0 16px; border: 1px solid #ffffff; color: #202228; background: #fff; font-size: 14px !important; font-weight: 650 !important; }
.copy-canvas:disabled { cursor: wait; opacity: .55; }
.preview-icon { width: 40px; padding: 0; border: 1px solid #ffffff24; background: #ffffff08; }
.preview-icon img { filter: brightness(0) invert(1); }
.preview-icon:hover { background: #ffffff18; }
.preview-screen { position: relative; min-height: 0; }
#preview-video { display: block; width: 100%; height: 100%; object-fit: contain; }
#preview-video::-webkit-media-controls-fullscreen-button { display: none; }
.preview-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; pointer-events: none; }
.preview-state p { margin: 0; padding: 10px 16px; border-radius: 6px; background: #15171cda; color: #d4d8e0; font-size: 13px; }
.preview-state button { pointer-events: auto; padding: 8px 18px; border: 1px solid #ffffff36; border-radius: 6px; background: #252933; color: #fff; cursor: pointer; }
.canvas-feedback { position: absolute; top: 82px; right: 28px; margin: 0; padding: 0; color: #202228; background: #fff; border-radius: 6px; font-size: 13px; }
.canvas-feedback:not(:empty) { padding: 10px 14px; }
.canvas-copy-fallback { display: flex; gap: 10px; padding: 12px 24px; background: #15171c; }
.canvas-copy-fallback input { width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid #ffffff30; border-radius: 4px; color: #fff; background: #242831; }
.canvas-copy-fallback button { flex: 0 0 auto; border: 0; border-radius: 4px; padding: 0 14px; cursor: pointer; }
body.preview-open { overflow: hidden; }
@media(min-width:1800px) { .download-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media(max-width:1200px) { .download-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .downloads-page .site-header { grid-template-columns: 280px minmax(0,1fr) 110px; padding: 0 24px; } .downloads-page .brand-name { font-size: 18px; } .downloads-page .top-nav { gap: 12px; } }
@media(max-width:850px) { .downloads-main { width: calc(100% - 48px); margin-top: 32px; } .download-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; } .downloads-page .site-header { display: flex; flex-wrap: wrap; gap: 16px; padding: 14px 24px; } .downloads-page .top-nav { flex: 1; } .downloads-page .downloads-home { display: none; } }
@media(max-width:560px) { .downloads-page .site-header { justify-content: center; gap: 14px; padding: 12px 16px; } .downloads-page .brand { width: 100%; justify-content: center; } .downloads-page .brand-logo { width: 34px; height: 34px; flex-basis: 34px; } .downloads-page .top-nav { font-size: 13px; gap: 14px; } .downloads-main { width: calc(100% - 32px); margin: 28px auto 50px; } .downloads-heading { align-items: stretch; flex-direction: column; gap: 18px; margin-bottom: 22px; } .downloads-heading h1 { font-size: 26px; } .downloads-search input { width: 100%; } .download-grid { grid-template-columns: 1fr; gap: 20px; } .preview-bar { min-height: 64px; padding-right: 12px; padding-left: 16px; gap: 10px; } .preview-bar h2 { font-size: 14px; } .preview-actions { gap: 6px; } .preview-actions button { height: 36px; } .copy-canvas { padding: 0 10px; gap: 5px !important; font-size: 12px !important; } .preview-icon { width: 34px; } #preview-fullscreen { display: none; } .canvas-feedback { top: 76px; right: 12px; } }
@media(prefers-reduced-motion:reduce) { .download-card { transition: none; } }
