/* ========================================
   ESP32 Web Flasher - Modern Styles
   Bootstrap 5.0 + Google Fonts Integration
   ======================================== */

/* ========== CSS Variables ========== */
:root {
  /* Modern Blue/Purple Gradient Color Scheme */
  --bg-gradient-start: #667eea;
  --bg-gradient-mid: #764ba2;
  --bg-gradient-end: #f093fb;

  --card-bg: #ffffff;
  --card-shadow: rgba(102, 126, 234, 0.4);

  /* Primary Colors - Vibrant Blue/Purple */
  --primary-color: #667eea;
  --primary-hover: #5568d3;
  --primary-light: #e0e7ff;
  --primary-gradient-start: #667eea;
  --primary-gradient-end: #764ba2;

  /* Accent Colors */
  --success-color: #10b981;
  --success-light: #d1fae5;
  --danger-color: #ef4444;
  --danger-light: #fee2e2;
  --warning-color: #f59e0b;
  --warning-light: #fef3c7;
  --info-color: #06b6d4;
  --info-light: #cffafe;

  /* Neutral Colors */
  --dark-color: #1f2937;
  --dark-light: #374151;
  --light-color: #f9fafb;
  --muted-color: #6b7280;
  --border-color: #e5e7eb;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(102, 126, 234, 0.25);

  /* Border Radius */
  --border-radius: 0.75rem;
  --border-radius-lg: 1rem;

  /* Transitions */
  --transition-speed: 0.3s;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Global Styles ========== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--dark-color);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* ========== Container Styles ========== */
.container-fluid {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Make card optimized for wide screens */
.container-fluid > .card {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
}

/* Compact layout improvements */
@media (min-width: 1200px) {
  .container-fluid {
    padding: 1.5rem;
  }
  
  /* Reduce vertical spacing on large screens */
  .card-body {
    padding: 1.5rem !important;
  }
  
  /* Optimize firmware info display */
  .firmware-info {
    max-height: 400px;
    overflow-y: auto;
  }
  
  /* Allow log terminal height to be controlled by JS on wide screens - make it taller */
  .log-terminal {
    min-height: 320px;
    max-height: none;
  }
}

/* ========== Card Styles ========== */
.card {
  border-radius: var(--border-radius-lg);
  transition: transform var(--transition-speed) var(--transition-ease),
              box-shadow var(--transition-speed) var(--transition-ease);
  box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.2),
              0 5px 10px -5px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(102, 126, 234, 0.25),
              0 8px 15px -5px rgba(0, 0, 0, 0.1);
}

.card-body {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem !important;
}

/* Optimize spacing for fit to screen */
.card-body .mb-4 {
  margin-bottom: 0.875rem !important;
}

.card-body .mb-3 {
  margin-bottom: 0.625rem !important;
}

.card-body .py-4 {
  padding-top: 0.875rem !important;
  padding-bottom: 0.875rem !important;
}

.card-body h1 {
  margin-bottom: 0.5rem !important;
}

.card-body h3,
.card-body .h5 {
  margin-bottom: 0.625rem !important;
}

/* ========== Typography ========== */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

h3, .h5 {
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--dark-color);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* ========== Button Styles ========== */
.btn {
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) var(--transition-ease);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.3px;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn-lg {
  padding: 0.625rem 1.5rem;
  font-size: 0.95rem;
}

.btn i {
  font-size: 1.05em;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
  border: none;
  color: white;
  box-shadow: 0 4px 15px 0 rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), #6b4fa0);
  box-shadow: 0 6px 20px 0 rgba(102, 126, 234, 0.5);
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, var(--success-color), #059669);
  border: none;
  box-shadow: 0 4px 15px 0 rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.5);
}

/* Outline Buttons */
.btn-outline-danger {
  border: 2px solid var(--danger-color);
  color: var(--danger-color);
  background: transparent;
}

.btn-outline-danger:hover {
  background: var(--danger-color);
  color: white;
  border-color: var(--danger-color);
}

.btn-outline-warning {
  border: 2px solid var(--warning-color);
  color: var(--warning-color);
  background: transparent;
}

.btn-outline-warning:hover {
  background: var(--warning-color);
  color: white;
  border-color: var(--warning-color);
}

.btn-outline-secondary {
  border: 2px solid var(--muted-color);
  color: var(--muted-color);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--muted-color);
  color: white;
  border-color: var(--muted-color);
}

.btn-outline-info {
  border: 2px solid var(--info-color);
  color: var(--info-color);
  background: transparent;
}

.btn-outline-info:hover {
  background: var(--info-color);
  color: white;
  border-color: var(--info-color);
}

