/*
Theme Name: ViralTime Player
Theme URI: https://play.jcmvideo.com
Author: Jaison
Description: Tema simple para posts tipo video landing con imagen destacada, botón play, video y direct link opcional.
Version: 1.0.0
Requires at least: 6.0
Text Domain: viraltime-player
*/

html, body {
  margin: 0;
  padding: 0;
  background: #000;
}

body.single-post {
  background: #000;
}

.vt-page {
  min-height: 100vh;
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vt-wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #000;
  position: relative;
}

.vt-preview,
.vt-video-box {
  width: 100%;
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.vt-preview img,
.vt-video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.vt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vt-play-circle {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 30px rgba(0,0,0,.45);
  transition: transform .2s ease;
}

.vt-play:hover .vt-play-circle {
  transform: scale(1.06);
}

.vt-triangle {
  width: 0;
  height: 0;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 34px solid #000;
  margin-left: 8px;
}

.vt-touch-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #fff;
  font-family: Arial, sans-serif;
  z-index: 8;
}

.vt-touch-overlay.show {
  display: flex;
}

.vt-touch-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 3px solid rgba(255,80,80,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.vt-touch-icon span {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #3898d8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vt-touch-icon span:before {
  content: "";
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid #fff;
  margin-left: 6px;
}

.vt-touch-text {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  padding: 0 20px;
}

.vt-hidden {
  display: none !important;
}
/* Fullscreen video mode */
.vt-video-box {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: #000 !important;
  z-index: 9999;
}

.vt-video-box video {
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
  background: #000;
}

.vt-floating {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vt-float-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}

.vt-whatsapp { background: #25D366; }
.vt-facebook { background: #1877F2; }
.vt-telegram { background: #229ED9; }

.vt-admin-note {
  color: #fff;
  padding: 30px;
  font-family: Arial, sans-serif;
}

@media (max-width: 768px) {
  .vt-page {
    display: block;
  }

  .vt-wrap {
    max-width: none;
    width: 100vw;
    height: 100vh;
  }

  .vt-preview,
  .vt-video-box {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    position: fixed;
    inset: 0;
  }

  .vt-play-circle {
    width: 86px;
    height: 86px;
  }

  .vt-touch-text {
    font-size: 36px;
  }

  .vt-floating {
    right: 14px;
    bottom: 18px;
  }

  .vt-float-btn {
    width: 54px;
    height: 54px;
  }
}
/* Ajuste visual ViralTime */
.vt-page {
  background: #000 !important;
}

.vt-preview {
  max-height: 92vh;
}

.vt-preview img {
  object-fit: contain !important;
}

.vt-play-circle {
  background: rgba(255,255,255,0.95);
}

@media (min-width: 769px) {
  .vt-wrap {
    max-width: 520px;
  }

  .vt-preview {
    aspect-ratio: 9 / 16;
  }

  .vt-video-box {
    aspect-ratio: 9 / 16;
  }
}

@media (max-width: 768px) {
  .vt-wrap,
  .vt-preview,
  .vt-video-box {
    width: 100vw !important;
    height: 100vh !important;
  }

  .vt-preview img,
  .vt-video-box video {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
  }
}
