/* noSmartLG Sovereign Media Hub Design System (NetCast 4.0 / WebKit 534) */
/* Obsidian 10-Foot UI Cinema Style: Zero-Blur 60 FPS Hardware Composited Focus */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
}

body.tv-body {
  background-color: #080b11;
  color: #f1f5f9;
  font-family: "Tiresias Screenfont", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Dynamic Ambient Backdrop Layer (Lightweight Server-Oriented, Zero CSS Blur) */
.ambient-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  opacity: 0.07;
  z-index: 1;
  -webkit-transition: opacity 0.6s ease-in-out;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.ambient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: -webkit-radial-gradient(center, ellipse cover, rgba(8,11,17,0.5) 0%, rgba(8,11,17,0.95) 80%, #080b11 100%);
  background: radial-gradient(ellipse at center, rgba(8,11,17,0.5) 0%, rgba(8,11,17,0.95) 80%, #080b11 100%);
  z-index: 2;
  pointer-events: none;
}

/* Header & Navigation */
.tv-header {
  position: relative;
  z-index: 10;
  height: 74px;
  background-color: #080b11;
  border-bottom: 2px solid #00f0ff;
  display: block;
  padding: 12px 28px;
}

.logo {
  float: left;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  line-height: 48px;
  margin-right: 32px;
}

.logo span {
  color: #00f0ff;
}

.logo small {
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #38bdf8;
  margin-left: 8px;
  background-color: rgba(56, 189, 248, 0.15);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.nav-bar {
  float: left;
  line-height: 48px;
}

.nav-item {
  display: inline-block;
  padding: 0 18px;
  font-size: 18px;
  font-weight: bold;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 8px;
  margin-right: 6px;
  border: 2px solid transparent;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.nav-item.active {
  color: #00f0ff;
  background-color: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.5);
}

.nav-item.focused,
.nav-item:hover {
  background-color: #00f0ff;
  color: #080b11;
  border-color: #00f0ff;
}

.system-hud {
  float: right;
  line-height: 48px;
}

.hud-pill {
  font-size: 13px;
  font-weight: bold;
  color: #00f0ff;
  background-color: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 5px 12px;
  border-radius: 14px;
  margin-right: 14px;
}

.hud-clock {
  font-size: 20px;
  font-weight: bold;
  color: #e2e8f0;
  letter-spacing: 1px;
}

/* Main Content Area */
.tv-main {
  position: relative;
  z-index: 5;
  height: calc(100vh - 110px);
  padding: 24px 36px;
  overflow-y: auto;
}

.section-header {
  margin-bottom: 20px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  display: inline-block;
  margin-right: 16px;
}

.section-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  vertical-align: middle;
}

/* Search Panel */
.search-panel {
  background-color: #0d1424;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.search-input-wrap {
  margin-bottom: 14px;
}

.search-input {
  width: 60%;
  padding: 12px 18px;
  font-size: 18px;
  color: #ffffff;
  background-color: #080b11;
  border: 2px solid #334155;
  border-radius: 8px;
  margin-right: 10px;
  vertical-align: middle;
}

.search-input:focus {
  border-color: #00f0ff;
}

.search-btn {
  padding: 12px 20px;
  font-size: 18px;
  font-weight: bold;
  background-color: #1e293b;
  color: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 8px;
  vertical-align: middle;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.search-btn.focused,
.search-btn:hover {
  background-color: #00f0ff;
  color: #080b11;
  border-color: #00f0ff;
}

.quick-tags {
  margin-bottom: 16px;
}

.tag-label {
  font-size: 14px;
  color: #94a3b8;
  margin-right: 10px;
}

.tag-chip {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: bold;
  background-color: #111c33;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  cursor: pointer;
  margin-right: 8px;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.tag-chip.focused,
.tag-chip:hover {
  background-color: #38bdf8;
  color: #080b11;
  border-color: #38bdf8;
}

/* Virtual Keyboard */
.virtual-keyboard {
  text-align: center;
  padding: 10px 0;
}

.kb-row {
  margin-bottom: 6px;
}

.kb-key {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 36px;
  padding: 0 6px;
  margin: 0 3px;
  font-size: 15px;
  font-weight: bold;
  color: #f1f5f9;
  background-color: #111c33;
  border: 1px solid #1e293b;
  border-radius: 6px;
  cursor: pointer;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.kb-key.wide {
  min-width: 70px;
}

.kb-key.space {
  min-width: 220px;
}

.kb-key.focused,
.kb-key:hover {
  background-color: #00f0ff;
  color: #080b11;
  border-color: #00f0ff;
}

/* Grid & Cards (Quantized 12-16 items memory virtualization) */
.grid-container {
  width: 100%;
}

.loading-spinner {
  font-size: 22px;
  color: #00f0ff;
  padding: 40px;
  text-align: center;
}

/* Zero-Blur High-Contrast Focus Card */
.card {
  display: inline-block;
  vertical-align: top;
  width: 23%;
  margin: 0 1% 25px 1%;
  background-color: #111827;
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid #1f2937;
  cursor: pointer;
  position: relative;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.card.focused,
.card:hover {
  border-color: #00f0ff;
  background-color: #1e293b;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  z-index: 10;
}

.poster-wrap {
  position: relative;
  width: 100%;
  height: 270px;
  background-color: #0d1117;
  text-align: center;
  overflow: hidden;
}

.poster-img {
  width: 100%;
  height: 270px;
  display: block;
  object-fit: cover;
}

.poster-placeholder {
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 270px;
  color: #93c5fd;
  background-color: #111827;
  text-align: center;
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(8, 11, 17, 0.95);
  color: #00f0ff;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(0, 240, 255, 0.5);
  letter-spacing: 0.5px;
}

.card-meta {
  padding: 14px 16px;
}

.card-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 25px;
  letter-spacing: 0.2px;
}

.card-sub {
  font-size: 16px;
  font-weight: 500;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 22px;
}

/* DOM Quantization Pagination Bar */
.pagination-bar {
  text-align: center;
  padding: 18px 0 28px 0;
  margin-top: 10px;
  width: 100%;
}

.page-btn {
  display: inline-block;
  padding: 12px 26px;
  font-size: 18px;
  font-weight: bold;
  background-color: #111c33;
  color: #f1f5f9;
  border: 3px solid #1e293b;
  border-radius: 8px;
  cursor: pointer;
  margin: 0 14px;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.page-btn.focused,
.page-btn:hover {
  background-color: #00f0ff;
  color: #080b11;
  border-color: #00f0ff;
}

.page-info {
  display: inline-block;
  font-size: 18px;
  font-weight: bold;
  color: #93c5fd;
  margin: 0 14px;
  vertical-align: middle;
}

/* Cinematic Movie Detail Modal (Zero-Blur Obsidian Style) */
.detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 11, 17, 0.94);
  z-index: 1000;
  text-align: center;
  padding-top: 35px;
}

.detail-card {
  display: inline-block;
  width: 900px;
  max-width: 94%;
  background-color: #111827;
  border: 3px solid #00f0ff;
  border-radius: 14px;
  text-align: left;
  overflow: hidden;
  position: relative;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.detail-backdrop-header {
  position: relative;
  width: 100%;
  height: 260px;
  background-size: cover;
  background-position: center center;
  background-color: #111c33;
}

.detail-backdrop-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: -webkit-linear-gradient(bottom, #080b11 0%, rgba(8, 11, 17, 0.5) 60%, rgba(8, 11, 17, 0.2) 100%);
  background: linear-gradient(to top, #080b11 0%, rgba(8, 11, 17, 0.5) 60%, rgba(8, 11, 17, 0.2) 100%);
}

.detail-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background-color: rgba(8, 11, 17, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 22px;
  color: #ffffff;
  cursor: pointer;
  z-index: 10;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.detail-close-btn.focused,
.detail-close-btn:hover {
  background-color: #ff3366;
  border-color: #ffffff;
}

.detail-content {
  padding: 0 28px 28px 28px;
  position: relative;
  margin-top: -60px;
}

.detail-poster-wrap {
  float: left;
  width: 160px;
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: #111c33;
  margin-right: 24px;
}

.detail-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info {
  margin-left: 184px;
}

.detail-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.detail-meta {
  font-size: 17px;
  color: #93c5fd;
  font-weight: bold;
  margin-bottom: 12px;
}

.detail-overview {
  font-size: 16px;
  line-height: 1.5;
  color: #cbd5e1;
  max-height: 100px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.detail-actions {
  margin-top: 14px;
}

.detail-btn {
  padding: 12px 24px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  margin-right: 12px;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.detail-btn.btn-play {
  background-color: #00f0ff;
  color: #080b11;
}

.detail-btn.btn-play.focused,
.detail-btn.btn-play:hover {
  background-color: #ffffff;
  border-color: #00f0ff;
}

.detail-btn.btn-transcode {
  background-color: #1e293b;
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.detail-btn.btn-transcode.focused,
.detail-btn.btn-transcode:hover {
  background-color: #38bdf8;
  color: #080b11;
  border-color: #ffffff;
}

.detail-btn.btn-back {
  background-color: transparent;
  color: #94a3b8;
  border-color: #334155;
}

.detail-btn.btn-back.focused,
.detail-btn.btn-back:hover {
  color: #ffffff;
  border-color: #ffffff;
}

/* Modal Episodes / Streams Selector */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(8, 11, 17, 0.92);
  z-index: 1500;
  text-align: center;
  padding-top: 50px;
}

.modal-card {
  display: inline-block;
  width: 720px;
  max-width: 90%;
  background-color: #111827;
  border: 3px solid #00f0ff;
  border-radius: 14px;
  text-align: left;
  overflow: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.modal-header {
  padding: 18px 24px;
  background-color: #1f2937;
  border-bottom: 1px solid #374151;
  position: relative;
}

.modal-title {
  font-size: 22px;
  font-weight: bold;
  color: #ffffff;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 20px;
  background-color: transparent;
  border: none;
  font-size: 26px;
  color: #94a3b8;
  cursor: pointer;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.modal-close.focused,
.modal-close:hover {
  color: #ff3366;
}

.modal-body {
  padding: 20px 24px;
  max-height: 480px;
  overflow-y: auto;
}

.modal-item {
  display: block;
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 10px;
  background-color: #1f2937;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.modal-item.focused,
.modal-item:hover {
  border-color: #00f0ff;
  background-color: #374151;
  color: #ffffff;
}

.modal-item-sub {
  font-size: 15px;
  color: #93c5fd;
  margin-top: 3px;
}

/* Fullscreen Video Player & Cinema HUD */
.player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  z-index: 2000;
}

.tv-player {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #000000;
}

.cinema-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.cinema-hud.visible {
  opacity: 1;
  pointer-events: auto;
}

.cinema-hud.hidden {
  opacity: 0;
  pointer-events: none;
}

.hud-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 36px;
  background: -webkit-linear-gradient(top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
}

.hud-player-title {
  float: left;
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
}

.hud-player-clock {
  float: right;
  font-size: 22px;
  font-weight: bold;
  color: #00f0ff;
}

.hud-center-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  font-size: 40px;
  font-weight: 900;
  color: #00f0ff;
  background-color: rgba(8, 11, 17, 0.85);
  padding: 16px 28px;
  border-radius: 14px;
  border: 3px solid #00f0ff;
  display: none;
}

.hud-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 40px 20px 40px;
  background: -webkit-linear-gradient(bottom, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 70%, rgba(0,0,0,0) 100%);
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 70%, rgba(0,0,0,0) 100%);
}

.hud-progress-wrap {
  position: relative;
  width: 100%;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  margin-bottom: 12px;
  cursor: pointer;
}

.hud-buffer-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 5px;
}

.hud-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background-color: #00f0ff;
  border-radius: 5px;
}

.hud-thumb {
  position: absolute;
  top: -4px;
  left: 0%;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border: 2px solid #00f0ff;
  border-radius: 50%;
  margin-left: -9px;
}

.hud-time-row {
  margin-bottom: 14px;
}

.hud-cur-time {
  float: left;
  font-size: 16px;
  font-weight: bold;
  color: #00f0ff;
}

.hud-dur-time {
  float: right;
  font-size: 16px;
  font-weight: bold;
  color: #94a3b8;
}

.hud-controls-row {
  clear: both;
  text-align: center;
  margin-bottom: 10px;
}

.hud-btn {
  display: inline-block;
  padding: 10px 18px;
  margin: 0 5px;
  font-size: 16px;
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.hud-btn.hud-btn-main {
  background-color: #00f0ff;
  color: #080b11;
  padding: 10px 26px;
  font-size: 18px;
}

.hud-btn.hud-btn-close {
  background-color: rgba(255, 51, 102, 0.2);
  color: #ff3366;
  border-color: rgba(255, 51, 102, 0.4);
}

.hud-btn.focused,
.hud-btn:hover {
  border-color: #00f0ff;
  background-color: #00f0ff;
  color: #080b11;
}

.hud-hints {
  font-size: 15px;
  font-weight: 500;
  color: #cbd5e1;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Status Bar */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background-color: #080b11;
  border-top: 1px solid #1f2937;
  padding: 0 24px;
  line-height: 36px;
  font-size: 14px;
  font-weight: 500;
  color: #93c5fd;
  z-index: 100;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
