/* ═══════════════════════════════════════════════════════════
   CelebsEdge — Main Stylesheet
   Metronome challenge videos on celebs
   Design: Bold hot-pink + white + wine-shadow 3D pop style
   ═══════════════════════════════════════════════════════════ */
@import url('/assets/css/theme.css?v=celebsedge-v1');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

html { scroll-behavior: smooth; font-synthesis-weight: none }

body {
  background:
    radial-gradient(circle at 20% -8%, rgba(255,255,255,.18), transparent 28%),
    radial-gradient(circle at 85% 5%, rgba(107,21,64,.25), transparent 30%),
    linear-gradient(168deg, #FF85B1 0%, #FF6B9D 30%, #E8548A 70%, #C94478 100%);
  color: var(--text);
  font-family: 'Fredoka One', 'DM Sans', Arial, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAV ── */
nav {
  background: linear-gradient(180deg, rgba(255,107,157,.95), rgba(232,84,138,.98));
  border-bottom: 3px solid var(--ink);
  padding: 0 16px;
  position: sticky; top: 0; z-index: 200;
  box-shadow: var(--shadow-nav), 0 3px 0 var(--ink-deep);
  backdrop-filter: blur(12px);
}
.nb {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px; height: 60px;
}
.logo {
  font-size: clamp(24px, 4vw, 34px);
  color: #fff; text-decoration: none; flex-shrink: 0; line-height: 1;
  -webkit-text-stroke: 1px var(--ink);
  text-shadow: 3px 3px 0 var(--ink), 0 0 18px rgba(255,255,255,.3);
}
.logo span { color: var(--gold) }
.site-logo-image {
  height: 38px; width: auto; display: block;
  filter: drop-shadow(2px 2px 0 var(--ink)) drop-shadow(0 0 12px rgba(255,255,255,.3));
}
.sw { flex: 1; max-width: 480px; min-width: 0 }
.sw input {
  width: 100%; padding: 10px 16px;
  background: #fff; border: 2px solid var(--ink);
  color: var(--text-ink); border-radius: var(--r-pill);
  font-size: 14px; font-family: inherit; outline: none;
  box-shadow: var(--shadow-btn);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.sw input:focus { border-color: var(--gold); box-shadow: var(--shadow-btn-hover), var(--focus) }
.sw input::placeholder { color: rgba(107,21,64,.5); text-shadow: none }
.nav-contact {
  margin-left: auto; flex-shrink: 0; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  background: #fff; color: var(--text-ink); border: 2px solid var(--ink);
  border-radius: var(--r); box-shadow: var(--shadow-btn);
  transition: all .2s var(--ease); text-transform: uppercase; letter-spacing: .5px;
}
.nav-contact:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-btn-hover) }

/* ── AD SLOTS ── */
.ad-slot { width: 100%; overflow: hidden; display: flex; justify-content: center; align-items: center; min-height: 10px }
.ad-slot:empty { display: none !important; margin: 0 !important; min-height: 0 !important }
.ad-frame { display: block; width: 100%; min-height: 90px; border: 0; background: transparent; overflow: hidden }
.adside .ad-frame { min-height: 250px }
.adside-tall .ad-frame { min-height: 500px }
.mobile-ad-slot { display: none }
.native-ad-body .ad-frame { min-height: 132px }
.ad-slot:not(:empty) {
  min-height: 90px; margin: 14px auto; padding: 6px;
  border: 2px dashed var(--border); border-radius: var(--r);
  background: rgba(255,255,255,.08);
}
.ad-frame { max-width: 100%; border-radius: 8px }
#adHomeAfterGrid .ad-frame, #adSiteFooter .ad-frame { max-width: 728px; min-height: 90px }
#adMobileTop .ad-frame { max-width: 300px; min-height: 100px }
#adHomeSectionTop .ad-frame, #adInline .ad-frame, #adTagsTop .ad-frame,
#adTrendingTop .ad-frame, #adActressListTop .ad-frame { max-width: 728px; min-height: 90px }
#adSide .ad-frame { max-width: 300px; min-height: 250px }
#adSideBottom .ad-frame { max-width: 300px; min-height: 500px }

/* ── PAGE LAYOUT ── */
.page { max-width: 1400px; margin: 0 auto; padding: 0 16px; animation: pageIn .4s var(--ease) both }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px 0 }

