/* ── Reset & Base ─────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  background:#09090b;
  color:#fafafa;
  line-height:1.6;
  min-height:100vh;
  overflow-x:hidden;
  position:relative;
}
a{color:inherit}

.bg-orb{
  position:fixed;border-radius:999px;pointer-events:none;filter:blur(60px);opacity:.3;z-index:-1;
  animation:floatOrb 18s ease-in-out infinite alternate;
}
.bg-orb-a{
  width:400px;height:400px;top:0;left:-100px;
  background:radial-gradient(circle,#3b82f6 0,rgba(59,130,246,0) 70%);
}
.bg-orb-b{
  width:500px;height:500px;right:-150px;bottom:-100px;
  background:radial-gradient(circle,#8b5cf6 0,rgba(139,92,246,0) 70%);
  animation-delay:-9s;
}

@keyframes floatOrb{
  0%{transform:translate3d(0,0,0) scale(1)}
  100%{transform:translate3d(20px,-30px,0) scale(1.05)}
}

/* ── Header ──────────────────────────────────────────────── */
.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(9,9,11,.6);
  backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  border-bottom:1px solid rgba(255,255,255,.05);
  padding:0 24px;
}
.header-inner{
  max-width:1400px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  min-height:72px;flex-wrap:wrap;
}
.logo{
  display:flex;align-items:center;gap:10px;
  font-size:1.25rem;font-weight:700;
  color:#fafafa;white-space:nowrap;text-decoration:none;
}
.logo em{font-style:normal;color:#3b82f6}
.logo-icon{width:28px;height:28px;color:#3b82f6}

.header-controls{
  display:flex;align-items:center;
  flex:1;max-width:320px;justify-content:flex-end;
}
.search-box{
  position:relative;width:100%;
}
.search-box svg{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:18px;height:18px;color:#a1a1aa;pointer-events:none;
}
.search-box input{
  width:100%;padding:10px 14px 10px 42px;
  border:1px solid rgba(255,255,255,.1);border-radius:999px;
  background:rgba(255,255,255,.05);font-size:.95rem;color:#fafafa;
  transition:border-color .3s,background .3s,box-shadow .3s;
  outline:none;
}
.search-box input::placeholder{color:#a1a1aa}
.search-box input:focus{
  border-color:#3b82f6;background:rgba(255,255,255,.1);
  box-shadow:0 0 0 4px rgba(59,130,246,.2);
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-shell{
  max-width:1400px;margin:40px auto 20px;padding:0 24px;
}
.hero-panel{
  display:flex;flex-direction:column;justify-content:center;
  text-align:center;align-items:center;
  padding:50px 20px;
  border:1px solid rgba(255,255,255,.05);
  background:linear-gradient(180deg,rgba(255,255,255,.03) 0,rgba(255,255,255,0) 100%);
  border-radius:24px;
  position:relative;overflow:hidden;
}
.hero-panel::before{
  content:'';position:absolute;inset:0;
  background:radial-gradient(ellipse at top,rgba(59,130,246,.15),transparent 60%);
  pointer-events:none;
}
.eyebrow{
  display:inline-flex;align-items:center;
  font-size:.8rem;font-weight:700;letter-spacing:.15em;text-transform:uppercase;
  color:#60a5fa;margin-bottom:16px;
}
.hero-panel h1{
  font-size:clamp(2.5rem,5vw,4.2rem);
  line-height:1.1;letter-spacing:-.02em;
  max-width:20ch;margin:0 auto;
}
.hero-panel p{
  max-width:55ch;margin:20px auto 0;
  color:#a1a1aa;font-size:1.1rem;
}

/* ── Video count bar ─────────────────────────────────────── */
.video-count-bar{
  max-width:1400px;margin:20px auto 0;padding:0 24px;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.08);
  padding-bottom:16px;
}
.video-count-bar h2{
  font-size:1.4rem;font-weight:600;
}
.video-count-bar #videoCount{
  font-size:.85rem;color:#a1a1aa;font-weight:600;
  padding:6px 12px;border-radius:999px;background:rgba(255,255,255,.08);
}

/* ── Grid ────────────────────────────────────────────────── */
.video-grid{
  max-width:1400px;margin:30px auto 60px;padding:0 24px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(340px,1fr));
  gap:32px;
}

/* ── Card ────────────────────────────────────────────────── */
.video-card{
  background:rgba(24,24,27,.6);border-radius:18px;
  border:1px solid rgba(255,255,255,.05);
  overflow:hidden;cursor:pointer;
  transition:transform .4s cubic-bezier(0.16,1,0.3,1),box-shadow .4s cubic-bezier(0.16,1,0.3,1),border-color .4s;
  opacity:0;transform:translateY(30px);
  animation:cardIn .6s cubic-bezier(0.16,1,0.3,1) forwards;
}
.video-card:hover{
  transform:translateY(-8px);
  border-color:rgba(59,130,246,.5);
  box-shadow:0 24px 50px rgba(0,0,0,.6), 0 0 40px rgba(59,130,246,.15);
}

@keyframes cardIn{
  to{opacity:1;transform:translateY(0)}
}

.video-card{animation-delay:var(--delay,0s)}

.thumb-wrapper{
  position:relative;overflow:hidden;
  aspect-ratio:16/9;background:#18181b;
}
.thumb-wrapper img{
  width:100%;height:100%;object-fit:cover;
  transition:transform .6s cubic-bezier(0.16,1,0.3,1);
}
.thumb-wrapper::after{
  content:'';position:absolute;inset:auto 0 0 0;height:50%;
  background:linear-gradient(to top,rgba(24,24,27,1),rgba(24,24,27,0));
  opacity:0.8;transition:opacity .4s;
}
.video-card:hover .thumb-wrapper img{transform:scale(1.08)}
.video-card:hover .thumb-wrapper::after{opacity:0.4}

.play-badge{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.3);
  opacity:0;transition:opacity .4s cubic-bezier(0.16,1,0.3,1);
  backdrop-filter:blur(4px);
}
.video-card:hover .play-badge{opacity:1}

