/* Pornhub desktop clone – layout/colors matched via CDP probe */

:root {
  --ph-black: #000;
  --ph-header-border: #151515;
  --ph-menu-bg: #0e0e0e;
  --ph-search-bg: #252525;
  --ph-orange: #ff9900;
  --ph-orange-hover: #e68a00;
  --ph-text: #fff;
  --ph-muted: #aaa;
  --ph-muted2: #7c7c7c;
  --ph-line: #1e1e1e;
  --ph-sidebar-w: 230px;
  --ph-header-h: 100px;
  --ph-font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--ph-black);
  color: var(--ph-text);
  font: 12px/1.4 var(--ph-font);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

#wrapper { min-height: 100%; display: flex; flex-direction: column; }

/* ========== HEADER ========== */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ph-black);
  border-bottom: 1px solid var(--ph-header-border);
}

#headerWrapper { width: 100%; }

#headerContainer {
  max-width: none;
  padding: 0 10px;
}

.headerContainerColumn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 56px;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#desktopNavigation {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  font-size: 22px;
}
#desktopNavigation:hover { background: #1a1a1a; }

.logoImg { height: 40px; width: auto; cursor: pointer; }

.orientationMenuWrap { position: relative; }
.orientationBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.orientationBtn:hover { background: #1a1a1a; }
.orientationBtn .arrow { font-size: 10px; opacity: .8; }

.headerSearchWrapper {
  display: flex;
  align-items: center;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  background: var(--ph-search-bg);
  border-radius: 4px;
  overflow: hidden;
  height: 37px;
}

.headerSearchWrapper input {
  flex: 1;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  padding: 0 12px;
}
.headerSearchWrapper input::placeholder { color: #888; }

.searchSubmit {
  width: 44px;
  height: 100%;
  background: var(--ph-orange);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.searchSubmit:hover { background: var(--ph-orange-hover); }

.topMenuButtons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.headerIconBtn {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
}
.headerIconBtn:hover { background: #1a1a1a; }

.btnUpload {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--ph-orange);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 4px;
  white-space: nowrap;
}
.btnUpload:hover { background: var(--ph-orange-hover); }

/* ========== MAIN LAYOUT ========== */
#main {
  display: flex;
  flex: 1;
  min-height: 0;
}

.menuWrapper.leftMenu {
  width: var(--ph-sidebar-w);
  flex-shrink: 0;
  background: var(--ph-menu-bg);
  border-right: 1px solid var(--ph-line);
  padding: 8px 0 24px;
  position: sticky;
  top: var(--ph-header-h);
  height: calc(100vh - var(--ph-header-h));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.menuLink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 20px;
  font-size: 12px;
  font-weight: 700;
  color: #ddd;
  transition: background .15s;
}
.menuLink:hover { background: #1a1a1a; color: #fff; }
.menuLink.active { color: var(--ph-orange); }

.menuIconBox {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: .9;
}

.menuDivider {
  height: 1px;
  background: #222;
  margin: 8px 16px;
}

.pageWrapper {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 40px;
}

.pageTitle {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #fff;
}

.filterRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filterChip {
  padding: 6px 14px;
  border-radius: 3px;
  background: #222;
  color: #ccc;
  font-size: 12px;
  font-weight: 700;
}
.filterChip:hover { background: #333; color: #fff; }
.filterChip.active { background: var(--ph-orange); color: #000; }

/* ========== VIDEO GRID ========== */
ul.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px 14px;
}

.pcVideoListItem {
  cursor: pointer;
}

.pcVideoListItem .wrap { display: block; }

.phimage {
  position: relative;
  background: #111;
  overflow: hidden;
  border-radius: 0;
}

.phimage::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.phimage img,
.phimage .thumb-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phimage .linkVideoThumb { display: block; position: absolute; inset: 0; }

.duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 2px;
  line-height: 1.3;
}

.hd-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0,0,0,.78);
  color: var(--ph-orange);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 2px;
}

.addInfo { padding: 8px 2px 0; }

.addInfo .title a,
.addInfo .title span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: #fff;
}
.pcVideoListItem:hover .addInfo .title a { color: var(--ph-orange); }

