:root {
  --bg-dark: #070312;
  --bg-card: rgba(22, 11, 46, 0.75);
  --bg-card-hover: rgba(36, 18, 77, 0.85);
  --bg-input: rgba(15, 7, 32, 0.8);
  --primary: #9333ea;
  --primary-light: #a855f7;
  --primary-neon: #c084fc;
  --primary-glow: rgba(147, 51, 234, 0.45);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.4);
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-neon: rgba(168, 85, 247, 0.35);
  --border-active: rgba(192, 132, 252, 0.75);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(147, 51, 234, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(126, 34, 206, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

.view-section {
  display: none !important;
  width: 100%;
}

.view-section.active {
  display: block !important;
}

.view-section.login-wrapper.active {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh;
  min-height: 100dvh;
}

.login-wrapper {
  width: 100%;
  padding: 24px 16px;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.login-bg-decor {
  position: absolute;
  width: 380px;
  height: 380px;
  max-width: 90vw;
  max-height: 90vw;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(80px);
  animation: pulseNeon 8s infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes pulseNeon {
  0% { transform: scale(0.9) translate(-15px, -15px); opacity: 0.6; }
  100% { transform: scale(1.15) translate(15px, 15px); opacity: 0.9; }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: auto;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-lg);
  padding: 38px 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 35px var(--primary-glow);
  text-align: center;
  box-sizing: border-box;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.login-logo {
  max-height: 64px;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 15px var(--primary-light));
}

.login-title {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  transition: var(--transition);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 16px;
  font-family: inherit;
  transition: var(--transition);
  box-sizing: border-box;
}

.form-control:focus {
  border-color: var(--primary-neon);
  box-shadow: 0 0 16px var(--primary-glow);
}

.form-control-simple {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 16px;
  font-family: inherit;
  transition: var(--transition);
  box-sizing: border-box;
}

.form-control-simple:focus {
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px var(--primary-glow);
}

.btn-cyber {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 18px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  touch-action: manipulation;
}

.btn-cyber:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.6);
}

.btn-cyber:active {
  transform: translateY(0);
}

.btn-cyber-outline {
  padding: 9px 16px;
  background: transparent;
  color: var(--primary-neon);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  touch-action: manipulation;
}

.btn-cyber-outline:hover {
  background: rgba(147, 51, 234, 0.15);
  border-color: var(--primary-neon);
  box-shadow: 0 0 15px var(--primary-glow);
}

.btn-action-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  touch-action: manipulation;
}

.btn-action-test {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.btn-action-test:hover {
  background: rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.btn-action-delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-action-edit {
  background: rgba(168, 85, 247, 0.15);
  color: var(--primary-neon);
  border-color: var(--border-neon);
}

.btn-action-edit:hover {
  background: rgba(168, 85, 247, 0.3);
}

.link-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 14px;
  display: inline-block;
  text-decoration: none;
}

.link-action:hover {
  color: var(--primary-neon);
  text-decoration: underline;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 5, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-neon);
  padding: 10px 24px;
  display: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  width: 100%;
  box-sizing: border-box;
}

.app-header.active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.header-logo {
  height: 36px;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.header-brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, var(--primary-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  touch-action: manipulation;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(147, 51, 234, 0.12);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(147, 51, 234, 0.25);
  border-color: var(--border-neon);
  box-shadow: 0 0 15px var(--primary-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  padding: 5px 12px;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.user-badge:hover {
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: translateY(-1px);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #ffffff;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-hamburger {
  display: none;
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid var(--border-neon);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-hamburger:hover {
  background: var(--primary);
  color: #ffffff;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(8, 4, 18, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 20px 28px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-menu-overlay.active {
  display: flex;
  opacity: 1;
}

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

.mobile-menu-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-close:hover {
  background: var(--primary);
  border-color: var(--primary-neon);
}

.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: auto 0;
  padding: 16px 0;
}

.mobile-nav-item {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.mobile-nav-item i {
  font-size: 1.25rem;
  color: var(--primary-neon);
  width: 28px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.3) 0%, rgba(124, 58, 237, 0.3) 100%);
  border-color: var(--primary-neon);
  box-shadow: 0 0 15px var(--primary-glow);
}

.mobile-menu-footer {
  border-top: 1px solid var(--border-neon);
  padding-top: 18px;
}

.app-container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 16px 20px 30px;
  box-sizing: border-box;
  width: 100%;
}

.search-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 16px;
  transition: var(--transition);
  box-sizing: border-box;
}