/* ========== Form Controls ========== */
.form-select,
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid var(--border-color);
  transition: all var(--transition-speed) var(--transition-ease);
  font-size: 1rem;
  background: white;
}

.form-select:focus,
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
  outline: none;
}

.form-select-lg {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.form-label {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  font-weight: 600;
}

.form-label i {
  color: var(--primary-color);
}

/* Flash Address Input */
.flash-address-input {
  width: 110px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.875rem;
  text-align: center;
  background: var(--primary-light);
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 2px solid var(--primary-color);
}

.flash-address-input:focus {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

.flash-address-input:invalid {
  border-color: var(--danger-color);
  background: var(--danger-light);
}

/* ========== File Drop Zone ========== */
.file-drop {
  border: 3px dashed rgba(102, 126, 234, 0.4);
  border-radius: var(--border-radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--transition-speed) var(--transition-ease);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  cursor: pointer;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.file-drop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
  opacity: 0;
  transition: opacity var(--transition-speed) var(--transition-ease);
  z-index: 0;
}

/* Make entire file-drop clickable by expanding the input */
.file-drop input[type="file"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
  display: block !important;
}

.file-drop:hover {
  border-color: var(--primary-color);
  border-style: solid;
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.file-drop:hover::before {
  opacity: 0.1;
}

.file-drop.dragover {
  border-color: var(--success-color);
  background: var(--success-light);
  border-style: solid;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.file-drop > div {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.file-drop > div * {
  pointer-events: none;
}

/* Allow the browse link to still work */
.file-drop a#browseBtn {
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.file-drop i.bi-file-earmark-arrow-up {
  color: var(--primary-color);
  transition: transform var(--transition-speed) var(--transition-ease);
  filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.2));
}

.file-drop:hover i.bi-file-earmark-arrow-up {
  transform: translateY(-8px) scale(1.1);
  color: var(--primary-gradient-end);
}

/* ========== Progress Bar ========== */
.progress-custom {
  width: 100%;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
}

.progress-custom > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,
    var(--primary-gradient-start) 0%,
    var(--primary-gradient-end) 50%,
    var(--info-color) 100%
  );
  width: 0%;
  transition: width 0.3s var(--transition-ease);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.progress-custom > i::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.1) 100%
  );
}

.progress-custom > i::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

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

/* ========== Log Terminal ========== */
.log-terminal {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e0e7ff;
  padding: 1rem;
  border-radius: var(--border-radius-lg);
  max-height: 400px;
  overflow: auto;
  font-size: 0.8125rem;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  line-height: 1.5;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4),
              0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.2);
  position: relative;
}

.log-terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(102, 126, 234, 0.5),
    transparent
  );
}

.log-terminal::-webkit-scrollbar {
  width: 10px;
}

.log-terminal::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 5px;
}

.log-terminal::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-gradient-start), var(--primary-gradient-end));
  border-radius: 5px;
  border: 2px solid #0f172a;
}

.log-terminal::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-hover), #6b4fa0);
}

/* ========== Status Indicator ========== */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
  position: relative;
}

.status-connected {
  background: var(--success-color);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8),
              0 0 20px rgba(16, 185, 129, 0.4);
}

.status-connected::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid var(--success-color);
  opacity: 0;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-disconnected {
  background: var(--danger-color);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8),
              0 0 20px rgba(239, 68, 68, 0.4);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ========== Badge Styles ========== */
