/*
Theme Name: OnLive TV Pro
Theme URI: https://github.com/onlivetv/pro
Author: DeepMind Antigravity AI
Author URI: https://google.com
Description: Ultimate WordPress Theme for Live TV Streams, Scraped IPTV Channels, Movies, Live Sports, Korean/Chinese Dramas, Documentaries, and History with automated link health tester and cleanup engine.
Version: 1.0.0
Text Domain: onlive-tv
License: GNU General Public License v2 or later
*/

:root {
  --bg-primary: #0a0c10;
  --bg-secondary: #12161f;
  --bg-card: #181e2a;
  --bg-card-hover: #202738;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-neon-green: #00ff88;
  --accent-red: #ff3b30;
  --accent-purple: #9d4edd;
  --text-main: #f0f3f8;
  --text-muted: #8c9ba5;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(18, 22, 31, 0.85);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #fff;
}

/* Container */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.site-logo span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-logo .live-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-search {
  flex: 1;
  max-width: 450px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.nav-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.main-nav a {
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav li.active a {
  color: var(--accent-cyan);
}

/* Hero Slider */
.hero-slider-section {
  padding: 30px 0 40px;
}

.slider-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: var(--bg-secondary);
  min-height: 420px;
}

.slide-item {
  display: none;
  position: relative;
  width: 100%;
  min-height: 420px;
  background-size: cover;
  background-position: center;
}

.slide-item.active {
  display: flex;
  align-items: flex-end;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(10, 12, 16, 0.98) 0%, rgba(10, 12, 16, 0.5) 50%, rgba(10, 12, 16, 0.2) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  max-width: 650px;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 59, 48, 0.2);
  border: 1px solid var(--accent-red);
  color: #ff5252;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.slide-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #fff;
}

.slide-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.slide-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-play-slide {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 242, 254, 0.4);
  transition: var(--transition);
}

.btn-play-slide:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 242, 254, 0.6);
  color: #000;
}

.slider-controls {
  position: absolute;
  bottom: 20px;
  right: 30px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.btn-slide-prev, .btn-slide-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.btn-slide-prev:hover, .btn-slide-next:hover {
  background: var(--accent-cyan);
  color: #000;
}

/* Alphabet Filter Bar */
.alphabet-filter-section {
  padding: 15px 0 35px;
}

.alphabet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.alphabet-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 10px;
}

.alphabet-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.alphabet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.alphabet-btn:hover,
.alphabet-btn.active {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

/* Category Block */
.category-block {
  margin-bottom: 50px;
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.block-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

.block-title-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
}

.view-all-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.view-all-link:hover {
  color: var(--accent-cyan);
}

/* Cards Grid - 10 Cards per category block */
.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.tv-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.tv-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

.card-poster {
  position: relative;
  width: 100%;
  padding-top: 130%; /* 4:3 / 16:9 box aspect */
  background-color: #0b0e14;
  overflow: hidden;
}

.card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.tv-card:hover .card-poster img {
  transform: scale(1.08);
}

.card-live-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 136, 0.4);
  color: var(--accent-neon-green);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-live-tag .dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-neon-green);
  border-radius: 50%;
  animation: pulse 1.2s infinite;
}

.card-play-hover {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.tv-card:hover .card-play-hover {
  opacity: 1;
}

.play-icon-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.6);
  transform: scale(0.8);
  transition: var(--transition);
}

.tv-card:hover .play-icon-btn {
  transform: scale(1);
}

.card-details {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-quality {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-weight: 600;
}

/* Modal Player */
.modal-player-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-player-overlay.active {
  display: flex;
}

.modal-player-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.modal-channel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-close-modal:hover {
  color: var(--accent-red);
}

.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Ratio */
  background: #000;
}

.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  outline: none;
}

.player-info-bar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 400px;
  margin-top: 10px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .nav-search { order: 3; max-width: 100%; }
  .slide-title { font-size: 1.5rem; }
  .tv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .slide-content { padding: 20px; }
}