.search-box input:focus {
  border-color: var(--primary-neon);
  box-shadow: 0 0 16px var(--primary-glow);
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.categories-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.category-scroll-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.category-scroll-btn:hover {
  background: var(--primary);
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px var(--primary-glow);
  transform: scale(1.08);
}

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
}

.categories-scroll:empty {
  display: none !important;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 6px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
  touch-action: manipulation;
}

.category-pill:hover {
  color: var(--text-main);
  border-color: var(--primary-light);
  background: rgba(147, 51, 234, 0.15);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #ffffff;
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px var(--primary-glow);
}

.category-pill.category-adult {
  border-color: rgba(236, 72, 153, 0.4);
}

.category-pill.category-adult:hover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.15);
}

.badge-adult {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-family {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.input-numeric-pin {
  -webkit-text-security: disc;
  letter-spacing: 4px;
}

.input-numeric-pin::-webkit-inner-spin-button,
.input-numeric-pin::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-numeric-pin {
  -moz-appearance: textfield;
}

.card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(7, 3, 18, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: var(--transition);
}

.card-fav-btn:hover {
  background: rgba(147, 51, 234, 0.4);
  color: #f87171;
  transform: scale(1.1);
  border-color: var(--primary-neon);
}

.card-fav-btn.active {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.card-fav-btn.active i {
  animation: heartPop 0.3s ease;
}

@keyframes heartPop {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.card-report-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(7, 3, 18, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 6;
  transition: var(--transition);
}

.card-report-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #ef4444;
  transform: scale(1.1);
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

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

.media-grid-channels {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

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

.media-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
}

.media-poster-container {
  position: relative;
  width: 100%;
  padding-top: 62%;
  background: radial-gradient(circle, #25124d 0%, #0e061e 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-channel-container {
  padding-top: 62%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #25124d 0%, #0e061e 100%);
  overflow: hidden;
}

.media-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.media-channel-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  max-height: 60%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.7));
  transition: transform 0.3s ease;
}

.media-card:hover .media-channel-logo {
  transform: translate(-50%, -50%) scale(1.1);
}

.media-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 3, 18, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.play-hover-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
  transform: scale(0.7);
  transition: var(--transition);
}

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

.media-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.media-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
  min-height: 2.35em;
}

.media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  min-width: 0;
  flex-wrap: wrap;
}

.media-category-tag {
  display: inline-block;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-watched-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  pointer-events: none;
}

.media-card.is-watched {
  border-color: rgba(16, 185, 129, 0.45);
}

.media-card.is-watched:hover {
  border-color: #10b981;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 18px rgba(16, 185, 129, 0.4);
}

.card-watched-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 12;
  transition: var(--transition);
  font-size: 0.82rem;
}

.card-watched-remove-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.card-removed-badge {
  position: absolute;
  top: 36px;
  left: 8px;
  z-index: 10;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.95));
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  pointer-events: none;
}

.media-card.is-removed-item {
  opacity: 0.75;
  filter: saturate(0.6);
  border-color: rgba(239, 68, 68, 0.3);
}

.media-card.is-removed-item:hover {
  opacity: 0.95;
  filter: saturate(0.9);
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(239, 68, 68, 0.35);
}

