@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/open-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/open-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #000; --bg-card: #1e1e1e; --bg-header: #111;
  --accent: #ff5000; --accent-light: #ff6600;
  --text: #fff; --text-sec: #b3b3b3; --text-cat: #44eaff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; }
img { max-width: 100%; display: block; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-header);
  border-bottom: 2px solid var(--accent);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 60px; margin: 5px 0; }
.nav {
  display: flex; gap: 20px; list-style: none; align-items: center;
}
.nav a {
  font-size: 13px; font-weight: 600;
  transition: color .2s; padding: 4px 0;
}
.nav a:hover, .nav a.active { color: var(--accent); }
.nav-icon { display: flex; align-items: center; }
.nav-icon img { height: 20px; width: auto; opacity: .85; transition: opacity .2s; }
.nav-icon:hover img { opacity: 1; }
.hamburger {
  display: none; background: none; border: none;
  color: var(--text); font-size: 28px; cursor: pointer; padding: 4px;
}

/* Hero */
.hero {
  position: relative; width: 100%; height: 70vh; min-height: 400px;
  overflow: hidden; cursor: pointer;
}
.hero-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: none;
}
.hero-content {
  position: absolute; bottom: 120px; left: 0; right: 0;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  z-index: 2;
}
.hero-title {
  font-size: 36px; font-weight: 700; line-height: 1.2;
  margin-bottom: 12px; max-width: 700px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.hero-abstract {
  font-size: 15px; color: var(--text-sec); line-height: 1.5;
  max-width: 600px; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta {
  font-size: 13px; color: var(--text-sec); margin-bottom: 16px;
}
.hero-actions { display: flex; gap: 12px; align-items: center; }
.hero-play {
  background: var(--accent); color: #fff; border: none;
  padding: 10px 28px; border-radius: 4px; font-size: 15px;
  font-weight: 700; cursor: pointer; transition: background .2s;
}
.hero-play:hover { background: var(--accent-light); }

/* Hero Live */
.hero-live {
  position: relative; width: 100%; height: 70vh; min-height: 400px;
  background: #000; overflow: hidden;
}
.hero-live iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;
}
.hero-live .live-badge {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  background: #e00; color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 4px; letter-spacing: .5px;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
@media (max-width: 768px) {
  .hero-live { height: 55vh; min-height: 350px; }
}
@media (max-width: 576px) {
  .hero-live { height: 50vh; min-height: 300px; }
}

/* Main */
.main { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.hero + .main { margin-top: -80px; position: relative; z-index: 3; }

/* Slider */
.slider-section { margin-bottom: 48px; }
.section-title {
  font-size: 22px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::before {
  content: ''; width: 4px; height: 24px;
  background: var(--accent); border-radius: 2px; flex-shrink: 0;
}
.section-title a { color: var(--text); transition: color .2s; }
.section-title a:hover { color: var(--accent); }
.slider-wrap { position: relative; }
.slider-track {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-behavior: smooth; scrollbar-width: none; padding: 8px 0;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-60%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.7); color: #fff; font-size: 20px;
  cursor: pointer; z-index: 2; transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: var(--accent); }
.slider-btn--prev { left: -10px; }
.slider-btn--next { right: -10px; }

/* Video Card */
.video-card {
  flex: 0 0 calc(25% - 12px); min-width: 220px;
  cursor: pointer; transition: transform .3s, box-shadow .3s;
  border-radius: 8px; overflow: hidden; background: var(--bg-card);
}
.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(255,80,0,.3);
}
.card-thumb {
  position: relative; width: 100%; padding-top: 56.25%;
  overflow: hidden; background: #222;
}
.card-thumb img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .3s;
}
.video-card:hover .card-thumb img { transform: scale(1.05); }
.card-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 48px; height: 48px; background: rgba(255,80,0,.85);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; opacity: 0; transition: opacity .3s;
}
.video-card:hover .card-play { opacity: 1; }
.card-play::after {
  content: ''; border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent; margin-left: 3px;
}
.card-body { padding: 10px 12px; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin: 0;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-meta { margin-top: 6px; font-size: 12px; color: var(--text-sec); }

/* Category Covers (slider orizzontale) */
.covers-section { margin-bottom: 48px; }
.covers-track {
  display: flex; gap: 14px; overflow-x: auto;
  scroll-behavior: smooth; scrollbar-width: none; padding: 8px 0;
}
.covers-track::-webkit-scrollbar { display: none; }
.cover-card {
  flex: 0 0 calc(100%/6 - 12px); min-width: 160px;
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 16/9; cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}
.cover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(255,80,0,.3);
}
.cover-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.cover-card:hover img { transform: scale(1.05); }
.cover-card .cover-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 70%, transparent 100%);
}
.cover-card .cover-name {
  font-size: 13px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
@media (max-width: 768px) {
  .cover-card { flex: 0 0 calc(33% - 10px); }
}
@media (max-width: 576px) {
  .cover-card { flex: 0 0 45%; }
}

/* Grid */
.page-title {
  font-size: 32px; font-weight: 700; margin-bottom: 8px;
  display: flex; align-items: center; gap: 16px;
}
.page-title::before {
  content: ''; width: 5px; height: 32px;
  background: var(--accent); border-radius: 2px; flex-shrink: 0;
}
.page-desc {
  color: var(--text-sec); font-size: 15px;
  margin-bottom: 30px; max-width: 700px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.video-grid .video-card { flex: none; min-width: 0; }

/* Popup */
.popup-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.9); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.popup-overlay.active { opacity: 1; visibility: visible; }
.popup-container {
  position: relative;
  width: min(98vw, calc(90vh * 16 / 9));
  background: #000; border: 2px solid rgba(255,102,0,.5);
  border-radius: 8px;
  transform: scale(.85); transition: transform .3s ease;
}
.popup-overlay.active .popup-container { transform: scale(1); }
.popup-header {
  position: absolute; top: 0; left: 0; right: 0; height: 56px;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), transparent);
  z-index: 3; display: flex; align-items: center; padding: 0 16px;
  pointer-events: none; border-radius: 8px 8px 0 0;
}
.popup-title {
  color: #fff; font-size: 15px; font-weight: 600; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-right: 12px;
}
.popup-close, .popup-info-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.15); color: #fff; font-size: 20px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .2s; flex-shrink: 0;
  pointer-events: auto;
}
.popup-close:hover, .popup-info-btn:hover { background: var(--accent); }
.popup-info-btn { margin-right: 6px; font-size: 16px; font-weight: 700; font-style: italic; font-family: Georgia, serif; }
.popup-info-btn.active { background: var(--accent); }
.popup-player {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 8px; overflow: hidden; background: #000;
}
.popup-player video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; background: #000;
}

