/* ============================================
   AmatorITA — Style Enhance v1
   Override e miglioramenti UI senza rompere base
   ============================================ */

/* --- FONT --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hero-title, .vp-title, h1, h2, .seo-static h1, .seo-static h2 {
  font-family: 'Outfit', -apple-system, sans-serif !important;
  letter-spacing: -0.02em;
}

/* --- VIDEO CARDS (homepage SSR + category SSR) --- */
.home-grid-ssr a, .category-grid-ssr a, .seo-static a[href^="/video/"] {
  position: relative;
  transition: transform .25s cubic-bezier(.2,.8,.3,1.2), box-shadow .25s, background .2s;
  background: linear-gradient(180deg, #1f1f23 0%, #16161a 100%) !important;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.home-grid-ssr a:hover, .category-grid-ssr a:hover, .seo-static a[href^="/video/"]:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(196,30,30,.25), 0 4px 12px rgba(0,0,0,.6);
  border-color: rgba(196,30,30,.4);
  z-index: 2;
}
.home-grid-ssr img, .category-grid-ssr img, .seo-static img {
  transition: transform .3s, filter .3s;
}
.home-grid-ssr a:hover img, .category-grid-ssr a:hover img, .seo-static a[href^="/video/"]:hover img {
  transform: scale(1.04);
  filter: brightness(1.1);
}

/* --- HOVER: play button overlay --- */
.home-grid-ssr a::after, .category-grid-ssr a::after, .seo-static a[href^="/video/"]::after {
  content: '▶';
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.5);
  width: 56px;
  height: 56px;
  background: rgba(196, 30, 30, 0.92);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding-left: 4px;
  opacity: 0;
  transition: all .3s cubic-bezier(.2,.8,.3,1.2);
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(196,30,30,.6);
}
.home-grid-ssr a:hover::after, .category-grid-ssr a:hover::after, .seo-static a[href^="/video/"]:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* --- CATEGORIE PILLS (più belle, gradient) --- */
.home-grid-ssr a[href^="/category/"], .seo-static a[href^="/category/"] {
  background: linear-gradient(135deg, #1d1d22 0%, #25252b 100%) !important;
  border: 1px solid rgba(255,255,255,.08);
  transition: all .2s;
}
.home-grid-ssr a[href^="/category/"]:hover, .seo-static a[href^="/category/"]:hover {
  background: linear-gradient(135deg, #c41e1e 0%, #8b0000 100%) !important;
  border-color: rgba(255,255,255,.2);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(196,30,30,.4);
  transform: translateY(-2px);
}
.home-grid-ssr a[href^="/category/"]:hover span, .seo-static a[href^="/category/"]:hover span {
  color: rgba(255,255,255,.85) !important;
}
.home-grid-ssr a[href^="/tag/"]:hover {
  background: rgba(196,30,30,.2) !important;
  color: #fff !important;
}

/* --- VIDEO PAGE PLAYER --- */
#vp-player {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 30px rgba(0,0,0,.6);
}

/* --- RELATED VIDEOS --- */
#related-videos .related-card {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  transition: transform .2s, box-shadow .2s;
}
#related-videos .related-card:hover {
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(196,30,30,.3);
}

/* --- BUTTONS --- */
.btn-primary, .vp-action-btn {
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(196,30,30,.4);
}
.vp-action-btn:hover {
  background: rgba(196,30,30,.15);
  border-color: rgba(196,30,30,.4);
}

/* --- BADGES / TAGS --- */
.badge {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 12px;
}
.tag {
  background: rgba(196,30,30,.12);
  color: #ff6b6b;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  transition: all .15s;
  cursor: pointer;
  border: 1px solid rgba(196,30,30,.2);
}
.tag:hover {
  background: rgba(196,30,30,.3);
  color: #fff;
  border-color: rgba(196,30,30,.5);
}

/* --- HEADER --- */
header {
  backdrop-filter: blur(12px);
  background: rgba(10,10,11,.85) !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* --- HERO --- */
.hero {
  background: linear-gradient(135deg, #0a0a0b 0%, #1a1a1e 50%, #2a1010 100%) !important;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(196,30,30,.15), transparent 60%);
  pointer-events: none;
}
.hero-title {
  font-size: clamp(32px, 5vw, 56px) !important;
  font-weight: 800 !important;
}
.hero-title em {
  background: linear-gradient(135deg, #ff4040, #c41e1e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

/* --- SCROLLBAR DARK --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #0a0a0b;
}
::-webkit-scrollbar-thumb {
  background: #2a2a2e;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c41e1e;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-grid-ssr a, .category-grid-ssr a {
  animation: fadeInUp .4s cubic-bezier(.2,.8,.3,1.2) backwards;
}
.home-grid-ssr a:nth-child(1) { animation-delay: 0.05s; }
.home-grid-ssr a:nth-child(2) { animation-delay: 0.1s; }
.home-grid-ssr a:nth-child(3) { animation-delay: 0.15s; }
.home-grid-ssr a:nth-child(4) { animation-delay: 0.2s; }
.home-grid-ssr a:nth-child(5) { animation-delay: 0.25s; }
.home-grid-ssr a:nth-child(6) { animation-delay: 0.3s; }
.home-grid-ssr a:nth-child(7) { animation-delay: 0.35s; }
.home-grid-ssr a:nth-child(8) { animation-delay: 0.4s; }

/* --- DURATION BADGE su thumbnails --- */
.home-grid-ssr > div > a, .category-grid-ssr > div > a {
  position: relative;
}

/* --- SEO STATIC HEADINGS più belli --- */
.seo-static h1, .seo-static h2 {
  font-weight: 700;
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.seo-static h1::after, .seo-static h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #c41e1e, transparent);
  border-radius: 2px;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
  .hero-title { font-size: 28px !important; }
  .hero-sub { font-size: 14px !important; }
  .home-grid-ssr a:hover { transform: none; }
}

/* --- SKELETON LOADER (per JS-driven content) --- */
.skeleton {
  background: linear-gradient(90deg, #1a1a1e 0%, #2a2a2e 50%, #1a1a1e 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- SEO FOOTER beautify --- */
.seo-footer a {
  transition: color .15s, transform .15s;
}
.seo-footer a:hover {
  color: #ff6b6b !important;
  transform: translateX(2px);
  display: inline-block;
}

/* --- FOCUS ACCESSIBILITY --- */
a:focus-visible, button:focus-visible {
  outline: 2px solid #c41e1e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- TELEGRAM BUTTON --- */
#footer-tg-link, [href*="t.me/amatorita"] {
  background: linear-gradient(135deg, #0088cc 0%, #006bb3 100%) !important;
  transition: transform .15s, box-shadow .15s !important;
}
#footer-tg-link:hover, [href*="t.me/amatorita"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,136,204,.5) !important;
}
