/* ================================
   FLUENT DESIGN MODERN THEME
   MCLauncher API Updater
   ================================ */

:root {
  /* Fluent Design Colors */
  --fluent-bg-primary: #1e1e1e;
  --fluent-bg-secondary: #2d2d2d;
  --fluent-bg-tertiary: #252526;
  --fluent-bg-card: rgba(45, 45, 45, 0.8);
  --fluent-bg-glass: rgba(255, 255, 255, 0.05);
  --fluent-border: rgba(255, 255, 255, 0.1);
  --fluent-border-hover: rgba(255, 255, 255, 0.2);
  
  /* Text Colors */
  --fluent-text-primary: #ffffff;
  --fluent-text-secondary: #ffffff;
  --fluent-text-muted: #ffffff;
  
  /* Accent Colors */
  --fluent-accent: #0078d4;
  --fluent-accent-hover: #106ebe;
  --fluent-accent-light: rgba(0, 120, 212, 0.1);
  
  /* Status Colors */
  --fluent-success: #107c10;
  --fluent-warning: #ff8c00;
  --fluent-danger: #d13438;
  --fluent-info: #0078d4;
  
  /* Shadows */
  --fluent-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --fluent-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
  --fluent-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
  
  /* Animations */
  --fluent-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --fluent-duration: 0.3s;
}

/* ================================
   BASE STYLES
   ================================ */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--fluent-bg-primary);
  color: var(--fluent-text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.fluent-bg {
  background: linear-gradient(135deg, 
    var(--fluent-bg-primary) 0%, 
    var(--fluent-bg-secondary) 50%, 
    var(--fluent-bg-tertiary) 100%);
  position: relative;
  min-height: 100vh;
}

/* ================================
   ANIMATED BACKGROUND PARTICLES
   ================================ */

.particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, var(--fluent-accent) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  opacity: 0.1;
}

.particle:nth-child(1) {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.particle:nth-child(2) {
  width: 60px;
  height: 60px;
  top: 60%;
  left: 80%;
  animation-delay: 2s;
}

.particle:nth-child(3) {
  width: 80px;
  height: 80px;
  top: 40%;
  left: 70%;
  animation-delay: 4s;
}

.particle:nth-child(4) {
  width: 40px;
  height: 40px;
  top: 80%;
  left: 20%;
  animation-delay: 1s;
}

.particle:nth-child(5) {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 60%;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }
  50% { 
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.3;
  }
}

/* ================================
   GLOBAL LOADING OVERLAY
   ================================ */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--fluent-duration) var(--fluent-ease);
}

.loading-overlay.show {
  display: flex;
  animation: fadeIn var(--fluent-duration) var(--fluent-ease);
}

.loading-content {
  text-align: center;
  color: var(--fluent-text-primary);
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--fluent-border);
  border-top: 3px solid var(--fluent-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-text {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  opacity: 0.8;
}

/* ================================
   FLUENT DESIGN COMPONENTS
   ================================ */

/* Cards with Fluent Design */
.fluent-card {
  background: var(--fluent-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--fluent-border);
  border-radius: 12px;
  box-shadow: var(--fluent-shadow-md);
  transition: all var(--fluent-duration) var(--fluent-ease);
  overflow: hidden;
  position: relative;
}

.fluent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fluent-border), transparent);
  opacity: 0.5;
}

.fluent-card:hover {
  border-color: var(--fluent-border-hover);
  box-shadow: var(--fluent-shadow-lg);
  transform: translateY(-2px);
}

.fluent-card-header {
  background: var(--fluent-bg-glass);
  border-bottom: 1px solid var(--fluent-border);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fluent-card-header h3 {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fluent-card-header .icon {
  color: var(--fluent-accent);
  font-size: 1.2rem;
}

.fluent-card-body {
  padding: 1.5rem;
}

/* Buttons with Fluent Design */
.fluent-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--fluent-duration) var(--fluent-ease);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: var(--fluent-bg-secondary);
  color: var(--fluent-text-primary);
}

.fluent-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s var(--fluent-ease);
}

.fluent-btn:hover::before {
  left: 100%;
}

.fluent-btn:hover {
  background: var(--fluent-bg-tertiary);
  border-color: var(--fluent-border-hover);
  transform: translateY(-1px);
  box-shadow: var(--fluent-shadow-sm);
}

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

/* Button Variants */
.fluent-btn-primary {
  background: var(--fluent-accent);
  color: white;
  box-shadow: var(--fluent-shadow-sm);
}

.fluent-btn-primary:hover {
  background: var(--fluent-accent-hover);
  color: white;
}

.fluent-btn-success {
  background: var(--fluent-success);
  color: white;
}

.fluent-btn-warning {
  background: var(--fluent-warning);
  color: white;
}

.fluent-btn-danger {
  background: var(--fluent-danger);
  color: white;
}

.fluent-btn-ghost {
  background: transparent;
  border-color: var(--fluent-border);
}

.fluent-btn-ghost:hover {
  background: var(--fluent-bg-glass);
}