.badge {
  font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.badge.bg-secondary {
  background: linear-gradient(135deg, #6b7280, #4b5563) !important;
}

/* ========== Responsive Design ========== */

/* Desktop Optimizations */
@media (min-width: 1400px) {
  .container-fluid {
    max-width: 1500px;
  }
  
  /* More compact spacing on very wide screens */
  .card-body {
    padding: 2rem !important;
  }
  
  .log-terminal {
    min-height: 350px;
  }
}

/* Large Desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
  .log-terminal {
    min-height: 320px;
  }
  
  .firmware-info {
    max-height: 380px;
  }
}

/* Medium screens - still keep 2 column layout */
@media (min-width: 992px) and (max-width: 1199px) {
  .container-fluid {
    max-width: 1200px;
  }
  
  .log-terminal {
    min-height: 280px;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .container-fluid {
    padding: 1rem;
  }

  .card-body {
    padding: 1.25rem !important;
  }

  .log-terminal {
    min-height: 250px;
  }
  
  /* Single column layout for tablets */
  .col-xl-5, .col-xl-7 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .container-fluid {
    padding: 0.75rem;
  }

  .card-body {
    padding: 1rem !important;
  }

  h1 {
    font-size: 1.5rem;
  }

  .btn-lg {
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
  }

  .file-drop {
    padding: 1rem;
    min-height: 100px;
  }

  .log-terminal {
    min-height: 220px;
    font-size: 0.8rem;
    padding: 0.75rem;
  }

  .flash-address-input {
    width: 95px;
  }
  
  .firmware-info {
    max-height: 300px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 14px;
    padding: 0;
  }

  .container {
    padding: 0.75rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  .card-body {
    padding: 0.875rem !important;
  }

  .btn-lg {
    padding: 0.55rem 1rem;
    font-size: 0.9rem;
  }

  .file-drop {
    min-height: 110px;
    padding: 1rem;
  }

  .flash-address-input {
    width: 85px;
    font-size: 0.8rem;
  }
}

/* ========== Utility Classes ========== */
.text-muted {
  color: var(--muted-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.card {
  animation: slideIn 0.6s var(--transition-ease);
}

/* ========== Link Styles ========== */
a {
  color: var(--primary-color);
  transition: color var(--transition-speed) var(--transition-ease);
  text-decoration: none;
}

a:hover {
  color: var(--primary-gradient-end);
  text-decoration: none;
}

/* ========== Footer Styles ========== */
/* Hide footer completely */
.text-center.mt-4.text-muted,
.text-center.text-muted,
footer .text-muted {
  display: none !important;
}

.text-center.mt-4.text-muted small,
.text-center.text-muted small,
footer .text-muted small {
  color: white !important;
  font-size: 0.95rem;
  font-weight: 600;
}

.text-center.mt-4.text-muted a,
.text-center.text-muted a,
footer .text-muted a,
footer a {
  font-weight: 700 !important;
  color: white !important;
  text-decoration: none;
  transition: all var(--transition-speed) var(--transition-ease);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.text-center.mt-4.text-muted a:hover,
.text-center.text-muted a:hover,
footer .text-muted a:hover,
footer a:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.text-center.mt-4.text-muted i,
.text-center.text-muted i,
footer .text-muted i,
footer i {
  font-size: 1.1em;
  vertical-align: middle;
  color: white !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ========== HR Divider ========== */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--border-color),
    transparent
  );
  margin: 1.5rem 0;
}

/* ========== Icon Styles ========== */
.bi {
  vertical-align: middle;
}

/* ========== Additional Enhancements ========== */
.card-body > div {
  position: relative;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background: var(--primary-color);
  color: white;
}

::-moz-selection {
  background: var(--primary-color);
  color: white;
}

/* ========== Warning Modal ========== */
.warning-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.warning-modal.show {
  opacity: 1;
  visibility: visible;
}

.warning-content {
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.warning-modal.show .warning-content {
  transform: scale(1);
}

.warning-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--danger-color), #f59e0b, var(--danger-color));
}

.warning-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.warning-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--danger-color), #f59e0b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.warning-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin: 0;
  background: linear-gradient(135deg, var(--danger-color), #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.warning-message {
  color: var(--dark-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.warning-browsers {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.warning-browsers h4 {
  color: var(--success-color);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.browser-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.browser-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  color: var(--dark-light);
  font-weight: 500;
}

.browser-list li::before {
  content: '✓';
  color: var(--success-color);
  font-weight: bold;
}

.current-browser {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
}

.current-browser h4 {
  color: var(--danger-color);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.current-browser p {
  margin: 0;
  color: var(--dark-light);
  font-weight: 500;
}

.warning-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.warning-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warning-btn-primary {
  background: linear-gradient(135deg, var(--danger-color), #f59e0b);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.warning-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.warning-btn-secondary {
  background: #f1f5f9;
  color: var(--dark-light);
  border: 1px solid var(--border-color);
}

.warning-btn-secondary:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

/* ========== Flash Status Notification ========== */
#flashStatusNotification {
  background: linear-gradient(135deg, #e0f2fe, #b3e5fc);
  border: 1px solid #81d4fa;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#flashStatusNotification .spinner-border {
  color: var(--primary-color);
}

#flashStatusNotification strong {
  color: var(--primary-color);
  font-weight: 600;
}

/* ========== Firmware Info Display ========== */
.firmware-info {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  border: 1px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  transition: all var(--transition-speed) var(--transition-ease);
}

.firmware-details {
  position: relative;
}

.firmware-info:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

#firmwareName {
  font-size: 0.95rem;
  color: var(--primary-color) !important;
}

#firmwareDescription {
  line-height: 1.4;
  color: var(--dark-light) !important;
}

.firmware-info .d-flex span {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.firmware-info .bi {
  color: var(--primary-color);
  font-size: 0.85em;
}

#clearFirmwareInfo {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  transition: all var(--transition-speed) var(--transition-ease);
}

#clearFirmwareInfo:hover {
  background-color: var(--danger-color);
  border-color: var(--danger-color);
  color: white;
  transform: scale(1.05);
}