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

/* Theme Name: Porngid
Theme URI: https://porngid.xxx
Author: Dmitry
Author URI: https://porngid.xxx
Description: Ultra-light dark neon grid theme for Porngid.xxx
Version: 1.3
Text Domain: porngid
*/

/* =========================================================
   PORNGID — BASE (ARCHITECTURE FIRST)
   В этом файле только база/структура. Визуальный неон — в custom.css.
   ========================================================= */

/* ---------------- RESET / BASE ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #050814;
  color: #d8d8e2;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body, button, input, textarea, select {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: #8eaaff; text-decoration: none; }
a:hover { color: #c4d8ff; }

/* списки: базово, без агрессии (custom.css может переопределить точечно) */
.pg-shell ul { margin: 0; padding-left: 1.1em; }
.pg-shell li { margin: 2px 0; }

/* ---------------- TOKENS (base) ---------------- */
:root{
  --pg-bg: #050814;
  --pg-surface: rgba(6, 11, 20, 0.95);
  --pg-border: rgba(124, 140, 255, 0.18);
  --pg-text-muted: #9aa3d0;
}

/* ---------------- WRAPPER ---------------- */
.pg-shell{
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* ---------------- HEADER (structure) ---------------- */
#pg-header{
  background: var(--pg-surface);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--pg-border);
  position: sticky;
  top: 0;
  z-index: 9999;
}
.pg-header-top{
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pg-header-bottom{
  padding: 8px 0;
  background: rgba(10, 14, 25, 0.7);
  backdrop-filter: blur(12px);
}

.pg-header-inner,
.pg-header-bottom .pg-nav{
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}
.pg-header-inner{
  justify-content: space-between;
  gap: 28px;
}
.pg-left{
  display: flex;
  align-items: center;
  gap: 24px;
}

/* logo базово (визуал в custom.css) */
.pg-logo{
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  line-height: 1;
}
.pg-logo span{ color: #7b5cff; }

/* search (структура) */
.pg-search{ flex: 1; display: flex; justify-content: center; }
.pg-search form{ position: relative; width: 100%; max-width: 520px; }
.pg-search input{
  width: 100%;
  padding: 10px 40px 10px 14px;
  font-size: 15px;
  background: #0b111e;
  border-radius: 999px;
  border: 1px solid #1f2a3b;
  color: #e5e7ef;
}
.pg-search input:focus{ outline: none; }
.pg-search form::after{
  content: "🔍";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.7;
  pointer-events: none;
}

/* cams button base */
.pg-cams a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}

/* top nav base */
.pg-header-bottom .pg-nav{ gap: 22px; }
.pg-header-bottom .pg-nav a{
  position: relative;
  color: #aeb8dd;
  font-size: 14px;
  padding: 6px 4px;
}

/* ---------------- LAYOUT ---------------- */
.pg-layout{
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

#site-content{
  flex: 1;
  width: 100%;
  max-width: 1350px;
}

/* ---------------- SIDEBAR (structure only) ---------------- */
.pg-sidebar{
  width: 290px;
  flex: 0 0 290px;
}

/* ---------------- PAGE HEADER ---------------- */
.page-header{ margin: 10px 0 22px; }
.pg-archive-title{
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  color: #f7f4ff;
}
.pg-grid-subtitle{
  margin: 0;
  font-size: 13px;
  color: var(--pg-text-muted);
  max-width: 520px;
}
.pg-sort-bar{
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pg-sort-label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7c86c8;
  opacity: 0.9;
}
.pg-sort-links{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------------- GRID ---------------- */
.pg-video-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* ---------------- VIDEO CARD (structure) ---------------- */
.video-item{
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.video-thumb{
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.video-title{
  padding: 10px 12px 4px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.video-meta{
  padding: 0 12px 12px;
  font-size: 13px;
  color: #9aa2bb;
}

.video-duration{
  position: absolute;
  bottom: 8px;
  right: 10px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
}

/* ---------------- ADS: BASE (no styling, only correct sizing) ---------------- */
.pg-ad-shell{ width: 100%; }
.pg-ad-shell--grid{
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-ad-slot--300x250{
  width: 300px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* IMPORTANT: base must NOT stretch iframe to 100% */
.pg-adsterra iframe{
  border: 0;
  display: block;
}

/* strip row under grid */
.pg-ad-row{
  margin: 28px 0;
  display: flex;
  justify-content: center;
}
.pg-ad-shell--strip{
  width: 100%;
  display: flex;
  justify-content: center;
}
.pg-ad-slot--strip{
  width: 100%;
  display: flex;
  justify-content: center;
}

/* ---------------- PLAYER BASE ---------------- */
.pg-player-wrapper{
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 0 36px rgba(80,40,150,0.4);
}
.pg-player{
  background: #000;
}

/* ---------------- FOOTER ---------------- */
.site-footer{
  margin-top: 44px;
  padding: 22px 0 26px;
  background: #050711;
  border-top: 1px solid rgba(255,255,255,0.04);
  color: #8b93b3;
  font-size: 14px;
}
.footer-inner{
  max-width: 1650px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* =========================================================
   18+ MODAL: structure + more neon color + depth
   ========================================================= */

/* overlay base (ВАЖНО: именно это обычно ломается после удаления старого блока) */
#pg-age-cookie-overlay.pg-age-overlay{
  position: fixed;
  inset: 0;
  z-index: 100000; /* выше sticky header */
  display: none;   /* показываем только когда aria-hidden="false" */
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255,77,210,.14), transparent 55%),
    radial-gradient(120% 120% at 85% 85%, rgba(168,92,255,.16), transparent 55%),
    rgba(2, 3, 8, .72);
  backdrop-filter: blur(10px);
}

/* показываем, когда JS выставит aria-hidden="false" */
#pg-age-cookie-overlay.pg-age-overlay[aria-hidden="false"]{
  display: flex;
}

/* если твой JS вместо aria-hidden использует класс */
#pg-age-cookie-overlay.pg-age-overlay.is-visible{
  display: flex;
}

/* контейнер модалки: покрываем разные варианты разметки */
#pg-age-cookie-overlay.pg-age-overlay :is(.pg-age-box, .modal-content, .dialog, .age-gate__content, .age-modal__content){
  width: min(560px, calc(100vw - 32px));
  padding: 22px 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(168,92,255,.35);
  background:
    radial-gradient(120% 140% at 18% 10%, rgba(168,92,255,.20), transparent 52%),
    radial-gradient(120% 140% at 85% 80%, rgba(255,77,210,.16), transparent 55%),
    linear-gradient(180deg, rgba(8,10,18,.92), rgba(6,7,14,.92));
}

/* лёгкая “рамка-свечения” */
@keyframes pgPulseGlow {
  0%   { box-shadow: 0 18px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(168,92,255,.18) inset, 0 0 26px rgba(168,92,255,.12); }
  50%  { box-shadow: 0 18px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(255,77,210,.22) inset, 0 0 34px rgba(255,77,210,.14); }
  100% { box-shadow: 0 18px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(168,92,255,.18) inset, 0 0 26px rgba(168,92,255,.12); }
}
#pg-age-cookie-overlay.pg-age-overlay :is(.pg-age-box, .modal-content, .dialog, .age-gate__content, .age-modal__content){
  animation: pgPulseGlow 3.6s ease-in-out infinite;
}

/* заголовок градиентом */
#pg-age-cookie-overlay.pg-age-overlay :is(h1, h2, .title, .modal-title){
  margin: 0 0 10px;
  background: linear-gradient(90deg, #b35cff, #ff4dd2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  letter-spacing: .6px;
  text-transform: uppercase;
}

/* текст */
#pg-age-cookie-overlay.pg-age-overlay :is(p, .desc, .modal-desc){
  margin: 0 0 14px;
  color: rgba(228,231,255,.88);
  font-size: 13px;
  line-height: 1.45;
}