/* Icon buttons */
.fluent-btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================================
   FORM CONTROLS
   ================================ */

.fluent-form-control {
  background: var(--fluent-bg-secondary);
  border: 1px solid var(--fluent-border);
  border-radius: 6px;
  color: var(--fluent-text-primary);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  transition: all var(--fluent-duration) var(--fluent-ease);
}

.fluent-form-control:focus {
  outline: none;
  border-color: var(--fluent-accent);
  box-shadow: 0 0 0 3px var(--fluent-accent-light);
  background: var(--fluent-bg-tertiary);
}

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

/* ================================
   PROGRESS BARS
   ================================ */

.fluent-progress {
  background: var(--fluent-bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  height: 8px;
  position: relative;
}

.fluent-progress-lg {
  height: 24px;
}

.fluent-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--fluent-accent), #1ba1f2);
  border-radius: 12px;
  transition: width var(--fluent-duration) var(--fluent-ease);
  position: relative;
  overflow: hidden;
}

.fluent-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

.fluent-progress-bar.animated {
  background-size: 20px 20px;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.1) 75%,
    transparent 75%,
    transparent
  );
  animation: progress-stripes 1s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes progress-stripes {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

/* Progress variants */
.fluent-progress-success .fluent-progress-bar {
  background: linear-gradient(90deg, var(--fluent-success), #13a10e);
}

.fluent-progress-warning .fluent-progress-bar {
  background: linear-gradient(90deg, var(--fluent-warning), #ffb347);
}

.fluent-progress-danger .fluent-progress-bar {
  background: linear-gradient(90deg, var(--fluent-danger), #ff6b6b);
}

/* ================================
   BADGES & STATUS INDICATORS
   ================================ */

.fluent-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--fluent-bg-secondary);
  color: var(--fluent-text-secondary);
  border: 1px solid var(--fluent-border);
}

.fluent-badge-success {
  background: rgba(16, 124, 16, 0.2);
  color: #4ade80;
  border-color: rgba(16, 124, 16, 0.3);
}

.fluent-badge-warning {
  background: rgba(255, 140, 0, 0.2);
  color: #fbbf24;
  border-color: rgba(255, 140, 0, 0.3);
}

.fluent-badge-danger {
  background: rgba(209, 52, 56, 0.2);
  color: #f87171;
  border-color: rgba(209, 52, 56, 0.3);
}

.fluent-badge-primary {
  background: rgba(0, 120, 212, 0.2);
  color: #60a5fa;
  border-color: rgba(0, 120, 212, 0.3);
}

/* ================================
   TABLES
   ================================ */

.fluent-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}

.fluent-table th,
.fluent-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--fluent-border);
}