.badge-live {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.badge-online {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-offline {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ping-green {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid #10b981;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-ping-amber {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid #f59e0b;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-ping-orange {
  background: rgba(249, 115, 22, 0.18);
  color: #fb923c;
  border: 1px solid #f97316;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-ping-red {
  background: rgba(239, 68, 68, 0.22);
  color: #f87171;
  border: 1px solid #ef4444;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-ping-default {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-filter-btn.filter-high-ping.active {
  background: #ea580c;
  border-color: #f97316;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
  color: #ffffff;
}

.badge-m3u-url {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-m3u-file {
  background: rgba(147, 51, 234, 0.15);
  color: var(--primary-neon);
  border: 1px solid var(--border-neon);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.m3u-source-url {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.m3u-chips-compact {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.m3u-mini-chip {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.m3u-mini-chip.ch {
  background: rgba(168, 85, 247, 0.12);
  color: var(--primary-neon);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.m3u-mini-chip.mv {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.m3u-mini-chip.sr {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.ping-green {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.ping-amber {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.ping-orange {
  background: rgba(249, 115, 22, 0.15) !important;
  color: #f97316 !important;
  border: 1px solid rgba(249, 115, 22, 0.4) !important;
}

.ping-red {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.badge-adult-active {
  background: rgba(236, 72, 153, 0.2);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.4);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-adult-inactive {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.last-update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  margin-left: 12px;
  vertical-align: middle;
}

.infinite-scroll-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 18px;
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.cyber-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

@media (max-width: 768px) {
  .last-update-badge {
    display: block;
    margin-left: 0;
    margin-top: 6px;
    width: fit-content;
  }
}

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

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--primary-glow);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(147, 51, 234, 0.15);
  border: 1px solid var(--border-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-neon);
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-tabs-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  gap: 6px;
}

.admin-tab-scroll-btn {
  display: inline-flex;
  background: rgba(15, 7, 32, 0.9);
  border: 1px solid var(--border-neon);
  color: var(--accent-cyan);
  width: 34px;
  height: 38px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  transition: var(--transition);
  animation: pulseScrollHint 2.5s infinite ease-in-out;
}

.admin-tab-scroll-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-neon);
  box-shadow: 0 0 14px var(--primary-glow);
  animation: none;
}

@keyframes pulseScrollHint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); border-color: var(--accent-cyan); color: #ffffff; }
}

.admin-tabs-wrapper .admin-tabs {
  margin-bottom: 0;
  flex: 1;
  scroll-behavior: smooth;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-neon);
  padding-bottom: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  touch-action: manipulation;
}

.admin-tab-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-light);
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #ffffff;
  border-color: var(--primary-neon);
  box-shadow: 0 0 16px var(--primary-glow);
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  -webkit-overflow-scrolling: touch;
}

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.cyber-table th {
  background: rgba(15, 7, 34, 0.9);
  padding: 12px 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-neon);
  white-space: nowrap;
}

.cyber-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
  color: var(--text-main);
  vertical-align: middle;
}

.cyber-table tr:hover td {
  background: rgba(147, 51, 234, 0.08);
}

.empty-table-row td,
.empty-table-cell {
  text-align: center !important;
  color: var(--text-dim) !important;
  padding: 24px 16px !important;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 2, 12, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px var(--primary-glow);
  position: relative;
  box-sizing: border-box;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-neon);
  padding-bottom: 10px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-main);
}

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 500;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: slideInToast 0.3s ease;
  min-width: 240px;
  max-width: 90vw;
  pointer-events: auto;
}

.toast-success {
  background: rgba(16, 185, 129, 0.95);
  border: 1px solid #10b981;
}

.toast-error {
  background: rgba(239, 68, 68, 0.95);
  border: 1px solid #ef4444;
}

.toast-info {
  background: rgba(147, 51, 234, 0.95);
  border: 1px solid #a855f7;
}

.toast-warning {
  background: rgba(217, 119, 6, 0.95);
  border: 1px solid #f59e0b;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.pagination-info {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.btn-page {
  padding: 8px 18px;
  font-size: 0.88rem;
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.m3u-progress-wrapper {
  margin: 16px 0;
}

.m3u-progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-neon);
}

.m3u-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-neon) 50%, var(--accent-cyan) 100%);
  border-radius: 20px;
  transition: width 0.3s ease;
  box-shadow: 0 0 12px var(--primary-glow);
}

.m3u-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.m3u-stats-row,
.m3u-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}

.m3u-stat-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
  min-width: 0;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
}

.m3u-stat-chip span {
  font-size: 0.74rem;
  opacity: 0.85;
}

.m3u-stat-chip strong {
  font-weight: 700;
}