/* зона кнопок */
#pg-age-cookie-overlay.pg-age-overlay :is(.pg-age-actions, .actions, .buttons){
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* кнопки базово */
#pg-age-cookie-overlay.pg-age-overlay :is(button, .btn, a.btn){
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #fff;
}

/* accept */
#pg-age-cookie-overlay.pg-age-overlay :is(.btn-primary, .accept, .age-accept, [data-action="accept"], [data-age="accept"]){
  background: linear-gradient(90deg, rgba(255,77,210,.96), rgba(168,92,255,.96)) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 26px rgba(255,77,210,.18), 0 0 22px rgba(168,92,255,.14) !important;
}
#pg-age-cookie-overlay.pg-age-overlay :is(.btn-primary:hover, .accept:hover, .age-accept:hover, [data-action="accept"]:hover, [data-age="accept"]:hover){
  filter: saturate(1.2) brightness(1.05);
  transform: translateY(-1px);
}

/* leave */
#pg-age-cookie-overlay.pg-age-overlay :is(.btn-secondary, .leave, .age-leave, [data-action="leave"], [data-age="leave"]){
  border: 1px solid rgba(168,92,255,.32) !important;
  background: rgba(255,255,255,.04) !important;
}
#pg-age-cookie-overlay.pg-age-overlay :is(.btn-secondary:hover, .leave:hover, .age-leave:hover, [data-action="leave"]:hover, [data-age="leave"]:hover){
  border-color: rgba(255,77,210,.42) !important;
  box-shadow: 0 0 18px rgba(168,92,255,.14) !important;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1200px){
  .pg-layout{ gap: 24px; }
  .pg-sidebar{ width: 260px; flex-basis: 260px; }
  .pg-video-grid{ gap: 18px; }
}
@media (max-width: 1024px){
  .pg-shell{ max-width: 100%; padding: 0 16px 40px; }
  .pg-layout{ gap: 18px; }
  .pg-sidebar{ display: none; }
  #site-content{ max-width: 100%; }
  .pg-video-grid{ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 900px){
  .pg-header-inner{ flex-direction: column; align-items: stretch; gap: 14px; }
  .pg-left{ justify-content: center; }
  .pg-search{ justify-content: stretch; }
  .pg-search form{ max-width: none; }
}
@media (max-width: 768px){
  .pg-header-inner, .pg-header-bottom .pg-nav{ padding: 0 16px; }
  .pg-header-bottom .pg-nav{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pg-shell{ padding: 0 12px 40px; }
  .pg-video-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .footer-inner{ flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px){
  .pg-video-grid{ grid-template-columns: 1fr; }
  .pg-search form::after{ right: 12px; }
}

/* ---------------- SCROLLBAR (DESKTOP) ---------------- */
@media (min-width: 1000px){
  ::-webkit-scrollbar{ width: 8px; }
  ::-webkit-scrollbar-track{ background: #050814; }
  ::-webkit-scrollbar-thumb{ background: #1d2440; border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover{ background: #2b3556; }
}