/* ========================================
   LiveXpp - Void Theme
   Cosmic Dark with Neon Accents
======================================== */

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

:root {
  /* Color Palette - Void Theme */
  --bg-primary: #050510;
  --bg-secondary: #0b0b15;
  --bg-tertiary: #151520;
  --bg-card: rgba(20, 20, 35, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);

  /* Accent Colors - Neon Cosmic */
  --accent-primary: #bc13fe;
  /* Neon Purple */
  --accent-secondary: #0ff0fc;
  /* Neon Cyan */
  --accent-gradient: linear-gradient(135deg, #bc13fe 0%, #8a2be2 100%);
  --accent-glow: 0 0 15px rgba(188, 19, 254, 0.5);

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;

  /* Status Colors */
  --success: #00ff9d;
  --warning: #ffbf00;
  --error: #ff2a6d;
  --info: #05d9e8;

  /* Borders & Shadows */
  --border-color: rgba(188, 19, 254, 0.2);
  --border-hover: rgba(15, 240, 252, 0.4);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 15px 50px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 30px rgba(188, 19, 254, 0.2);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Space Background Animation */
.stars,
.twinkling {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stars {
  background: #000 url('http://www.script-tutorials.com/demos/360/images/stars.png') repeat top center;
  z-index: -2;
}

.twinkling {
  background: transparent url('http://www.script-tutorials.com/demos/360/images/twinkling.png') repeat top center;
  z-index: -1;
  animation: move-twink-back 200s linear infinite;
  opacity: 0.3;
}

@keyframes move-twink-back {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -10000px 5000px;
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px var(--accent-secondary);
}

/* ========================================
   Landing Page Styles
======================================== */
.landing-container {
  min-height: 85vh;
  /* Increase height for content */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
}

.landing-content {
  max-width: 900px;
  padding: var(--space-2xl);
  border: 1px solid rgba(188, 19, 254, 0.3);
  box-shadow: 0 0 60px rgba(188, 19, 254, 0.15);
}

/* Features Section */
.features-section {
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  padding: var(--space-xl);
  text-align: center;
  transition: transform var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-secondary);
  box-shadow: 0 10px 40px rgba(15, 240, 252, 0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.logo-large {
  margin-bottom: var(--space-xl);
  position: relative;
  display: inline-block;
}

.logo-large h1 {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #bc13fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  letter-spacing: 2px;
}

.hero-text {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.void-text {
  color: var(--accent-secondary);
  text-shadow: 0 0 20px var(--accent-secondary);
}

.hero-subtext {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pulse-effect {
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(188, 19, 254, 0.4);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(188, 19, 254, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(188, 19, 254, 0);
  }
}

/* ========================================
   Components
======================================== */

/* Card */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(188, 19, 254, 0.15);
  border-color: var(--accent-primary);
}

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Glass Panel */
.glass-panel {
  background: rgba(10, 10, 20, 0.6);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(188, 19, 254, 0.7);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(188, 19, 254, 0.1);
  border-color: var(--accent-primary);
  color: white;
}

.btn-large {
  padding: var(--space-md) var(--space-2xl);
  font-size: 1.1rem;
}

.btn-danger {
  background: linear-gradient(135deg, #ff2a6d 0%, #d0004e 100%);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #00ff9d 0%, #00cc7e 100%);
  color: #050510;
  /* Dark text for contrast on neon green */
}

.btn-success:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

/* Form Elements */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

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

.form-input:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 15px rgba(15, 240, 252, 0.2);
  background: rgba(15, 240, 252, 0.05);
}

.form-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: rgba(0, 0, 0, 0.35);
  /* Tinted transparency */
  border-right: 1px solid rgba(188, 19, 254, 0.1);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 999;
  backdrop-filter: blur(10px);
}

.sidebar-logo-icon {
  display: none;
}

.sidebar-nav {
  flex: 1;
  /* Push footer to bottom */
  display: flex;
  flex-direction: column;
  /* Force vertical stacking */
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* User Info Simplified */
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  /* Vertical order */
  gap: var(--space-md);
}

.user-info {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 700;
  color: white;
  font-size: 1.1rem;
  /* Bigger Username */
  letter-spacing: 0.5px;
}

.user-role {
  display: none;
  /* Hide role as requested */
}

/* Button override for sidebar */
#logoutBtn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  color: white;
  background: linear-gradient(90deg, rgba(255, 42, 109, 0.2) 0%, rgba(188, 19, 254, 0.2) 100%);
  border: 1px solid rgba(255, 42, 109, 0.5);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.1);
}

#logoutBtn:hover {
  color: var(--error);
  box-shadow: 0 0 15px rgba(255, 42, 109, 0.2);
}


/* Status Badges */
.status-badge.connected {
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  border: 1px solid rgba(0, 255, 157, 0.3);
}

.status-badge.disconnected {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.connected .status-dot {
  background: #00ff9d;
  box-shadow: 0 0 10px #00ff9d;
}

/* Alert Messages */
.alert {
  border-left: 4px solid;
}

.alert-success {
  border-color: var(--success);
  background: rgba(0, 255, 157, 0.1);
  color: var(--success);
}

.alert-error {
  border-color: var(--error);
  background: rgba(255, 42, 109, 0.1);
  color: var(--error);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-text {
    font-size: 2.2rem;
  }

  .logo-large h1 {
    font-size: 3rem;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* Utilities */
.hidden {
  display: none !important;
}

.glow {
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.5);
}

/* Compact Login Override */
.login-card {
  max-width: 380px !important;
  padding: var(--space-xl) !important;
  background: rgba(10, 10, 15, 0.8) !important;
}

.main-content {
  margin-left: 260px;
  padding: var(--space-xl);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}


.stars {
  background: black url('../images/starfield.jpg') center center no-repeat !important;
  background-size: cover !important;
  z-index: -2;
  filter: brightness(0.6);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
}

.twinkling {
  /* display: none !important; Removed to enable animation */
}

/* Sidebar Navigation Buttons */
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  margin-bottom: var(--space-xs);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  width: 100%;
  font-weight: 500;
  text-decoration: none;
  /* Ensure no underline */
}

.nav-item:hover {
  background: rgba(188, 19, 254, 0.15);
  color: white;
  border-color: var(--accent-primary);
  transform: translateX(3px);
  box-shadow: 0 0 15px rgba(188, 19, 254, 0.1);
  text-shadow: none;
  /* override generic a:hover */
}

.nav-item.active {
  background: rgba(188, 19, 254, 0.25);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(188, 19, 254, 0.2);
}

.nav-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Settings Page Layout */
.settings-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

/* Settings Button Polish */
.settings-item {
  background: var(--bg-card);
  /* Match .card style */
  backdrop-filter: blur(10px);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
  text-decoration: none;
  /* fix link style */
}

.settings-item:hover {
  background: rgba(188, 19, 254, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  /* subtle lift */
  color: white;
}

.settings-item-icon {
  background: rgba(255, 255, 255, 0.05);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--accent-secondary);
  margin-right: 15px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 0 50px rgba(188, 19, 254, 0.3);
  animation: modal-slide 0.3s ease-out;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: white;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-lg);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

@keyframes modal-slide {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  cursor: pointer;
}

.checkbox-item input {
  margin-top: 4px;
}