/* Sidebar info */
.popup-sidebar {
  position: absolute; top: 0; right: 0; width: 320px; height: 100%;
  background: rgba(17,17,17,.95); backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255,102,0,.3);
  border-radius: 0 8px 8px 0; z-index: 2;
  transform: translateX(100%); transition: transform .3s ease;
  overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.popup-sidebar.open { transform: translateX(0); }
.popup-sidebar-header {
  padding: 16px; border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
}
.popup-sidebar-title {
  font-size: 14px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .5px;
}
.popup-sidebar-close {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.1); color: #fff; font-size: 16px;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .2s;
}
.popup-sidebar-close:hover { background: var(--accent); }
.sidebar-section { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sidebar-section-title {
  font-size: 11px; font-weight: 700; color: var(--text-sec);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px;
}
.sidebar-abstract {
  font-size: 14px; line-height: 1.7; color: var(--text-sec);
  white-space: pre-wrap;
}
.sidebar-timeline { display: flex; flex-direction: column; gap: 2px; }
.sidebar-timeline a {
  color: var(--text); font-size: 13px; padding: 8px 10px;
  border-radius: 6px; transition: background .2s, color .2s;
  cursor: pointer; text-decoration: none; display: flex; align-items: center;
}
.sidebar-timeline a:hover { background: rgba(255,80,0,.15); color: var(--accent); }
.sidebar-timeline .tl-time {
  color: var(--accent); font-weight: 600; margin-right: 12px;
  font-variant-numeric: tabular-nums; min-width: 40px;
}
@media (max-width: 768px) {
  .popup-sidebar { width: 260px; }
}
@media (max-width: 576px) {
  .popup-container { width: 100%; border-radius: 0; border-width: 1px; }
  .popup-title { font-size: 13px; }
  .popup-header { height: 44px; padding: 0 10px; border-radius: 0; }
  .popup-player { border-radius: 0; }
  .popup-sidebar {
    width: 100%; height: 50%; top: auto; bottom: 0;
    border-radius: 12px 12px 0 0; border-left: none;
    border-top: 1px solid rgba(255,102,0,.3);
    transform: translateY(100%);
  }
  .popup-sidebar.open { transform: translateY(0); }
}

/* Footer */
.site-footer {
  background: var(--bg-header);
  border-top: 2px solid var(--accent);
  padding: 30px 20px; margin-top: 60px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; text-align: center;
}
.footer-brand {
  font-size: 18px; font-weight: 700;
  color: var(--accent); margin-bottom: 10px;
}
.footer-links {
  display: flex; gap: 20px; justify-content: center;
  margin: 15px 0; list-style: none; flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px; color: var(--text-sec); transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 20px; font-size: 12px; color: var(--text-sec); line-height: 1.8;
}
.footer-legal a { color: var(--text-sec); text-decoration: underline; }
.footer-legal a:hover { color: var(--accent); }

/* Static pages */
.static-content { max-width: 800px; margin: 0 auto; padding: 20px 0; }
.static-content h1 {
  font-size: 28px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 16px;
}
.static-content h1::before {
  content: ''; width: 5px; height: 28px;
  background: var(--accent); border-radius: 2px; flex-shrink: 0;
}
.static-content h2 {
  margin: 30px 0 15px; font-size: 20px; color: var(--accent);
}
.static-content p {
  color: var(--text-sec); line-height: 1.8; margin-bottom: 15px;
}
.static-content a { color: var(--accent); }
.static-content a:hover { text-decoration: underline; }

/* Video page */
.video-page { max-width: 900px; margin: 0 auto; }
.video-page h1 {
  font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 8px;
}
.video-meta {
  font-size: 14px; color: var(--text-sec); margin-bottom: 20px;
}
.video-player-inline {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 8px; overflow: hidden; background: #000; margin-bottom: 24px;
}
.video-player-inline video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.video-abstract {
  margin-bottom: 24px; padding: 16px 20px;
  background: var(--bg-card); border-radius: 8px;
  border-left: 4px solid var(--accent);
}
.video-abstract p {
  color: var(--text-sec); line-height: 1.8; margin: 0; font-size: 15px;
}
.video-tags { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.video-tags .tag {
  background: var(--bg-card); color: var(--text-sec); padding: 4px 12px;
  border-radius: 16px; font-size: 13px; border: 1px solid rgba(255,255,255,0.1);
}
.video-chapters { margin-bottom: 30px; }
.video-chapters h2 {
  font-size: 18px; color: var(--accent); margin-bottom: 12px;
}
.chapters-list {
  list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px;
}
.chapters-list li {
  padding: 8px 12px; border-radius: 6px; font-size: 14px;
  color: var(--text-sec); transition: background .2s;
  cursor: pointer;
}
.chapters-list li:hover { background: rgba(255,80,0,.1); color: var(--text); }
.ch-time {
  color: var(--accent); font-weight: 600; margin-right: 12px;
  font-variant-numeric: tabular-nums; min-width: 42px; display: inline-block;
}

/* Responsive: tablet */
@media (max-width: 768px) {
  .nav {
    display: none; flex-direction: column;
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg-header); padding: 20px; gap: 16px;
    border-bottom: 2px solid var(--accent);
  }
  .nav.open { display: flex; }
  .hamburger { display: block; }
  .video-card { flex: 0 0 calc(50% - 8px); min-width: 160px; }
  .slider-btn { width: 32px; height: 32px; font-size: 16px; }
  .page-title { font-size: 26px; }
  .hero { height: 55vh; min-height: 350px; }
  .hero-content { bottom: 100px; }
  .hero-title { font-size: 28px; }
}

/* Responsive: mobile */
@media (max-width: 576px) {
  .header-inner { height: 50px; }
  .logo img { height: 40px; }
  .nav { top: 50px; }
  .video-card { flex: 0 0 80%; min-width: 0; }
  .slider-section { margin-bottom: 32px; }
  .section-title { font-size: 18px; }
  .page-title { font-size: 22px; }
  .video-grid { grid-template-columns: 1fr; }
  .hero { height: 50vh; min-height: 300px; }
  .hero-content { bottom: 90px; }
  .hero-title { font-size: 22px; max-width: 100%; }
  .hero-abstract { font-size: 13px; -webkit-line-clamp: 2; }
  .hero + .main { margin-top: -60px; }
}