/* ── SECTION TABS ── */
.sec-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,.12); border: 2px solid var(--ink);
  border-radius: var(--r); padding: 4px; margin-bottom: 24px;
  box-shadow: var(--shadow-btn);
}
.stab {
  background: none; border: none; color: rgba(255,255,255,.7);
  padding: 12px 20px; font-size: 14px; font-family: inherit;
  font-weight: 600; cursor: pointer; text-transform: uppercase;
  letter-spacing: .5px; border-radius: 8px;
  transition: all .2s var(--ease); -webkit-tap-highlight-color: transparent;
}
.stab:hover { color: #fff; background: rgba(255,255,255,.1) }
.stab.active {
  color: var(--text-ink); background: #fff;
  box-shadow: var(--shadow-btn);
  -webkit-text-stroke: 0;
}
.stab:focus-visible { outline: none; box-shadow: var(--focus) }

/* ── SECTIONS ── */
.section { display: none }
.section.active { display: block }
.sec-title {
  font-size: 22px; color: #fff; letter-spacing: .5px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  -webkit-text-stroke: .5px var(--ink);
  text-shadow: 2px 2px 0 var(--ink);
}
.sec-title::after { content: ''; flex: 1; height: 2px; background: var(--border); border-radius: 1px }

/* ── SORT BAR ── */
.sort-bar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
  background: rgba(255,255,255,.08); border: 2px solid var(--ink);
  border-radius: var(--r); padding: 10px 14px;
  box-shadow: 2px 2px 0 var(--ink-soft);
}
.sort-bar .select-ui { min-width: 138px }
.sort-bar .select-ui:first-of-type { margin-left: auto }
.ss {
  background: #fff; border: 2px solid var(--ink);
  color: var(--text-ink); padding: 8px 16px;
  border-radius: var(--r-pill); font-size: 13px; font-family: inherit;
  cursor: pointer; outline: none; box-shadow: var(--shadow-btn);
  -webkit-appearance: none;
}

/* ── TAG SEARCH ── */
.tag-search {
  max-width: 240px; background: #fff; border: 2px solid var(--ink);
  color: var(--text-ink); padding: 9px 16px; border-radius: var(--r-pill);
  font-size: 13px; font-family: inherit; outline: none;
  box-shadow: var(--shadow-btn);
}
.tag-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px }
.tag-card {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--r); padding: 14px 16px; text-decoration: none;
  color: var(--text-ink); display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow-btn);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.tag-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hover) }
.tag-card span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-ink) }
.tag-count { font-size: 11px; color: var(--ink); flex-shrink: 0 }

/* ── FILTER CHIPS ── */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px }
.filter-chip {
  background: #fff; border: 2px solid var(--ink); color: var(--text-ink);
  border-radius: var(--r-pill); padding: 6px 12px;
  font-size: 12px; font-family: inherit; display: inline-flex;
  align-items: center; gap: 8px; box-shadow: 2px 2px 0 var(--ink);
}
.filter-chip button { background: none; border: 0; color: var(--ink); cursor: pointer; font: inherit; line-height: 1 }

/* ── VIDEO GRID ── */
#grid, #grid-trending { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px }
.card {
  background: #fff; border-radius: var(--r); overflow: hidden;
  border: 2px solid var(--ink); text-decoration: none; display: block;
  box-shadow: var(--shadow-card);
  position: relative; will-change: transform;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.card:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-hover) }
.card:active { transform: scale(.98) }

/* Native ad card */
.native-ad-card {
  background: #fff; border-radius: var(--r); overflow: hidden;
  border: 2px solid var(--ink); min-height: 100%;
  display: flex; flex-direction: column; box-shadow: var(--shadow-card);
}
.native-ad-label {
  font-size: 10px; color: var(--ink); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px 0;
}
.native-ad-body { padding: 10px; display: flex; align-items: center; justify-content: center; min-height: 132px; overflow: hidden }

/* Thumbnail wrapper */
.tw {
  position: relative; aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, var(--pink-deep), var(--ink));
}
.tw img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); display: block }
.card:hover .tw img { transform: scale(1.06) }
.tw::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(180deg, transparent, rgba(107,21,64,.6));
  pointer-events: none;
}

/* Badges */
.hb2 {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--gold); color: var(--ink);
  font-size: 10px; font-weight: 700; padding: 3px 8px;
  border-radius: 6px; border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.dbb {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  background: rgba(107,21,64,.9); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.rank-badge {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--gold); color: var(--ink);
  font-size: 14px; font-weight: 700; padding: 3px 10px;
  border-radius: 6px; border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink); letter-spacing: 1px;
}