.chip-green {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.chip-red {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.chip-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.chip-purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--primary-neon);
  border-color: var(--border-neon);
}

.chip-blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.chip-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-processing {
  background: rgba(6, 182, 212, 0.18);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.5);
  animation: badgePulse 1.8s infinite ease-in-out;
}

@keyframes badgePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.4);
    opacity: 0.9;
  }
  50% {
    box-shadow: 0 0 14px 2px rgba(6, 182, 212, 0.85);
    border-color: rgba(6, 182, 212, 0.95);
    opacity: 1;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.4);
    opacity: 0.9;
  }
}

.status-paused {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-queued {
  background: rgba(147, 51, 234, 0.15);
  color: var(--primary-neon);
  border: 1px solid var(--border-neon);
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.admin-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-table-counter {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  background: rgba(15, 7, 34, 0.6);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.admin-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-filter-btn {
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.admin-filter-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-light);
}

.admin-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px var(--primary-glow);
}

.admin-filter-btn.filter-offline.active {
  background: #dc2626;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.admin-filter-btn.filter-warn.active {
  background: #d97706;
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.admin-filter-search {
  position: relative;
  margin-left: auto;
  min-width: 220px;
  flex-grow: 1;
  max-width: 320px;
}

.admin-filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.admin-search-input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  background: rgba(7, 3, 18, 0.8);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}

.admin-search-input:focus {
  border-color: var(--primary-neon);
  box-shadow: 0 0 12px var(--primary-glow);
}

@media (max-width: 768px) {
  .app-header.active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    width: 100%;
  }

  .header-nav {
    display: none;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .btn-hamburger {
    display: flex;
  }

  .header-brand-name {
    font-size: 1.1rem;
  }

  .header-logo {
    height: 30px;
  }

  .user-badge {
    padding: 3px 8px;
    gap: 5px;
  }

  .user-name {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
  }

  .app-container {
    padding: 10px 12px 24px;
  }

  .login-card {
    padding: 28px 18px;
    max-width: 100%;
  }

  .login-title {
    font-size: 1.4rem;
  }

  .login-logo {
    max-height: 50px;
  }

  .search-filter-bar {
    gap: 8px;
    margin-bottom: 12px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  .media-grid-channels {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 10px;
    gap: 8px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .admin-tabs-wrapper {
    gap: 4px;
    margin-bottom: 14px;
  }

  .admin-tab-scroll-btn {
    display: inline-flex;
    width: 28px;
    height: 32px;
    font-size: 0.8rem;
  }

  .admin-tabs {
    width: 100%;
    gap: 6px;
    margin-bottom: 0;
  }

  .admin-tab-btn {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .cyber-table {
    min-width: 500px;
    font-size: 0.78rem;
  }

  .cyber-table th,
  .cyber-table td {
    padding: 8px 10px;
  }

  .toast-container {
    bottom: 12px;
    right: 12px;
    left: 12px;
  }

  .toast {
    min-width: 100%;
  }

  .admin-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  .admin-header-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .admin-header-actions button {
    width: 100% !important;
  }

  .admin-table-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-table-header button {
    width: 100% !important;
  }

  .admin-filter-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 12px;
  }

  .admin-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .admin-filter-label {
    width: 100%;
    margin-bottom: 2px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary-neon);
  }

  .admin-filter-btn {
    flex: 1 1 calc(50% - 6px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7px 10px;
    font-size: 0.76rem;
    box-sizing: border-box;
  }

  .admin-filter-search {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .admin-search-input {
    width: 100%;
    font-size: 0.82rem;
  }

  .admin-card-table-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow-x: hidden !important;
    padding: 0 !important;
  }

  .admin-card-table-container table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .admin-card-table-container thead {
    display: none !important;
  }

  .admin-card-table-container tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .admin-card-table-container tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-neon) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
  }

  .admin-card-table-container td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(168, 85, 247, 0.08) !important;
    font-size: 0.84rem !important;
    white-space: normal !important;
  }

  .admin-card-table-container td:last-child,
  .admin-card-table-container td[data-label="Ações"] {
    border-bottom: none !important;
    padding-top: 10px !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  .admin-card-table-container td .action-buttons-wrap {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    margin-left: auto !important;
    max-width: calc(100% - 90px) !important;
  }

  .empty-table-row,
  .admin-card-table-container tr.empty-table-row,
  .admin-card-table-container tr:has(td[colspan]) {
    display: block !important;
    width: 100% !important;
    background: rgba(18, 10, 32, 0.45) !important;
    border: 1px dashed rgba(168, 85, 247, 0.3) !important;
    border-radius: var(--radius-md) !important;
    padding: 24px 14px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: 4px 0 !important;
  }

  .empty-table-cell,
  .admin-card-table-container td[colspan],
  .admin-card-table-container .empty-table-cell,
  .admin-card-table-container tr.empty-table-row td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    border: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--text-muted) !important;
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    justify-content: center !important;
  }

  .empty-table-cell::before,
  .admin-card-table-container td[colspan]::before,
  .admin-card-table-container .empty-table-cell::before,
  .admin-card-table-container tr.empty-table-row td::before {
    display: none !important;
    content: none !important;
    min-width: 0 !important;
    width: 0 !important;
  }

  .admin-card-table-container td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    min-width: 80px;
    flex-shrink: 0;
  }

  .admin-card-table-container td strong {
    max-width: calc(100% - 90px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
  }

  .admin-card-table-container td .btn-action-small {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    border-radius: var(--radius-sm) !important;
  }

  .admin-card-table-container td > *:not(::before) {
    max-width: calc(100% - 90px);
  }

  .admin-card-table-container td .watching-badge {
    max-width: calc(100% - 95px) !important;
  }

  .admin-card-table-container td[data-label="Problema"],
  .admin-card-table-container td[data-label="Conteúdo"],
  .admin-card-table-container td[data-label="Usuário"] {
    align-items: flex-start !important;
  }

  .category-header-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .category-header-actions button {
    width: 100% !important;
    justify-content: center !important;
  }

  .category-filter-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  .category-filter-bar > div,
  .category-filter-bar select {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-btn {
    font-size: 0.72rem;
    padding: 4px 9px;
  }
}

.hp-sub-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hp-sub-tab {
  padding: 8px 18px;
  border: 1px solid var(--border-neon);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.hp-sub-tab.active {
  background: var(--primary);
  border-color: var(--primary-neon);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.hp-threshold-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hp-threshold-bar label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hp-threshold-bar select {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-neon);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 0.82rem;
}

.hp-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hp-summary-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-summary-chip.red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.hp-summary-chip.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.hp-summary-chip.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.conn-limit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 2, 12, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.conn-limit-modal.active {
  display: flex;
}

.conn-limit-card {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: modalSlideIn 0.3s ease-out;
}

.conn-limit-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.8rem;
  color: #ef4444;
}

.conn-limit-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.conn-limit-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.conn-limit-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.watching-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watching-badge.channel {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.watching-badge.movie {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.watching-badge.series {
  background: rgba(168, 85, 247, 0.12);
  color: var(--primary-neon);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.watching-badge.idle {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-dim);
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.active-sessions-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 20px;
}

.active-sessions-summary h4 {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.08);
  font-size: 0.82rem;
}

.session-item:last-child {
  border-bottom: none;
}

.session-user {
  font-weight: 600;
  color: var(--text-main);
  min-width: 90px;
}

.session-duration {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: auto;
}

@media (max-width: 768px) {
  .m3u-table thead {
    display: none;
  }

  .m3u-table,
  .m3u-table tbody,
  .m3u-table tr,
  .m3u-table td {
    display: block;
    width: 100%;
  }

  .m3u-table {
    min-width: unset !important;
  }

  .m3u-table tr {
    background: var(--bg-card);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    padding: 12px;
  }

  .m3u-table td {
    padding: 4px 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .m3u-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    min-width: 80px;
    flex-shrink: 0;
  }

  .conn-limit-card {
    padding: 28px 18px;
  }

  .hp-sub-tabs {
    gap: 6px;
  }

  .hp-sub-tab {
    padding: 6px 14px;
    font-size: 0.78rem;
  }
}

.install-prompt-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: rgba(18, 9, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-neon);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(147, 51, 234, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  z-index: 9998;
  animation: bannerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes bannerSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 40px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.install-prompt-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.install-prompt-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  flex-shrink: 0;
}

.install-prompt-text {
  flex: 1;
  min-width: 0;
}

.install-prompt-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.install-prompt-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.install-prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-install-now {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #34d399;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
  transition: var(--transition);
}

.btn-install-now:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
}

.btn-install-dismiss {
  padding: 7px 12px;
  font-size: 0.78rem;
  width: auto;
}

.btn-install-never {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
  margin-left: auto;
  padding: 4px 6px;
}

.btn-install-never:hover {
  color: var(--text-muted);
}

.install-step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.install-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.install-step-text {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.45;
}

.m3u-upload-wrapper {
  width: 100%;
  margin-bottom: 28px;
}

.m3u-upload-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.m3u-header-hero {
  text-align: center;
  margin-bottom: 22px;
}

.m3u-hero-icon {
  font-size: 2.5rem;
  color: var(--primary-neon);
  margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(0 0 12px var(--primary-glow));
}

.m3u-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.m3u-hero-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 6px;
  line-height: 1.5;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.m3u-divider {
  text-align: center;
  margin: 14px 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.m3u-verify-box {
  background: rgba(15, 7, 32, 0.8);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.m3u-verify-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.m3u-verify-checkbox {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.m3u-verify-label {
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
}

.m3u-verify-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 5px;
  padding-left: 28px;
  line-height: 1.4;
}

.m3u-submit-btn {
  width: 100%;
}

.m3u-active-card {
  margin-top: 22px;
  padding: 18px 20px;
  background: rgba(15, 7, 32, 0.95);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-md);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.m3u-active-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 14px;
  flex-wrap: wrap;
}

.m3u-active-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 200px;
}

.m3u-card-title {
  font-size: 1.05rem;
  color: var(--text-main);
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0;
  line-height: 1.3;
}

.m3u-active-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-m3u-pause,
.btn-m3u-fast,
.btn-m3u-del {
  padding: 6px 13px !important;
  font-size: 0.8rem !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-m3u-fast {
  background: linear-gradient(135deg, var(--accent-cyan), var(--primary)) !important;
  color: #fff !important;
  border: none !important;
}

.m3u-progress-wrapper {
  margin: 12px 0;
}

.m3u-history-section {
  width: 100%;
  margin-top: 10px;
}

.m3u-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.m3u-history-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.m3u-table-container {
  width: 100%;
  overflow-x: auto;
}

.m3u-table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
  border-collapse: collapse;
}

.m3u-table th,
.m3u-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  box-sizing: border-box;
}