.fluent-table th {
  background: var(--fluent-bg-glass);
  font-weight: 600;
  color: var(--fluent-text-secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fluent-table tbody tr {
  transition: background-color var(--fluent-duration) var(--fluent-ease);
}

.fluent-table tbody tr:hover {
  background: var(--fluent-bg-glass);
}

/* ================================
   NAVIGATION & HEADER
   ================================ */

.fluent-navbar {
  background: var(--fluent-bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--fluent-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.fluent-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fluent-text-primary);
  text-decoration: none;
}

.fluent-brand .icon {
  color: var(--fluent-accent);
  font-size: 2rem;
}

.fluent-nav-link {
  color: var(--fluent-text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all var(--fluent-duration) var(--fluent-ease);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fluent-nav-link:hover {
  color: var(--fluent-text-primary);
  background: var(--fluent-bg-glass);
}

/* ================================
   ANIMATIONS & TRANSITIONS
   ================================ */

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

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from { 
    opacity: 0;
    transform: translateY(-20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.animate-fade-in {
  animation: fadeIn var(--fluent-duration) var(--fluent-ease);
}

.animate-slide-up {
  animation: slideUp var(--fluent-duration) var(--fluent-ease);
}

.animate-slide-down {
  animation: slideDown var(--fluent-duration) var(--fluent-ease);
}

.animate-scale {
  animation: scale var(--fluent-duration) var(--fluent-ease);
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ================================
   UTILITY CLASSES
   ================================ */

.text-gradient {
  background: linear-gradient(135deg, var(--fluent-accent), #1ba1f2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  backdrop-filter: blur(20px);
  background: var(--fluent-bg-glass);
  border: 1px solid var(--fluent-border);
}

.hover-lift {
  transition: transform var(--fluent-duration) var(--fluent-ease);
}

.hover-lift:hover {
  transform: translateY(-2px);
}

.shadow-fluent {
  box-shadow: var(--fluent-shadow-md);
}

.rounded-fluent {
  border-radius: 12px;
}

/* Version Display Components */
.version-info {
  text-align: center;
}

.version-display {
  background: var(--fluent-bg-secondary);
  border: 1px solid var(--fluent-border);
  border-radius: 8px;
  padding: 12px 8px;
  position: relative;
  transition: all var(--fluent-duration) var(--fluent-ease);
}

.version-display.current {
  border-color: var(--fluent-info);
  background: rgba(0, 120, 212, 0.1);
}

.version-display.latest {
  border-color: var(--fluent-success);
  background: rgba(16, 124, 16, 0.1);
}

.version-display.needs-update {
  border-color: var(--fluent-warning);
  background: rgba(255, 140, 0, 0.1);
  animation: pulse-warning 2s infinite;
}

.version-text {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fluent-text-primary);
  display: block;
}

.version-display.current .version-text {
  color: var(--fluent-info);
}

.version-display.latest .version-text {
  color: var(--fluent-success);
}

.version-display.needs-update .version-text {
  color: var(--fluent-warning);
}

@keyframes pulse-warning {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.3);
  }
  50% { 
    box-shadow: 0 0 0 8px rgba(255, 140, 0, 0);
  }
}

/* Button states improvement */
.fluent-btn.disabled,
.fluent-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.fluent-btn.disabled::before,
.fluent-btn:disabled::before {
  display: none;
}

/* Enhanced warning button states */
.fluent-btn.text-warning {
  border-color: var(--fluent-warning);
  background: rgba(255, 140, 0, 0.1);
  color: var(--fluent-warning);
}

.fluent-btn.text-warning:hover {
  background: rgba(255, 140, 0, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

/* Tooltip styles for disabled buttons */
.fluent-btn:disabled[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fluent-bg-tertiary);
  color: var(--fluent-text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 8px;
  box-shadow: var(--fluent-shadow-md);
  border: 1px solid var(--fluent-border);
}

.fluent-btn:disabled[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--fluent-border);
  z-index: 1000;
  margin-bottom: 2px;
}

/* ================================
   SPECIFIC COMPONENT STYLES
   ================================ */

/* Installation Cards */
.installation-card {
  position: relative;
  overflow: visible;
}

.installation-card.needs-update {
  border-left: 4px solid var(--fluent-warning);
}

.installation-card.needs-update::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, var(--fluent-warning), transparent, var(--fluent-warning));
  border-radius: 12px;
  opacity: 0.1;
  z-index: -1;
}

/* Mass Action Card */
.mass-action-card {
  position: relative;
}

.mass-action-card::before {
  background: linear-gradient(90deg, var(--fluent-accent), var(--fluent-info), var(--fluent-accent));
}

/* Button sizes */
.fluent-btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

.fluent-btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 8px;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  background: var(--fluent-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--fluent-border);
  border-radius: 8px;
  box-shadow: var(--fluent-shadow-lg);
  overflow: hidden;
}

.notification-content {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fluent-text-primary);
}

.notification-content i {
  font-size: 18px;
  flex-shrink: 0;
}

.notification-close {
  background: none;
  border: none;
  color: var(--fluent-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  transition: all var(--fluent-duration) var(--fluent-ease);
}

.notification-close:hover {
  background: var(--fluent-bg-glass);
  color: var(--fluent-text-primary);
}

.notification-success .notification-content i {
  color: var(--fluent-success);
}

.notification-warning .notification-content i {
  color: var(--fluent-warning);
}

.notification-error .notification-content i {
  color: var(--fluent-danger);
}

.notification-info .notification-content i {
  color: var(--fluent-info);
}

/* Form styles */
.form-label {
  color: var(--fluent-text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.form-check-input {
  background-color: var(--fluent-bg-secondary);
  border-color: var(--fluent-border);
}

.form-check-input:checked {
  background-color: var(--fluent-accent);
  border-color: var(--fluent-accent);
}

.form-check-input:focus {
  border-color: var(--fluent-accent);
  box-shadow: 0 0 0 0.25rem var(--fluent-accent-light);
}

/* Text utilities */
.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
  .fluent-card-body {
    padding: 1rem;
  }
  
  .fluent-card-header {
    padding: 1rem;
  }
  
  .fluent-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .particles-bg .particle {
    display: none;
  }
  
  .installation-card .d-flex.align-items-start {
    flex-direction: column;
    gap: 1rem;
  }
  
  .installation-card .d-flex.flex-column {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 576px) {
  .fluent-card {
    border-radius: 8px;
    margin: 0 10px;
  }
  
  .fluent-navbar {
    padding: 0.5rem 0;
  }
  
  .fluent-brand span {
    display: none;
  }
  
  .mass-action-card .row {
    gap: 1rem;
  }
  
  .mass-action-card .col-md-6 {
    flex: 1 1 100%;
  }
  
  .mass-action-card .d-flex {
    justify-content: center;
  }
}

/* ================================
   BOOTSTRAP OVERRIDES
   ================================ */

/* Force all muted text to be white */
.text-muted {
  color: var(--fluent-text-primary) !important;
}

/* Force small muted text to be white */
.small.text-muted {
  color: var(--fluent-text-primary) !important;
}

/* Any other muted or secondary text */
.text-secondary {
  color: var(--fluent-text-primary) !important;
}