.play-icon-wrap{
  width:64px;height:64px;border-radius:50%;
  background:rgba(59,130,246,.9);
  display:flex;align-items:center;justify-content:center;
  color:#fff;
  transform:scale(.8);
  transition:transform .4s cubic-bezier(0.34,1.56,0.64,1),box-shadow .4s;
  box-shadow:0 10px 20px rgba(0,0,0,.5);
}
.video-card:hover .play-icon-wrap{
  transform:scale(1);
  box-shadow:0 10px 30px rgba(59,130,246,.6);
}
.play-icon-wrap svg{
  width:32px;height:32px;margin-left:4px;
}

.card-body{padding:20px 24px 24px;position:relative;z-index:2}
.card-body h3{
  font-size:1.15rem;font-weight:600;
  line-height:1.4;margin-bottom:8px;color:#f4f4f5;
  display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;
}
.card-body p{
  font-size:.9rem;color:#a1a1aa;
  display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;
}

/* ── Overlay ─────────────────────────────────────────────── */
.overlay{
  position:fixed;inset:0;z-index:200;
  background:rgba(0,0,0,.9);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;
  transition:opacity .4s,visibility .4s;
}
.overlay.active{opacity:1;visibility:visible}

.overlay-close{
  position:absolute;top:24px;right:32px;
  width:48px;height:48px;border-radius:50%;
  background:rgba(255,255,255,.1);border:none;
  color:#fff;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:background .3s,transform .3s;
}
.overlay-close:hover{background:rgba(255,255,255,.2);transform:scale(1.1)}

.overlay-content{
  width:92vw;max-width:1080px;
  transform:translateY(40px) scale(.95);
  transition:transform .5s cubic-bezier(0.16,1,0.3,1);
}
.overlay.active .overlay-content{transform:translateY(0) scale(1)}