.m3u-table th:nth-child(1), .m3u-table td:nth-child(1) { width: 22%; }
.m3u-table th:nth-child(2), .m3u-table td:nth-child(2) { width: 20%; }
.m3u-table th:nth-child(3), .m3u-table td:nth-child(3) { width: 10%; }
.m3u-table th:nth-child(4), .m3u-table td:nth-child(4) { width: 14%; }
.m3u-table th:nth-child(5), .m3u-table td:nth-child(5) { width: 14%; }
.m3u-table th:nth-child(6), .m3u-table td:nth-child(6) { width: 11%; }
.m3u-table th:nth-child(7), .m3u-table td:nth-child(7) { width: 9%; text-align: center; }

.m3u-filename-wrapper {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.m3u-filename-text {
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  display: block;
  min-width: 0;
  max-width: 100%;
}

.m3u-source-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.m3u-url-box {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  min-width: 0;
  flex: 1;
  max-width: 220px;
}

.m3u-source-url-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.btn-copy-url {
  background: transparent;
  border: none;
  color: var(--primary-neon);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.72rem;
  border-radius: 3px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-copy-url:hover {
  background: var(--primary-glow);
  color: #fff;
}

.m3u-table-progress-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
}

.m3u-date-text {
  color: var(--text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}

.m3u-actions-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

@media (max-width: 768px) {
  .m3u-upload-card {
    padding: 16px 14px;
    border-radius: var(--radius-md);
  }

  .m3u-hero-icon {
    font-size: 2rem;
  }

  .m3u-hero-title {
    font-size: 1.15rem;
  }

  .m3u-hero-desc {
    font-size: 0.8rem;
  }

  .m3u-verify-hint {
    padding-left: 0;
    margin-top: 6px;
  }

  .m3u-active-card {
    padding: 14px 12px;
  }

  .m3u-active-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .m3u-card-title {
    font-size: 0.98rem;
  }

  .m3u-active-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: stretch;
  }

  .btn-m3u-pause,
  .btn-m3u-fast,
  .btn-m3u-del {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .m3u-stats-grid,
  .m3u-stats-row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .m3u-stat-chip {
    padding: 6px 4px !important;
    font-size: 0.74rem !important;
  }

  .m3u-table-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .m3u-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    border: none !important;
  }

  .m3u-table thead {
    display: none !important;
  }

  .m3u-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .m3u-table tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-neon) !important;
    border-radius: var(--radius-md) !important;
    padding: 14px !important;
    margin: 0 !important;
  }

  .m3u-table tr.empty-table-row {
    display: block !important;
    padding: 20px !important;
    text-align: center !important;
  }

  .m3u-table tr.empty-table-row td {
    display: block !important;
    border: none !important;
    text-align: center !important;
    padding: 0 !important;
  }

  .m3u-table tr.empty-table-row td::before {
    display: none !important;
  }

  .m3u-table td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid rgba(168, 85, 247, 0.12) !important;
    font-size: 0.82rem !important;
    white-space: normal !important;
    min-width: 0 !important;
  }

  .m3u-table td:last-child {
    border-bottom: none !important;
    padding-top: 8px !important;
    padding-bottom: 0 !important;
    justify-content: space-between !important;
  }

  .m3u-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    max-width: 90px;
    flex-shrink: 0;
    text-align: left;
  }

  .m3u-filename-wrapper {
    max-width: calc(100% - 90px);
    justify-content: flex-end;
    min-width: 0;
  }

  .m3u-filename-text {
    text-align: right;
  }

  .m3u-source-wrapper {
    max-width: calc(100% - 90px);
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
  }

  .m3u-url-box {
    max-width: 170px;
  }

  .m3u-table-progress-text {
    text-align: right;
    max-width: calc(100% - 90px);
  }

  .m3u-chips-compact {
    max-width: calc(100% - 90px);
    justify-content: flex-end;
  }

  .m3u-date-text {
    text-align: right;
    max-width: calc(100% - 90px);
  }

  .m3u-actions-wrap {
    max-width: calc(100% - 90px);
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .m3u-stats-grid,
  .m3u-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .m3u-url-box {
    max-width: 140px;
  }

  .m3u-history-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .m3u-history-header button {
    width: 100% !important;
    justify-content: center;
  }
}

  .install-prompt-banner {
    bottom: 12px;
    width: calc(100% - 20px);
    padding: 12px 14px;
  }

  .install-prompt-actions {
    justify-content: space-between;
  }

  .btn-install-never {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 4px;
  }
}