/* Card body */
.cb { padding: 12px; background: #fff }
.ct {
  font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; color: var(--text-ink);
}
.cm { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink) }

/* ── CELEB / MODEL SECTION ── */
.actress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px }
.actress-btn {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--r); padding: 16px 12px; text-align: center;
  cursor: pointer; box-shadow: var(--shadow-btn);
  transition: all .2s var(--ease); -webkit-tap-highlight-color: transparent;
  text-decoration: none; display: block;
}
.actress-btn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-btn-hover) }
.actress-name { font-size: 13px; font-weight: 600; color: var(--text-ink); margin-bottom: 4px; word-break: break-word }
.actress-count { font-size: 11px; color: var(--ink) }
.actress-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  border: 3px solid var(--ink); margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; overflow: hidden;
  text-shadow: 1px 1px 0 var(--ink);
  transition: border-color .2s, transform .2s;
}
.actress-btn:hover .actress-avatar { border-color: var(--gold); transform: scale(1.05) }

/* Celeb video view */
#actress-view { display: none }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--ink);
  color: var(--text-ink); padding: 10px 18px; border-radius: var(--r);
  cursor: pointer; font-size: 13px; font-family: inherit;
  margin-bottom: 20px; box-shadow: var(--shadow-btn);
  transition: all .2s var(--ease); -webkit-tap-highlight-color: transparent;
}
.back-btn:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-btn-hover) }

/* ── SIDEBAR ── */
.sidebar { display: block }
.ss2 {
  background: #fff; border: 2px solid var(--ink);
  border-radius: var(--r); padding: 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.st {
  font-size: 18px; color: var(--text-ink); letter-spacing: .5px; margin-bottom: 12px;
  border-bottom: 2px solid var(--ink); padding-bottom: 8px;
}

/* ── PAGINATION ── */
.pg { display: flex; justify-content: center; gap: 6px; padding: 24px 0; flex-wrap: wrap }
.pb {
  background: #fff; border: 2px solid var(--ink); color: var(--text-ink);
  width: 40px; height: 40px; border-radius: var(--r);
  cursor: pointer; font-size: 14px; font-family: inherit;
  box-shadow: var(--shadow-btn); display: flex; align-items: center;
  justify-content: center; transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pb:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-btn-hover) }
.pb.active, .pb:active {
  background: var(--gold); color: var(--ink);
  box-shadow: var(--shadow-btn);
}
.pb:disabled { opacity: .3; cursor: default; pointer-events: none }

/* ── SKELETON LOADING ── */
.sk {
  background: linear-gradient(90deg, rgba(255,255,255,.08) 25%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.08) 75%);
  background-size: 200% 100%; animation: sh 1.4s infinite;
  border-radius: var(--r); aspect-ratio: 16/9;
}
@keyframes sh { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* ── EMPTY STATE ── */
.empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: rgba(255,255,255,.7) }
.empty h3 { font-size: 28px; color: #fff; margin-bottom: 8px; text-shadow: 2px 2px 0 var(--ink) }

/* ── FOOTER ── */
footer {
  background: var(--ink-deep); border-top: 3px solid var(--ink);
  text-align: center; padding: 28px 16px; color: rgba(255,255,255,.7);
  font-size: 13px; margin-top: 40px;
  box-shadow: 0 -4px 20px rgba(107,21,64,.3);
}

/* ── MOBILE BOTTOM NAV ── */
.mobile-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(232,84,138,.98), rgba(107,21,64,.98));
  border-top: 3px solid var(--ink); z-index: 200;
  padding: 0; justify-content: space-around;
  box-shadow: 0 -4px 20px rgba(107,21,64,.4);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav-item {
  flex: 1; background: none; border: none; color: rgba(255,255,255,.6);
  padding: 12px 4px; font-size: 11px; font-family: inherit;
  cursor: pointer; text-align: center; transition: color .2s;
}
.mobile-nav-item.active { color: var(--gold) }
.mobile-nav-item:hover { color: #fff }

/* ── CATEGORY SECTION ── */
#category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px }
.category-card {
  background: #fff; border-radius: var(--r); overflow: hidden;
  text-decoration: none; display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--ink); padding: 14px;
  box-shadow: var(--shadow-btn);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.category-card:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-btn-hover) }
