:root {
  --black: #080808;
  --panel: #181818;
  --paper: #f5f5f5;
  --muted: #b3b3b3;
  --red: #e50914;
  --green: #46d369;
  --line: rgba(255,255,255,.16);
  --body: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body { margin: 0; min-width: 320px; color: var(--paper); background: var(--black); font-family: var(--body); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 42px;
  height: 68px; padding: 0 4vw;
  background: linear-gradient(180deg, rgba(0,0,0,.82), transparent);
  transition: background .25s ease;
}
.site-header.scrolled { background: rgba(8,8,8,.97); }
.brand { display: inline-flex; align-items: baseline; width: max-content; color: var(--red); font-size: 27px; font-weight: 1000; letter-spacing: -.1em; transform: scaleX(1.04); transform-origin: left; }
.brand b { margin-left: 4px; font-size: 21px; font-weight: 900; }
.nav-links { display: flex; gap: 24px; color: #dedede; font-size: 13px; }
.nav-links a:first-child { color: white; font-weight: 700; }
.nav-links a:hover { color: var(--muted); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.account-area { justify-self: end; display: flex; align-items: center; gap: 10px; }
.language-toggle { min-width: 40px; padding: 7px 9px; color: white; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.6); border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: 800; }
.language-toggle:hover { background: rgba(255,255,255,.16); }
.button { border: 0; border-radius: 4px; padding: 9px 18px; cursor: pointer; font-weight: 700; transition: background .18s ease, color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-ghost { color: white; background: transparent; }
.button-ghost:hover { color: var(--muted); }
.button-light { color: white; background: var(--red); }
.button-light:hover { background: #f6121d; }
.button-play { display: inline-flex; align-items: center; gap: 12px; padding: 11px 27px; color: white; background: var(--red); font-size: 16px; }
.button-play:hover { background: #f6121d; }
.button-info { display: inline-flex; align-items: center; gap: 10px; padding: 11px 23px; color: white; background: rgba(109,109,110,.7); font-size: 16px; }
.button-info:hover { background: rgba(109,109,110,.48); }
.button-full { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 13px 15px; color: white; background: var(--red); }
.user-pill { display: flex; align-items: center; gap: 9px; color: white; font-size: 12px; }
.user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; color: white; background: #1d72b8; font-weight: 900; }
.admin-badge { color: #ddd; font-size: 9px; letter-spacing: .08em; }

.hero { position: relative; min-height: min(56.25vw, 850px); height: 86vh; display: flex; align-items: center; padding: 100px 4vw 155px; overflow: hidden; touch-action: pan-y; }
.hero-backdrop { position: absolute; inset: 0; background:
  radial-gradient(circle at 72% 37%, rgba(229,9,20,.32), transparent 20%),
  linear-gradient(120deg, #2e080a 0%, #101013 48%, #372021 100%); }
.hero-backdrop::before { content: ""; position: absolute; inset: 0; opacity: .5; background:
  repeating-linear-gradient(108deg, transparent 0 44px, rgba(255,255,255,.028) 45px 47px),
  radial-gradient(ellipse at 78% 38%, transparent 0 14%, rgba(255,255,255,.08) 14.2% 14.7%, transparent 15%); }
.hero-backdrop video { width: 100%; height: 100%; object-fit: cover; opacity: .78; animation: heroFade .45s ease both; }
@keyframes heroFade { from { opacity: 0; transform: scale(1.025); } to { opacity: .78; transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.7) 29%, transparent 66%),
  linear-gradient(0deg, var(--black) 0%, transparent 30%),
  linear-gradient(180deg, rgba(0,0,0,.22), transparent 30%); }
.hero-copy { position: relative; z-index: 2; width: min(600px, 47vw); padding-top: 3vh; }
.featured-label { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: #d5d5d5; font-size: 13px; font-weight: 800; letter-spacing: .22em; }
.featured-label i, .hero-actions i { font-style: normal; }
.featured-label span { color: var(--red); font-size: 18px; font-weight: 1000; letter-spacing: -.08em; }
.hero h1 { margin: 0; max-width: 620px; font-size: clamp(48px, 6.2vw, 92px); line-height: .9; letter-spacing: -.075em; text-shadow: 0 3px 18px rgba(0,0,0,.55); }
.featured-meta { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; color: #ddd; font-size: 13px; }
.featured-meta b { color: var(--green); }
.featured-meta span:nth-of-type(2) { padding: 1px 5px; border: 1px solid rgba(255,255,255,.55); font-size: 10px; }
.hero-text { max-width: 540px; margin: 17px 0 24px; color: #f0f0f0; font-size: clamp(14px, 1.25vw, 18px); line-height: 1.55; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.hero-actions { display: flex; gap: 11px; }
.hero-nav { position: absolute; z-index: 7; top: 50%; display: grid; place-items: center; width: 46px; height: 82px; margin-top: -41px; color: white; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.18); cursor: pointer; font-size: 44px; opacity: 0; transition: opacity .18s ease, background .18s ease; }
.hero:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-nav:hover { background: rgba(0,0,0,.72); }
.hero-nav[hidden] { display: none; }
.hero-prev { left: 0; border-radius: 0 4px 4px 0; }
.hero-next { right: 0; border-radius: 4px 0 0 4px; }
.hero-pagination { position: absolute; z-index: 8; right: 4vw; bottom: 145px; display: flex; gap: 7px; }
.hero-dot { width: 24px; height: 3px; padding: 0; border: 0; background: rgba(255,255,255,.42); cursor: pointer; }
.hero-dot.active { background: white; }

.catalog { position: relative; z-index: 5; margin-top: -120px; padding: 0 0 90px 4vw; }
.section-heading { display: flex; justify-content: space-between; align-items: center; padding-right: 4vw; margin-bottom: 13px; }
.section-heading h2 { margin: 0; font-size: clamp(19px, 1.7vw, 25px); letter-spacing: -.02em; }
.video-count { color: #777; font-size: 12px; }
.row-shell { position: relative; }
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 10px; padding: 18px 4vw 45px 0; overflow: visible; }
.video-card { position: relative; min-width: 0; cursor: pointer; transition: transform .25s ease, z-index 0s .1s; transform-origin: center; }
.video-card:hover, .video-card:focus-visible { z-index: 8; transform: scale(1.06); transition-delay: .12s; outline: none; }
.video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background:
  radial-gradient(circle at 68% 30%, rgba(229,9,20,.65), transparent 22%),
  linear-gradient(135deg, #333 0%, #121212 55%, #461316 100%); box-shadow: 0 4px 13px rgba(0,0,0,.35); }
.video-thumb::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.58), transparent 50%); }
.thumb-video { width: 100%; height: 100%; object-fit: cover; }
.video-index { position: absolute; top: 11px; left: 11px; z-index: 2; padding: 2px 5px; color: white; background: rgba(0,0,0,.62); border-radius: 2px; font-size: 10px; font-weight: 800; }
.card-play { position: absolute; z-index: 2; left: 13px; bottom: 12px; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--red); border-radius: 50%; color: white; background: var(--red); font-size: 13px; padding-left: 2px; opacity: 0; transition: opacity .15s ease; }
.video-card:hover .card-play, .video-card:focus-visible .card-play { opacity: 1; transition-delay: .2s; }
.card-body { padding: 10px 3px 0; }
.card-body h3 { margin: 0 0 5px; color: white; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body p { margin: 0; color: #888; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { position: absolute; top: 7px; right: 7px; z-index: 4; }
.delete-button { width: 28px; height: 28px; border: 0; border-radius: 50%; color: white; background: rgba(0,0,0,.75); cursor: pointer; opacity: 0; }
.video-card:hover .delete-button { opacity: 1; }
.empty-state { grid-column: 1 / -1; min-height: 210px; display: grid; place-items: center; margin-right: 4vw; text-align: center; border-radius: 4px; background: linear-gradient(120deg, #181818, #242424); }
.empty-state strong { display: block; margin-bottom: 8px; font-size: 23px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); }
.empty-symbol { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border: 2px solid #aaa; border-radius: 50%; color: white; font-size: 20px; }

.about { display: grid; grid-template-columns: .55fr 1.15fr 1fr; gap: 50px; padding: 80px 8vw; color: white; background: #111; border-top: 1px solid #222; }
.about-number { margin: 5px 0; color: var(--red); font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.about h2 { margin: 0; font-size: clamp(38px, 4.6vw, 68px); line-height: .98; letter-spacing: -.065em; }
.about > p:last-child { max-width: 430px; margin: 5px 0; color: var(--muted); line-height: 1.8; }
footer { display: flex; justify-content: space-between; align-items: center; padding: 38px 8vw; color: #737373; font-size: 11px; background: var(--black); }
.footer-brand { font-size: 20px; }

.dialog { width: min(450px, calc(100% - 30px)); color: white; background: rgba(0,0,0,.94); border: 0; border-radius: 5px; padding: 48px 54px; box-shadow: 0 30px 100px rgba(0,0,0,.8); }
.dialog::backdrop { background: rgba(0,0,0,.68); }
.dialog-close { position: absolute; top: 15px; right: 15px; width: 34px; height: 34px; border: 0; color: #bbb; background: transparent; cursor: pointer; font-size: 25px; }
.dialog-kicker { margin: 0 0 7px; color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.dialog h2 { margin: 0; font-size: 31px; letter-spacing: -.04em; }
.dialog-subtitle { color: #8c8c8c; font-size: 13px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 18px; border-bottom: 1px solid #333; }
.auth-tab { padding: 10px; border: 0; color: #777; background: transparent; cursor: pointer; font-weight: 700; }
.auth-tab.active { color: white; border-bottom: 2px solid var(--red); }
form label { display: grid; gap: 7px; margin-bottom: 15px; color: #aaa; font-size: 12px; font-weight: 600; }
input, textarea { width: 100%; padding: 13px 14px; color: white; background: #333; border: 1px solid #333; border-radius: 4px; outline: none; resize: vertical; }
input:focus, textarea:focus { border-color: #888; background: #3b3b3b; }
.form-error { min-height: 17px; margin: -4px 0 8px; color: #e87c03; font-size: 11px; }
.file-drop { place-items: center; padding: 24px; text-align: center; border: 1px dashed #555; border-radius: 4px; background: #191919; cursor: pointer; }
.file-drop input { position: absolute; opacity: 0; pointer-events: none; }
.file-drop strong { color: white; font-size: 14px; }
.file-drop small { color: #777; font-weight: 400; }
.file-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 50%; color: white; background: var(--red); font-size: 20px; }
.upload-progress { height: 3px; margin: 4px 0 12px; background: #333; overflow: hidden; }
.upload-progress span { display: block; width: 40%; height: 100%; background: var(--red); animation: progress 1.2s infinite ease-in-out; }
@keyframes progress { from { transform: translateX(-120%); } to { transform: translateX(350%); } }
.player-dialog { width: min(1100px, calc(100% - 30px)); padding: 0; overflow: hidden; background: #080808; }
.player-stage { position: relative; background: black; }
.player-dialog video { display: block; width: 100%; max-height: 72vh; background: black; cursor: pointer; }
.player-close { z-index: 5; color: white; background: rgba(0,0,0,.65); border-radius: 50%; }
.custom-controls { position: absolute; z-index: 4; right: 0; bottom: 0; left: 0; padding: 38px 22px 14px; background: linear-gradient(transparent, rgba(0,0,0,.9)); }
.control-row { display: flex; align-items: center; gap: 12px; margin-top: 7px; }
.control-button { display: grid; place-items: center; min-width: 37px; height: 37px; padding: 0 8px; color: white; background: transparent; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; cursor: pointer; font-size: 11px; font-weight: 900; }
.control-button:hover { color: white; background: var(--red); border-color: var(--red); }
.control-play { color: white; background: var(--red); border-color: var(--red); font-size: 15px; padding-left: 10px; }
.control-fullscreen { font-size: 21px; }
.control-spacer { flex: 1; }
.player-time { color: #ddd; font-size: 12px; font-variant-numeric: tabular-nums; }
.player-progress { --progress: 0%; width: 100%; height: 5px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 999px; outline: none; cursor: pointer; background: linear-gradient(90deg, var(--red) 0 var(--progress), rgba(255,255,255,.38) var(--progress) 100%); }
.player-progress::-webkit-slider-runnable-track { height: 5px; background: transparent; border-radius: 999px; }
.player-progress::-webkit-slider-thumb { width: 15px; height: 15px; margin-top: -5px; appearance: none; -webkit-appearance: none; border: 2px solid white; border-radius: 50%; background: var(--red); box-shadow: 0 1px 6px rgba(0,0,0,.55); }
.player-progress::-moz-range-track { height: 5px; background: transparent; border-radius: 999px; }
.player-progress::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid white; border-radius: 50%; background: var(--red); }
.player-stage:fullscreen { display: grid; place-items: center; background: black; }
.player-stage:fullscreen video { max-height: 100vh; }
.player-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 25px 30px 30px; }
.player-copy h2 { font-size: 28px; }
.player-copy > p { color: var(--muted); line-height: 1.65; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 25px); padding: 11px 17px; color: white; background: #333; border-left: 3px solid var(--red); border-radius: 3px; font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: .23s ease; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: auto 1fr; padding: 0 22px; }
  .nav-links { display: none; }
  .hero { height: 75vh; min-height: 590px; padding: 100px 6vw 140px; }
  .hero-copy { width: min(620px, 80vw); }
  .hero-shade { background: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.3)), linear-gradient(0deg, var(--black), transparent 42%); }
  .catalog { margin-top: -85px; padding-left: 6vw; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
  .about { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 600px) {
  .site-header { height: 60px; }
  .brand { font-size: 23px; }
  .account-area .user-pill > span:last-child { display: none; }
  .header-actions { gap: 5px; }
  .language-toggle { min-width: 35px; padding: 7px 6px; }
  .button { padding: 8px 12px; }
  .hero { height: 72vh; min-height: 540px; padding: 92px 22px 115px; align-items: end; }
  .hero-copy { width: 100%; }
  .hero h1 { font-size: 48px; }
  .featured-meta { gap: 9px; font-size: 11px; }
  .hero-text { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .hero-nav { top: 45%; width: 38px; height: 66px; margin-top: -33px; opacity: .8; font-size: 36px; }
  .hero-pagination { right: 22px; bottom: 82px; }
  .hero-dot { width: 18px; }
  .catalog { margin-top: -45px; padding-left: 22px; }
  .section-heading { padding-right: 22px; }
  .video-grid { grid-template-columns: 1fr; gap: 22px; padding-right: 22px; }
  .about { padding: 60px 22px; }
  footer { padding: 32px 22px; }
  .dialog { padding: 42px 24px 30px; }
  .player-dialog { padding: 0; }
  .player-copy { grid-template-columns: 1fr; gap: 6px; padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