.adult-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(236, 72, 153, 0.12);
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f472b6;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.adult-filter-tag:hover {
  background: rgba(236, 72, 153, 0.22);
  border-color: #ec4899;
}

.adult-filter-remove {
  background: transparent;
  border: none;
  color: #f472b6;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.adult-filter-remove:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.client-recent-section {
  margin-bottom: 24px;
  padding: 16px 18px;
  background: rgba(18, 10, 36, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.recent-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-title i {
  color: var(--primary-neon);
}

.recent-scroll-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--border-neon) transparent;
  -webkit-overflow-scrolling: touch;
}

.recent-scroll-row::-webkit-scrollbar {
  height: 6px;
}

.recent-scroll-row::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.recent-scroll-row::-webkit-scrollbar-thumb {
  background: var(--border-neon);
  border-radius: 10px;
}

.recent-card {
  flex: 0 0 185px;
  width: 185px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.recent-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-neon);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.25);
}

.recent-card-channel {
  flex: 0 0 165px;
  width: 165px;
}

.recent-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 94px;
  background: rgba(10, 5, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.recent-card-poster {
  height: 115px;
}

.recent-thumb-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: transform 0.22s ease;
}

.recent-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.recent-card:hover .recent-thumb-img,
.recent-card:hover .recent-poster-img {
  transform: scale(1.05);
}

