/*
Theme Name: TubeDark
Description: Pornhub-style dark video tube. Homepage inline short player, likes, categories, round cards.
Version: 1.1.0
*/

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

body {
  background: #0a0a0a;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  min-height: 100vh;
}

a { color: #ff9900; text-decoration: none; }
a:hover { color: #ffbb33; }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: #111;
  border-bottom: 2px solid #ff9900;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-size: 26px;
  font-weight: bold;
  color: #ff9900;
}
.site-logo span { color: #fff; }

/* Category bar */
.category-bar {
  background: #151515;
  border-bottom: 1px solid #222;
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
}
.category-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  gap: 8px;
}
.category-bar a {
  display: inline-block;
  background: #222;
  color: #ccc;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
}
.category-bar a:hover,
.category-bar a.active {
  background: #ff9900;
  color: #000;
}

/* Main */
.site-main {
  max-width: 1200px;
  margin: 16px auto;
  padding: 0 12px;
}
.page-title {
  font-size: 20px;
  color: #ff9900;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #222;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.video-card {
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s;
  position: relative;
}
.video-card:hover {
  transform: translateY(-2px);
  /* reduced glow */
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.15);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  overflow: hidden;
  border-radius: 10px 10px 0 0;
}
.video-thumb img,
.video-thumb video {
  width: 100%;
  height: 100%;
  object-fit: fill; /* stretch / compress to fit – no zoom out */
  display: block;
}
.video-thumb .duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 3px;
  z-index: 2;
}
.video-thumb .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;          /* smaller */
  height: 36px;
  background: rgba(255,153,0,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.2s;
}
.video-card:hover .play-icon { opacity: 1; }
.play-icon::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 11px solid #000;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 2px;
}

/* When video is playing inside thumb */
.video-thumb.playing .play-icon { display: none; }
.video-thumb.playing img { display: none; }

.video-info {
  padding: 8px 10px 10px;
}
.video-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  min-height: 34px;
}
.video-meta {
  font-size: 11px;
  color: #999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.video-views { color: #ff9900; }
.video-likes { color: #ff6b6b; }
.video-likes::before { content: '♥ '; }

/* Homepage overlay (black fade after short play) */
.home-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10;
  border-radius: 10px;
  cursor: pointer;
}
.home-overlay.show { display: flex; }
.home-overlay h3 {
  color: #ff9900;
  font-size: 16px;
  margin-bottom: 10px;
  text-align: center;
}
.home-overlay .watch-btn {
  background: #ff9900;
  color: #000;
  border: none;
  padding: 8px 18px;
  border-radius: 5px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-block;
  padding: 7px 12px;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 13px;
}
.pagination a:hover {
  background: #ff9900;
  color: #000;
  border-color: #ff9900;
}
.pagination .current {
  background: #ff9900;
  color: #000;
  border-color: #ff9900;
  font-weight: bold;
}
.next-page-btn {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 16px auto;
  text-align: center;
  background: linear-gradient(180deg, #ff9900, #e68a00);
  color: #000;
  font-size: 16px;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 6px;
  text-decoration: none;
}
.next-page-btn:hover {
  background: linear-gradient(180deg, #ffbb33, #ff9900);
  color: #000;
}

/* Single (kept simple if someone opens direct link) */
.single-video-wrap { max-width: 900px; margin: 0 auto; }
.video-player-box {
  position: relative;
  background: #000;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}
#teaser-video { width:100%; height:100%; display:block; background:#000; }
.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a1a1a;
  padding: 8px 12px;
  border-top: 1px solid #333;
}
.ctrl-btn {
  background: #333;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.ctrl-btn:hover { background: #ff9900; color: #000; }
.speed-select {
  background: #333;
  color: #fff;
  border: 1px solid #555;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 12px;
}
.time-display { color: #ccc; font-size: 12px; margin-left: auto; }

.watch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  cursor: pointer;
}
.watch-overlay.show { display: flex; }
.watch-overlay h2 { font-size: 28px; color: #ff9900; margin-bottom: 16px; }
.watch-full-btn {
  background: #ff9900;
  color: #000;
  font-size: 18px;
  font-weight: bold;
  padding: 14px 32px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.video-details {
  margin-top: 16px;
  background: #111;
  padding: 16px;
  border-radius: 8px;
}
.video-details h1 { font-size: 20px; margin-bottom: 8px; }
.video-stats { color: #aaa; font-size: 13px; margin-bottom: 12px; }
.video-stats .views, .video-stats .likes { color: #ff9900; font-weight: bold; }

/* Footer */
.site-footer {
  background: #0d0d0d;
  border-top: 1px solid #222;
  padding: 20px 12px;
  text-align: center;
  color: #666;
  font-size: 12px;
  margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .site-logo { font-size: 22px; }
  .video-thumb .play-icon { width: 32px; height: 32px; }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
