/* ==========================================================================
   NEO-STREAM XTREAM IPTV - TACTICAL CYBERNETIC THEME
   Obsidian, Neon Cyber-Emerald, Electric Cyan & Solar Amber Palette
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg-space: #101726;
  --bg-card: #182235;
  --bg-card-hover: #202c42;
  --bg-surface: #121b2a;
  --bg-surface-elevated: #202c42;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: #00ff87;
  --border-glow: rgba(0, 255, 135, 0.25);
  
  --accent-emerald: #47d7a0;
  --accent-emerald-glow: rgba(71, 215, 160, 0.22);
  --accent-cyan: #66b7ff;
  --accent-cyan-glow: rgba(102, 183, 255, 0.22);
  --accent-amber: #f4bb61;
  --accent-amber-glow: rgba(255, 179, 0, 0.35);
  --accent-crimson: #ff3366;
  --accent-crimson-glow: rgba(255, 51, 102, 0.35);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-main: 'Outfit', -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-space);
  background-image: linear-gradient(180deg, #111a2a 0%, #0c1320 100%);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-space);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Typography Helpers */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

/* Glassmorphism Cards */
.cyber-card {
  background: var(--bg-card);
  border: 1px solid rgba(203, 213, 225, 0.11);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-card:hover {
  border-color: rgba(102, 183, 255, 0.35);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.24);
}

.cyber-card-emerald:hover {
  border-color: var(--accent-emerald-glow);
  box-shadow: 0 0 24px -4px var(--accent-emerald-glow);
}

/* Futuristic Glowing Borders & Badges */
.badge-active {
  background: rgba(0, 255, 135, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(0, 255, 135, 0.3);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
}

.badge-expired {
  background: rgba(255, 179, 0, 0.12);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 179, 0, 0.3);
  box-shadow: 0 0 10px rgba(255, 179, 0, 0.2);
}

.badge-disabled {
  background: rgba(255, 51, 102, 0.12);
  color: var(--accent-crimson);
  border: 1px solid rgba(255, 51, 102, 0.3);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.2);
}

.badge-cyan {
  background: rgba(0, 210, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

/* Glowing Pulsing Status LED */
.pulse-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-led.emerald {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}
.pulse-led.emerald::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px; right: -3px; bottom: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent-emerald);
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-led.amber {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

.pulse-led.crimson {
  background: var(--accent-crimson);
  box-shadow: 0 0 8px var(--accent-crimson);
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Tactical Inputs */
.cyber-input {
  background: #0e1624;
  border: 1px solid rgba(203, 213, 225, 0.16);
  color: var(--text-main);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-main);
  transition: all 0.2s ease;
  width: 100%;
}

.cyber-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

/* Tactical Buttons */
.cyber-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.cyber-btn-emerald {
  background: #47d7a0;
  color: #0d1824;
  box-shadow: none;
}
.cyber-btn-emerald:hover {
  background: linear-gradient(135deg, #2bff9e 0%, #00ff87 100%);
  box-shadow: 0 6px 24px rgba(0, 255, 135, 0.5);
  transform: translateY(-1px);
}

.cyber-btn-cyan {
  background: #66b7ff;
  color: #0d1824;
  box-shadow: none;
}
.cyber-btn-cyan:hover {
  background: linear-gradient(135deg, #33dcff 0%, #00d2ff 100%);
  box-shadow: 0 6px 24px rgba(0, 210, 255, 0.5);
  transform: translateY(-1px);
}

.cyber-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}
.cyber-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.cyber-btn-danger {
  background: rgba(255, 51, 102, 0.15);
  color: var(--accent-crimson);
  border: 1px solid rgba(255, 51, 102, 0.3);
}
.cyber-btn-danger:hover {
  background: var(--accent-crimson);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-crimson-glow);
}

/* Sidebar Navigation Items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: #00ff87;
  background: linear-gradient(90deg, rgba(0, 255, 135, 0.12) 0%, rgba(0, 255, 135, 0.01) 100%);
  border-left-color: #00ff87;
}

/* Scanline Effect on Header Banner */
.scanline-header {
  position: relative;
  overflow: hidden;
}
.scanline-header::before {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

/* Modals */
.cyber-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 11, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.cyber-modal-content {
  background: #0d131f;
  border: 1px solid rgba(0, 210, 255, 0.3);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-cyan-glow);
  border-radius: 8px;
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-shell { background: linear-gradient(135deg, #101b2d 0%, #08111f 100%); }
.login-card { border-top: 3px solid var(--accent-emerald); }
.product-badge { font-family: var(--font-mono); font-size: .65rem; padding: .2rem .45rem; border: 1px solid rgba(71, 215, 160, .42); border-radius: 4px; color: var(--accent-emerald); }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--accent-emerald); box-shadow: 0 0 0 4px rgba(71, 215, 160, .12); }
.app-sidebar { background: #0d1523; }
.app-header { background: rgba(13, 21, 35, .94); }
.nav-item { border-left-width: 2px; border-radius: 6px; }
.nav-item.active { background: rgba(71, 215, 160, .10); }
.cyber-btn { border-radius: 6px; min-height: 38px; }
.cyber-toast { border-radius: 6px; }

@media (max-width: 767px) {
  .app-shell { display: block; }
  .app-sidebar { width: 100%; min-height: auto; border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .app-sidebar nav { display: flex; gap: .25rem; overflow-x: auto; padding: .5rem; }
  .app-sidebar nav > div:not(.nav-item) { display: none; }
  .app-sidebar .nav-item { flex: 0 0 auto; padding: .55rem .7rem; border-left: 0; border-bottom: 2px solid transparent; }
  .app-sidebar .nav-item.active { border-bottom-color: var(--accent-emerald); }
  .app-sidebar .nav-item span { font-size: .72rem; }
  .app-sidebar > div:last-child { display: none; }
  .app-header { position: static; }
  .app-header .cyber-btn span { display: none; }
  .cyber-modal-overlay { align-items: flex-end; padding: 0; }
  .cyber-modal-content { max-height: 92vh; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
}

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

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cyber-toast {
  background: #0d131f;
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-emerald-glow);
  color: var(--text-main);
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cyber-toast.error {
  border-color: var(--accent-crimson);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px var(--accent-crimson-glow);
}

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