.videoUploaderBlock { margin-top: 4px; }
.videoUploaderBlock a,
.videoUploaderBlock span {
  font-size: 12px;
  color: var(--ph-muted);
}
.videoUploaderBlock a:hover { color: #fff; text-decoration: underline; }

.videoDetailsBlock {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ph-muted2);
}
.videoDetailsBlock var { font-style: normal; }

.load-more {
  text-align: center;
  padding: 28px 16px;
  color: var(--ph-muted);
  font-size: 13px;
}

/* ========== WATCH PAGE ========== */
#watchView { padding-top: 4px; }

.watch-top {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #000;
  border-bottom: 1px solid var(--ph-header-border);
  position: sticky;
  top: 0;
  z-index: 101;
}
.watch-top.show { display: flex; }

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.playerWrap {
  background: #000;
  position: relative;
}
.playerWrap::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.playerWrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.watchTitle {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 14px 0 8px;
}

.watchMetaRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ph-muted);
  font-size: 13px;
}
.watchMetaRow var { font-style: normal; color: #fff; }

.watchActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.actionBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #222;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #ddd;
}
.actionBtn:hover { background: #333; }
.actionBtn.orange { background: var(--ph-orange); color: #000; }
.actionBtn.orange:hover { background: var(--ph-orange-hover); }

.uploaderRow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--ph-line);
  border-bottom: 1px solid var(--ph-line);
  margin-bottom: 14px;
}
.uploaderAvatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #666);
  flex-shrink: 0;
}
.uploaderName { font-size: 14px; font-weight: 700; }
.uploaderSub { font-size: 12px; color: var(--ph-muted); margin-top: 2px; }
.btnSubscribe {
  margin-left: auto;
  background: var(--ph-orange);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  padding: 9px 18px;
  border-radius: 4px;
}
.btnSubscribe:hover { background: var(--ph-orange-hover); }

.tagsRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.tagLink {
  background: #222;
  color: #ccc;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 3px;
}
.tagLink:hover { background: #333; color: #fff; }

.relatedTitle {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ph-line);
}

.relatedItem {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.relatedItem:hover .relatedName { color: var(--ph-orange); }

.relatedThumb {
  width: 168px;
  min-width: 168px;
  aspect-ratio: 16/9;
  background: #111;
  position: relative;
  overflow: hidden;
}
.relatedThumb img { width: 100%; height: 100%; object-fit: cover; }
.relatedThumb .duration { font-size: 10px; }

.relatedName {
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.relatedSub { font-size: 11px; color: var(--ph-muted); margin-top: 4px; }

/* ========== FOOTER ========== */
#footer {
  background: #0a0a0a;
  border-top: 1px solid var(--ph-line);
  padding: 28px 20px;
  margin-top: auto;
}
.footerGrid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
}
.footerCol h4 {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footerCol a {
  display: block;
  font-size: 12px;
  color: var(--ph-muted);
  padding: 3px 0;
}
.footerCol a:hover { color: var(--ph-orange); }
.footerBottom {
  max-width: 1200px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid #222;
  font-size: 11px;
  color: #666;
  text-align: center;
}

.hidden { display: none !important; }

body.watch-mode #header,
body.watch-mode #leftNav,
body.watch-mode #footer,
body.watch-mode #homeView { display: none !important; }
body.watch-mode #watchView { display: block !important; }

/* ========== MOBILE ========== */
@media (max-width: 960px) {
  :root { --ph-header-h: 56px; }

  .menuWrapper.leftMenu { display: none; }
  .headerSearchWrapper { display: none; }
  .btnUpload { display: none; }
  .orientationMenuWrap { display: none; }

  .pageWrapper { padding: 12px 10px 32px; }
  ul.videos { grid-template-columns: 1fr; gap: 0; }
  .pcVideoListItem { border-bottom: 1px solid var(--ph-line); padding-bottom: 12px; margin-bottom: 12px; }
  .watch-layout { grid-template-columns: 1fr; }
  .relatedThumb { width: 140px; min-width: 140px; }
}

@media (min-width: 961px) {
  body.sidebar-collapsed .menuWrapper.leftMenu { display: none; }
  body.sidebar-collapsed .pageWrapper { padding-left: 28px; }
}