.recent-overlay-play {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.recent-card:hover .recent-overlay-play {
  opacity: 1;
}

.recent-play-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-neon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 0 12px var(--primary-neon);
}

.recent-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.recent-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-neon), var(--accent-cyan));
}

.recent-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-card);
  min-width: 0;
}

.recent-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.recent-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.recent-sub > span:first-child {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-badge {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.recent-remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: all 0.2s ease;
}

.recent-card:hover .recent-remove-btn {
  opacity: 1;
}

.recent-remove-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: #ef4444;
}

.player-resume-toast {
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 10, 36, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--primary-neon);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.75), 0 0 18px rgba(168, 85, 247, 0.35);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: 30px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  pointer-events: auto;
  animation: modalSlideIn 0.3s ease-out;
  max-width: 90%;
}

.player-resume-toast.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.player-resume-btn {
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid var(--primary-neon);
  color: #fff;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.player-resume-btn:hover {
  background: var(--primary-neon);
  color: #fff;
}

.player-resume-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-resume-close:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .client-recent-section {
    padding: 12px 14px;
    margin-bottom: 18px;
  }
  .recent-card {
    flex: 0 0 155px;
    width: 155px;
  }
  .recent-card-channel {
    flex: 0 0 142px;
    width: 142px;
  }
  .recent-thumb-wrapper {
    height: 86px;
  }
  .recent-card-poster {
    height: 104px;
  }
  .recent-remove-btn {
    opacity: 0.9;
  }
  .player-resume-toast {
    top: 55px;
    padding: 7px 12px;
    font-size: 0.78rem;
    gap: 8px;
  }
  .player-resume-btn {
    padding: 3px 8px;
    font-size: 0.72rem;
  }
}

