/* ==========================================================================
   HPCOMTIK GLOBAL TV — Premium Design System v2.0
   ========================================================================== */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a28;
  --bg-card-hover: #222236;
  --bg-glass: rgba(26, 26, 40, 0.85);
  --text-primary: #f0f0f5;
  --text-secondary: #8888a0;
  --text-muted: #55556a;
  --accent: #6c5ce7;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --accent2: #00cec9;
  --accent3: #fd79a8;
  --success: #00b894;
  --danger: #e17055;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ======================== HEADER ======================== */
.header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #0d0d1a 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.brand-icon {
  font-size: 36px;
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px var(--accent-glow)); }
  50% { filter: drop-shadow(0 0 20px var(--accent-glow)); }
}

.brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-accent { color: var(--accent2); }

.brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.header-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.stat-item strong { color: var(--accent2); }

.header-nodes {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.node-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.node-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.node-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(0, 184, 148, 0.8);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.node-selector {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(0, 206, 201, 0.1) 100%);
  border: 1px solid rgba(108, 92, 231, 0.35);
  color: var(--accent2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.node-selector:focus {
  border-color: var(--accent2);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ======================== PLAYER ======================== */
.player-section {
  display: none;
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent);
}

.player-section.active { display: block; }

.player-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(108, 92, 231, 0.15);
}

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

.close-player-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.close-player-btn:hover { background: var(--danger); transform: scale(1.1); }

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.player-channel-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-card);
  border: 2px solid var(--border);
}

.player-channel-info h2 {
  font-size: 18px;
  font-weight: 700;
}

.player-channel-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stream-status {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(0, 184, 148, 0.1);
  border: 1px solid rgba(0, 184, 148, 0.3);
  color: var(--success);
}

.stream-selector {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
}

/* ======================== LIVE AI SUBTITLE OVERLAY ======================== */
.ai-subtitle-overlay {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 85%;
  background: rgba(8, 9, 14, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 22px;
  text-align: center;
  z-index: 25;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  animation: subtitle-fade-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes subtitle-fade-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.subtitle-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #00cec9;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pulse-dot-red {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 6px #ff4757;
  animation: pulse-dot 1.5s infinite;
}

.subtitle-text {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
  letter-spacing: 0.2px;
  transition: opacity 0.2s ease-in-out;
}

.btn-subtitle {
  background: rgba(253, 121, 168, 0.12);
  border: 1px solid rgba(253, 121, 168, 0.4);
  color: #fd79a8;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-subtitle:hover {
  background: rgba(253, 121, 168, 0.25);
  transform: translateY(-1px);
}

.btn-subtitle.active {
  background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  color: #ffffff;
  border-color: #fd79a8;
  box-shadow: 0 0 16px rgba(253, 121, 168, 0.4);
}

/* ======================== FILTERS ======================== */
.filters-section {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 65px;
  z-index: 90;
}

.filters-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 24px;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.search-box input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #7c5ce7 100%);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.search-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--accent-glow); }

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.filter-select:focus { border-color: var(--accent); }

.active-filters {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.filter-remove {
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
}

.filter-remove:hover { opacity: 1; }

.result-info {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ======================== CHANNELS GRID ======================== */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.channel-card:hover, .channel-card:focus {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(108, 92, 231, 0.2);
}

.card-logo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-logo img {
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: var(--transition);
}

.channel-card:hover .card-logo img { transform: scale(1.08); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(108, 92, 231, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.channel-card:hover .card-overlay { opacity: 1; }

.play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: var(--transition);
}

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

.card-info {
  padding: 14px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
}

.quality-badge {
  background: rgba(0, 206, 201, 0.15);
  color: var(--accent2);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 10px;
}

.cat-badge {
  background: rgba(253, 121, 168, 0.12);
  color: var(--accent3);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 10px;
}

/* ======================== PAGINATION ======================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 30px 0;
  flex-wrap: wrap;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ======================== EMPTY / LOADING ======================== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text-secondary); font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-spinner p { color: var(--text-secondary); font-size: 14px; }

/* ======================== ERROR TOAST ======================== */
.error-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--danger);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(225, 112, 85, 0.4);
}

.error-toast.show { transform: translateX(-50%) translateY(0); }

/* ======================== FOOTER ======================== */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer a {
  color: var(--accent2);
  text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

.footer p + p { margin-top: 6px; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .header-stats { width: 100%; overflow-x: auto; }
  .brand-name { font-size: 18px; }
  .channels-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-info { padding: 10px; }
  .card-title { font-size: 13px; }
  .filters-section { position: static; }
  .player-wrapper { padding: 12px; }
  .filter-select { min-width: 140px; }
}

@media (max-width: 480px) {
  .channels-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .search-box { flex-direction: column; }
  .search-btn { width: 100%; }
}

/* ======================== RADAR MODAL DUAL-CLOUD ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 820px;
  background: linear-gradient(135deg, #131320 0%, #1a1a2e 100%);
  border: 1px solid rgba(108, 92, 231, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(108, 92, 231, 0.2);
  overflow: hidden;
  animation: scaleUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.radar-sweep-icon {
  font-size: 32px;
  animation: radar-sweep 4s linear infinite;
  display: inline-block;
}

@keyframes radar-sweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-title h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-title p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--danger);
  transform: scale(1.1);
}

.modal-body {
  padding: 24px;
}

.servers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.server-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: var(--transition);
}

.server-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.server-card.jkt { border-top: 3px solid #ff4757; }
.server-card.usa { border-top: 3px solid #1e90ff; }
.server-card.edge { border-top: 3px solid #00cec9; }

.server-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
}

.server-flag { font-size: 24px; }
.server-card-head h4 { font-size: 14px; font-weight: 700; color: #fff; }
.server-card-head code { font-size: 11px; color: var(--text-muted); }

.server-status-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.server-status-tag.online {
  background: rgba(0, 184, 148, 0.15);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.4);
}

.server-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.server-metric:last-child { border-bottom: none; }
.metric-label { color: var(--text-secondary); }
.metric-value { font-weight: 600; color: #fff; text-align: right; }
.metric-value.green { color: var(--success); font-weight: 800; }
.metric-value.blue { color: #1e90ff; font-weight: 800; }
.metric-value.gold { color: #f1c40f; font-weight: 800; }

.modal-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.btn-ping {
  background: linear-gradient(135deg, var(--accent) 0%, #00cec9 100%);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-ping:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 206, 201, 0.35);
}

.refresh-spin.spinning {
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.last-ping-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== CHANNEL GROUP TABS ==================== */
.channel-group-tabs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.grp-tab {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.grp-tab:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.grp-tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, #00cec9 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* ==================== CINEMATIC THEATER CARD (403 ERROR OVERLAY) ==================== */
.cinematic-card {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(10, 10, 16, 0.92);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(241, 196, 15, 0.25);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8), 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: fadeInCinema 0.5s ease-out;
}

@keyframes fadeInCinema {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.cinematic-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.25);
  opacity: 0.6;
  z-index: 1;
}

.cinematic-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.25) 0%, rgba(241, 196, 15, 0.15) 50%, transparent 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.cinematic-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 780px;
  width: 100%;
}

