:root {
  --vn-bg: #000000;
  --vn-panel: rgba(16, 18, 23, 0.88);
  --vn-card: rgba(255, 255, 255, 0.045);
  --vn-card-hover: rgba(255, 255, 255, 0.08);
  --vn-border: rgba(255, 255, 255, 0.09);
  --vn-lime: #dbee00;
  --vn-green: #8ed462;
  --vn-blue: #4082d7;
  --vn-text: #ffffff;
  --vn-muted: #9daabd;
  --vn-danger: #ff3b30;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--vn-bg);
  color: var(--vn-text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Ambient radial glows from gestaovenellontech site.css */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(42px);
}

body::before {
  top: -12rem;
  right: -8rem;
  width: 38rem;
  height: 38rem;
  background: radial-gradient(circle, rgba(219, 238, 0, 0.2) 0%, rgba(219, 238, 0, 0.04) 42%, transparent 72%);
}

body::after {
  bottom: -10rem;
  left: -8rem;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgba(64, 130, 215, 0.22) 0%, rgba(64, 130, 215, 0.05) 40%, transparent 72%);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  padding: 24px 36px;
  gap: 20px;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--vn-panel);
  border: 1px solid var(--vn-border);
  border-radius: 18px;
  padding: 14px 24px;
  backdrop-filter: blur(18px);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  height: 34px;
  width: auto;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(219, 238, 0, 0.12);
  border: 1px solid rgba(219, 238, 0, 0.35);
  color: var(--vn-lime);
  font-weight: 600;
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--vn-muted);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn.active {
  background: rgba(219, 238, 0, 0.14);
  color: var(--vn-lime);
  border-color: rgba(219, 238, 0, 0.4);
}

.focusable:focus,
.focusable.tv-focused {
  outline: none;
  border-color: var(--vn-lime) !important;
  box-shadow: 0 0 0 3px rgba(219, 238, 0, 0.32), 0 12px 28px rgba(0, 0, 0, 0.6) !important;
  transform: scale(1.02);
}

.status-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.pairing-pill {
  background: rgba(142, 212, 98, 0.12);
  border: 1px solid rgba(142, 212, 98, 0.35);
  color: var(--vn-green);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.clock-text {
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
}

/* Main View Container */
.view-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.view-section {
  display: none;
  width: 100%;
  height: 100%;
  gap: 20px;
}

.view-section.active {
  display: flex;
}

/* 1. Cockpit Home View */
.cockpit-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
  width: 100%;
  height: 100%;
}

.hero-panel {
  background: linear-gradient(145deg, rgba(20, 24, 33, 0.92), rgba(10, 12, 16, 0.95));
  border: 1px solid var(--vn-border);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vn-lime);
  margin-bottom: 12px;
  display: block;
}

.hero-headline {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-desc {
  color: var(--vn-muted);
  font-size: 16px;
  line-height: 1.5;
  max-width: 52ch;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.kpi-box {
  background: var(--vn-card);
  border: 1px solid var(--vn-border);
  border-radius: 16px;
  padding: 16px;
}

.kpi-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--vn-lime);
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vn-muted);
  margin-top: 4px;
}

.quick-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.tile-card {
  background: var(--vn-panel);
  border: 1px solid var(--vn-border);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--vn-text);
}

.tile-card:hover {
  background: var(--vn-card-hover);
}

.tile-card.primary-tile {
  background: linear-gradient(135deg, rgba(219, 238, 0, 0.16) 0%, rgba(142, 212, 98, 0.08) 100%);
  border-color: rgba(219, 238, 0, 0.38);
}

.tile-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.tile-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.tile-sub {
  font-size: 13px;
  color: var(--vn-muted);
}

/* 2. Live TV Layout */
.live-layout {
  display: grid;
  grid-template-columns: 240px 340px 1fr;
  gap: 18px;
  width: 100%;
  height: 100%;
}

.panel-col {
  background: var(--vn-panel);
  border: 1px solid var(--vn-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--vn-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vn-lime);
}

.scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-item, .channel-item {
  background: var(--vn-card);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--vn-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 14px;
  transition: all 0.15s;
}

.cat-item.active, .channel-item.active {
  background: rgba(219, 238, 0, 0.14);
  border-color: rgba(219, 238, 0, 0.45);
  color: var(--vn-lime);
  font-weight: 600;
}

.channel-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.channel-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #111318;
  padding: 4px;
  flex-shrink: 0;
}

.channel-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Player Stage */
.player-stage {
  background: #050608;
  border: 1px solid var(--vn-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.video-wrapper {
  position: relative;
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

video#mainVideoPlayer {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-info-bar {
  padding: 18px 22px;
  background: var(--vn-panel);
  border-top: 1px solid var(--vn-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* VOD / Series Grid */
.vod-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  width: 100%;
  height: 100%;
}

.poster-grid {
  padding: 16px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  align-content: start;
}

.poster-card {
  background: var(--vn-card);
  border: 1px solid var(--vn-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-align: left;
  color: #fff;
  transition: all 0.18s;
}

.poster-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: #10131a;
}

.poster-body {
  padding: 12px;
}

.poster-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.poster-cat {
  font-size: 11px;
  color: var(--vn-lime);
  font-family: var(--font-mono);
}

/* QR Code Sync View */
.qr-sync-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  width: 100%;
  height: 100%;
}

.qr-card {
  background: var(--vn-panel);
  border: 1px solid var(--vn-border);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.qr-box {
  width: 240px;
  height: 240px;
  background: #0b0e14;
  border: 2px solid var(--vn-lime);
  border-radius: 20px;
  padding: 12px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box svg {
  width: 100%;
  height: 100%;
}

.code-badge-large {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--vn-lime);
  background: rgba(219, 238, 0, 0.1);
  border: 1px solid rgba(219, 238, 0, 0.35);
  padding: 8px 22px;
  border-radius: 14px;
  margin: 8px 0;
}

.btn-action {
  background: linear-gradient(135deg, var(--vn-lime) 0%, var(--vn-green) 100%);
  color: #090b0e;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid var(--vn-border);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.input-tv {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--vn-border);
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
}

/* Toast Notification */
.tv-toast {
  position: fixed;
  bottom: 28px;
  right: 36px;
  background: rgba(15, 18, 24, 0.96);
  border: 2px solid var(--vn-lime);
  color: #fff;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  display: none;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