.player-wrapper{
  position:relative;padding-bottom:56.25%;
  border-radius:20px;overflow:hidden;
  background:#000;box-shadow:0 30px 60px rgba(0,0,0,.8);
  border:1px solid rgba(255,255,255,.05);
}
.player-wrapper iframe{
  position:absolute;inset:0;width:100%;height:100%;
}
.overlay-info{
  padding:24px 8px 0;color:#fff;display:flex;justify-content:space-between;align-items:flex-start;gap:20px;
}
.overlay-info h2{font-size:1.5rem;font-weight:600;margin-bottom:8px;line-height:1.2}
.overlay-info p{font-size:1rem;color:#a1a1aa;max-width:600px;}
.yt-link{
  display:inline-flex;align-items:center;gap:10px;
  padding:12px 20px;border-radius:12px;background:rgba(255,255,255,.1);
  color:#fff;font-weight:600;font-size:.9rem;
  text-decoration:none;transition:background .3s;flex-shrink:0;
}
.yt-link:hover{background:rgba(255,255,255,.2)}
.yt-link svg{width:22px;height:22px;color:#ef4444}

/* ── Scroll-to-top ───────────────────────────────────────── */
.scroll-top{
  position:fixed;bottom:32px;right:32px;
  width:52px;height:52px;border-radius:16px;
  background:#3b82f6;color:#fff;border:none;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 24px rgba(0,0,0,.4);
  opacity:0;transform:translateY(20px);
  transition:opacity .4s,transform .4s,background .3s;
  z-index:50;
}
.scroll-top.visible{opacity:1;transform:translateY(0)}
.scroll-top:hover{background:#60a5fa}
.scroll-top svg{width:24px;height:24px}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer{
  border-top:1px solid rgba(255,255,255,.05);
  margin-top:60px;padding:60px 24px;
  background:rgba(9,9,11,.8);
}
.footer-inner{
  max-width:1400px;margin:0 auto;
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:30px;
}
.footer-brand{
  font-size:1.2rem;font-weight:700;color:#fafafa;
}
.footer-brand em{font-style:normal;color:#3b82f6}
.footer-nav{
  display:flex;gap:24px;
}
.footer-nav a{
  color:#a1a1aa;text-decoration:none;font-size:.9rem;font-weight:500;
  transition:color .3s;
}
.footer-nav a:hover{color:#fafafa}
.footer-copy{
  width:100%;text-align:center;margin-top:40px;
  font-size:.85rem;color:#71717a;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state{
  grid-column:1/-1;text-align:center;
  padding:100px 24px;color:#71717a;
}
.empty-state svg{width:64px;height:64px;margin-bottom:20px;opacity:.5}
.empty-state p{font-size:1.2rem;font-weight:500}

/* ── Legal page ──────────────────────────────────────────── */
.legal-shell{
  max-width:800px;margin:60px auto;padding:0 24px;
}
.legal-shell h1{
  font-size:clamp(2.2rem,4vw,3.5rem);line-height:1.1;margin-bottom:16px;
  letter-spacing:-.02em;
}
.legal-intro{
  color:#a1a1aa;font-size:1.1rem;margin-bottom:40px;
}
.legal-section{
  margin-top:40px;
}
.legal-section h2{
  font-size:1.3rem;margin-bottom:12px;color:#f4f4f5;
}
.legal-section p{
  color:#a1a1aa;
}
.legal-back{
  display:inline-flex;align-items:center;gap:10px;
  margin-top:50px;padding:12px 20px;border-radius:12px;background:rgba(255,255,255,.05);
  text-decoration:none;font-weight:600;color:#fafafa;transition:background .3s;
}
.legal-back:hover{background:rgba(255,255,255,.1)}

/* ── Responsive ──────────────────────────────────────────── */
@media(max-width:768px){
  .header-inner{min-height:auto;padding:16px 0;gap:14px;flex-direction:column;align-items:flex-start}
  .header-controls{max-width:none}
  .hero-panel{padding:40px 16px;border-radius:20px}
  .video-grid{grid-template-columns:1fr;gap:24px;padding:0 16px}
  .overlay-info{flex-direction:column;gap:16px}
  .yt-link{width:100%;justify-content:center}
  .footer-inner{flex-direction:column;align-items:flex-start}
  .footer-nav{flex-wrap:wrap;gap:16px}
}