.offline-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 4, 18, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalSlideIn 0.3s ease-out;
}

.offline-card {
  background: var(--bg-card);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(239, 68, 68, 0.2);
  border-radius: 20px;
  padding: 36px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.offline-icon-wrapper {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offline-radar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.4);
  animation: offlineRadarPulse 2s infinite ease-out;
}

@keyframes offlineRadarPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.offline-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.offline-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.offline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 22px;
  max-width: 360px;
}

.offline-status-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
}

.offline-countdown-text {
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 8px;
  font-weight: 500;
}

.offline-countdown-text strong {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 1rem;
}

.offline-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.offline-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444, var(--accent-cyan));
  border-radius: 10px;
  transition: width 0.1s linear;
}

.offline-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

.offline-actions button {
  width: auto;
  min-width: 190px;
  padding: 12px 24px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .offline-card {
    padding: 26px 18px;
  }
  .offline-title {
    font-size: 1.25rem;
  }
  .offline-desc {
    font-size: 0.85rem;
  }
  .offline-actions button {
    width: 100%;
  }
}

.offline-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.offline-logo {
  max-width: 170px;
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.45));
}

.player-resume-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 12, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalSlideIn 0.25s ease-out;
}

.player-resume-box {
  background: var(--bg-card);
  border: 1px solid var(--border-neon);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(168, 85, 247, 0.3);
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player-resume-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--primary-neon);
  color: var(--primary-neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.player-resume-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.player-resume-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.player-resume-preview {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.player-resume-time-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.player-resume-time-info strong {
  color: var(--accent-cyan);
  font-size: 0.92rem;
  font-weight: 700;
}

.player-resume-mini-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.player-resume-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-neon), var(--accent-cyan));
  border-radius: 6px;
}

.player-resume-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-resume-actions button {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.88rem;
}

@media (max-width: 768px) {
  .player-resume-box {
    padding: 22px 18px;
  }
  .player-resume-title {
    font-size: 1.15rem;
  }
  .offline-logo {
    max-width: 140px;
    height: 44px;
    width: auto;
  }
}