.cinematic-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(241, 196, 15, 0.15);
  border: 1px solid rgba(241, 196, 15, 0.4);
  color: #f1c40f;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.pulse-dot-gold {
  width: 8px;
  height: 8px;
  background: #f1c40f;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #f1c40f;
  animation: pulseGold 1.5s infinite;
}

@keyframes pulseGold {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.cinematic-title {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.cinematic-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

.cinematic-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.btn-cinema-node {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  color: #fff;
}

.btn-cinema-node.usa {
  background: linear-gradient(135deg, #1e3799 0%, #0984e3 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cinema-node.jkt {
  background: linear-gradient(135deg, #b71540 0%, #e55039 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-cinema-node.probe {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-cinema-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.cinematic-recommendations {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.rec-title {
  font-size: 12px;
  color: var(--accent2);
  margin-bottom: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.rec-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.rec-card:hover {
  background: rgba(108, 92, 231, 0.18);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.rec-card img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

.rec-card-info h4 {
  font-size: 12px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.rec-card-info p {
  font-size: 10px;
  color: var(--success);
  font-weight: 600;
}

/* ==================== CARD PROBE BUTTON & BADGE ==================== */
.card-probe-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-probe-btn:hover {
  background: rgba(0, 206, 201, 0.2);
  color: #00cec9;
  border-color: #00cec9;
}

.status-badge-stream {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}

.status-badge-stream.ok {
  background: rgba(0, 184, 148, 0.2);
  color: var(--success);
  border: 1px solid rgba(0, 184, 148, 0.3);
}

.status-badge-stream.geoblock {
  background: rgba(241, 196, 15, 0.2);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

.status-badge-stream.fail {
  background: rgba(225, 112, 85, 0.2);
  color: var(--danger);
  border: 1px solid rgba(225, 112, 85, 0.3);
}

/* ======================== MEDIA MODE SWITCHER (TV VS RADIO) ======================== */
.media-mode-section {
  max-width: 1400px;
  margin: 18px auto 0;
  padding: 0 var(--spacing-lg);
}

.media-mode-inner {
  display: flex;
  gap: 14px;
  background: rgba(18, 19, 28, 0.7);
  backdrop-filter: blur(16px);
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.media-mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.media-mode-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.media-mode-tab.active {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(0, 206, 201, 0.15));
  border-color: rgba(108, 92, 231, 0.45);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.2);
}

.media-mode-tab .tab-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.media-mode-tab .tab-labels {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.media-mode-tab .tab-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.media-mode-tab .tab-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.media-mode-tab.active .tab-sub {
  color: rgba(255, 255, 255, 0.75);
}

.media-mode-tab .tab-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.8px;
}

.tab-badge.video {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.35);
}

.tab-badge.audio {
  background: rgba(0, 206, 201, 0.2);
  color: #00cec9;
  border: 1px solid rgba(0, 206, 201, 0.35);
}

.media-mode-tab.tab-tv1.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.15));
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

/* ======================== TV ECOSYSTEM PILLS SWITCHER ======================== */
.tv-ecosystem-pills {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(18, 19, 28, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.eco-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.eco-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.eco-pill.btn-eco-tv1:hover, .eco-pill.btn-eco-tv1.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.eco-pill.btn-eco-tv2:hover, .eco-pill.btn-eco-tv2.active {
  background: rgba(108, 92, 231, 0.2);
  border-color: rgba(108, 92, 231, 0.45);
  color: #a29bfe;
}

.eco-pill.btn-eco-portal:hover, .eco-pill.btn-eco-portal.active {
  background: rgba(243, 156, 18, 0.18);
  border-color: rgba(243, 156, 18, 0.4);
  color: #f39c12;
}

/* ======================== RADIO AUDIO VISUALIZER ======================== */
.radio-visualizer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #1b162f 0%, #0a0a10 75%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  gap: 20px;
}

.radio-disc-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
}

.radio-vinyl {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #111, #111 4px, #222 5px, #111 6px);
  border: 4px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(108, 92, 231, 0.3);
  animation: vinyl-spin 6s linear infinite;
}

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radio-center-logo {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid #ff7675;
  background: #000;
  object-fit: cover;
}

.radio-waves {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 38px;
}

.wave-bar {
  width: 4px;
  background: linear-gradient(to top, #6c5ce7, #00cec9);
  border-radius: 3px;
  animation: wave-pulse 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; height: 18px; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; height: 28px; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; height: 12px; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; height: 35px; }
.wave-bar:nth-child(6) { animation-delay: 0.25s; height: 22px; }
.wave-bar:nth-child(7) { animation-delay: 0.35s; height: 30px; }
.wave-bar:nth-child(8) { animation-delay: 0.15s; height: 14px; }
.wave-bar:nth-child(9) { animation-delay: 0.45s; height: 36px; }
.wave-bar:nth-child(10) { animation-delay: 0.05s; height: 20px; }
.wave-bar:nth-child(11) { animation-delay: 0.3s; height: 26px; }
.wave-bar:nth-child(12) { animation-delay: 0.2s; height: 16px; }

@keyframes wave-pulse {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.radio-live-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #00cec9;
  background: rgba(0, 206, 201, 0.12);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0, 206, 201, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ======================== DEPLOY BUTTON & MODAL ======================== */
.btn-deploy-header {
  background: linear-gradient(135deg, #e17055, #d63031);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(214, 48, 49, 0.35);
  transition: var(--transition);
}

.btn-deploy-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(214, 48, 49, 0.55);
  filter: brightness(1.1);
}

.deploy-modal-card {
  max-width: 650px;
}

.deploy-target-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.target-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.target-label {
  color: var(--text-muted);
}

.target-val {
  font-weight: 600;
  color: #ffffff;
}

.target-val.highlight {
  color: #00cec9;
  font-weight: 700;
}

.btn-execute-deploy {
  width: 100%;
  background: linear-gradient(135deg, #0984e3, #6c5ce7);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
  transition: var(--transition);
}

.btn-execute-deploy:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.deploy-log-box {
  margin-top: 14px;
  background: #0b0c12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
}

.deploy-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.deploy-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00cec9, #6c5ce7);
  transition: width 0.3s ease;
}

.deploy-terminal-log {
  font-family: monospace;
  font-size: 12px;
  color: #55efc4;
  line-height: 1.5;
}

.deploy-manual-card {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
}

.deploy-manual-card h4 {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.copy-cmd-row {
  display: flex;
  gap: 8px;
}

.copy-cmd-row input {
  flex: 1;
  background: #0c0d14;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fab1a0;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
}

.btn-copy-cmd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-cmd:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.deploy-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* ======================== RADIO CARD BADGE & STYLE ======================== */
.media-type-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.media-type-badge.tv {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.media-type-badge.radio {
  background: rgba(0, 206, 201, 0.15);
  color: #00cec9;
  border: 1px solid rgba(0, 206, 201, 0.3);
}