.category-icon {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; background: var(--pink); border: 2px solid var(--ink);
}
.category-icon-placeholder {
  width: 48px; height: 48px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  border: 2px solid var(--ink); display: flex; align-items: center;
  justify-content: center; font-size: 16px; color: #fff; font-weight: 700;
}
.category-info { min-width: 0; flex: 1 }
.category-name { font-size: 14px; font-weight: 600; color: var(--text-ink); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.category-count { font-size: 11px; color: var(--ink) }

/* ── SEO CRAWL BLOCK ── */
.seo-crawl-block { margin: 28px 0 10px; padding: 18px; border: 2px solid var(--ink); border-radius: var(--r); background: rgba(255,255,255,.08); color: #fff }
.seo-crawl-block h1 { font-size: 24px; line-height: 1.2; margin: 0 0 10px; color: #fff; text-shadow: 2px 2px 0 var(--ink) }
.seo-crawl-block p { font-size: 14px; line-height: 1.65; color: rgba(255,255,255,.8); max-width: 980px; margin: 0 0 16px }
.seo-link-index { display: none !important }

/* ── SEO LINKS ── */
.seo-link-group + .seo-link-group { margin-top: 18px }
.seo-link-group h2 { font-size: 14px; color: var(--gold); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 10px }
.seo-link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px }
.seo-link-grid a {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 10px 12px; border: 2px solid var(--ink); border-radius: var(--r);
  background: #fff; color: var(--text-ink); text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink-soft);
}
.seo-link-grid a:hover { border-color: var(--gold); transform: translate(-1px,-1px) }
.seo-link-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.seo-link-grid small { color: var(--ink); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }

/* ── CUSTOM SELECTS ── */
.native-select-hidden { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important }
.select-ui { position: relative; display: inline-flex; min-width: 130px }
.select-trigger {
  width: 100%; background: #fff; border: 2px solid var(--ink);
  color: var(--text-ink); padding: 9px 34px 9px 14px; border-radius: var(--r-pill);
  font-size: 13px; font-family: inherit; cursor: pointer;
  box-shadow: var(--shadow-btn); text-align: left; white-space: nowrap;
}
.select-trigger::after { content: '>'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(90deg); color: var(--pink); font-size: 12px }
.select-ui.open .select-trigger { border-color: var(--gold); box-shadow: var(--focus) }
.select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 450;
  display: none; min-width: 100%; max-height: 260px; overflow: auto;
  background: #fff; border: 2px solid var(--ink); border-radius: var(--r);
  padding: 6px; box-shadow: 0 18px 48px rgba(107,21,64,.4);
}
.select-ui.open .select-menu { display: block }
.select-option {
  display: block; width: 100%; background: transparent; border: 0;
  color: var(--text-ink); font-family: inherit; text-align: left;
  padding: 9px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap;
}
.select-option:hover, .select-option.active {
  background: linear-gradient(90deg, rgba(255,107,157,.25), rgba(255,107,157,.08));
  color: var(--ink);
}

/* ── UI TRANSITIONS ── */
.sw input, .ss, .stab, .pb, .back-btn, .tag-search {
  transition: border-color .18s var(--ease), background .18s var(--ease),
    color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}

/* ── RESPONSIVE ── */
@media(max-width: 900px) {
  .layout { grid-template-columns: 1fr }
  .sidebar { display: none }
  .mobile-ad-slot { display: flex }
  .mobile-bottom-nav { display: flex }
  #grid, #grid-trending { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) }
  .actress-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) }
  #category-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) }
  body { padding-bottom: 60px }
  #adTop { display: none !important }
}
@media(max-width: 600px) {
  #grid, #grid-trending { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px }
  .ct { font-size: 12px }
  .stab { padding: 10px 12px; font-size: 12px }
  .nav-contact { font-size: 12px; padding: 7px 10px }
  .sec-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch }
  .stab { white-space: nowrap; min-height: 44px }
  .sort-bar { display: grid; grid-template-columns: 1fr; align-items: stretch }
  .sort-bar .select-ui, .sort-bar .select-ui:first-of-type { width: 100%; margin-left: 0 }
  .ad-slot:not(:empty) { margin: 10px auto; padding: 4px; max-width: 100vw; overflow: hidden }
  #adMobileTop { display: flex !important }
  #category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px }
  .category-card { padding: 10px; gap: 10px }
  .category-icon, .category-icon-placeholder { width: 40px; height: 40px }
}
@media(max-width: 380px) {
  #grid, #grid-trending { grid-template-columns: repeat(2, 1fr) }
}

/* ── REDUCED MOTION ── */
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    scroll-behavior: auto !important; transition-duration: .01ms !important;
  }
}

[hidden] { display: none !important }
