* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #12121f;
  --bg-card: #1a1a2e;
  --bg-hover: #252542;
  --text-primary: #ffffff;
  --text-secondary: #a0a0c0;
  --text-muted: #6b6b8b;
  --accent-blue: #4a6cf7;
  --accent-blue-hover: #3a5be0;
  --accent-green: #2ecc71;
  --accent-green-dim: #1e8b4c;
  --accent-green-hover: #1e8b4c;
  --accent-red: #e74c3c;
  --accent-red-dim: #c0392b;
  --accent-orange: #f39c12;
  --accent-yellow: #f1c40f;
  --border-color: #2a2a4a;
  --border-light: #33334d;
  --slider-track: #2a2a4a;
  --slider-thumb: #4a6cf7;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.7);
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

.app-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 5px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: var(--bg-secondary);
  border-radius: 20px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 600;
  background: linear-gradient(135deg, #fff 0%, #a0a0c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo .model {
  font-size: 1rem;
  background: var(--accent-blue);
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 10px;
  -webkit-text-fill-color: white;
}


.logo {
  display: flex;
  flex-direction: column;
}

.model-features {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.model {
  font-size: 1rem;
  padding: 4px 12px;
  border-radius: 20px;
  margin-left: 10px;
}

.model-m900 {
  background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
  color: white;
}

.model-m6400 {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: white;
}

.model-m6200 {
  background: linear-gradient(135deg, #fdcb6e, #e17055);
  color: white;
}

/* Hide CH3 for non-M900 models */
body.model-m6400 #ch3Card,
body.model-m6200 #ch3Card {
  display: none;
}

/* Hide vacuum for M6200 */
body.model-m6200 #vacuumPanel {
  display: none;
}


.header-controls {
  display: flex;
  align-items: center;
  gap: 25px;
}

.time-display {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.indicator.online {
  background: var(--accent-green);
  box-shadow: 0 0 15px var(--accent-green);
}

.indicator.offline {
  background: var(--accent-red);
}

#connectionText {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.connect-btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}


.connect-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

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

.install-btn {
  background: var(--accent-green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.install-btn:hover {
  background: var(--accent-green-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

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

/* Dashboard */
.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

.channel-card { 
  position: relative; /* This is needed for the absolute positioning of badges */
  background: var(--bg-card);
  border-radius: 25px;
  padding: 25px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.channel-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-hover);
}

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

.channel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-title h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.handle-badge {
  background: #000000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #2196F3;
}

.channel-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-led.on {
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.status-led.standby {
  background: var(--accent-yellow);
  box-shadow: 0 0 10px var(--accent-yellow);
}

.status-led.off {
  background: var(--accent-red);
}

.status-led.error {
  background: var(--accent-red);
  animation: pulse 1s infinite;
}

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

.temp-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 25px;
  padding: 20px;
  background: #000000;
  border-radius: 20px;
}

.current-temp {
  display: flex;
  align-items: baseline;
}

.temp-value {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  /*background: linear-gradient(135deg, #fff 0%, var(--accent-blue) 100%); */
  color: var(--accent-green);
  -webkit-background-clip: text;
  /* -webkit-text-fill-color: transparent; */
}

.temp-unit {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-left: 5px;
}

.setpoint-display {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.setpoint-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.setpoint-value {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
}

.channel-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.power-control {
  display: flex;
  justify-content: center;
}

.power-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.power-btn[data-state="on"] {
  background: var(--accent-green);
  color: white;
  border-color: var(--accent-green);
  box-shadow: 0 0 20px var(--accent-green);
}

.power-btn[data-state="off"] {
  background: var(--accent-red-dim);
  color: white;
  border-color: var(--accent-red);
}

.power-btn:hover {
  transform: scale(1.1);
}

.slider-control {
  width: 100%;
}

.temp-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--slider-track);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 10px;
}

.temp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--slider-thumb);
  cursor: pointer;
  box-shadow: 0 0 10px var(--slider-thumb);
  transition: all 0.2s ease;
}

.temp-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-limits {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.channel-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-blue);
}

/* Vacuum Panel */
.vacuum-panel {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.panel-header i {
  color: var(--accent-blue);
  font-size: 1.2rem;
}

.panel-header h3 {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
}

.vacuum-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vacuum-status-display {
  font-size: 1.1rem;
}

.vacuum-status-display .status-text {
  color: var(--accent-green);
  font-weight: 600;
}

.vacuum-buttons {
  display: flex;
  gap: 15px;
}

.vacuum-btn {
  padding: 10px 25px;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.vacuum-btn.on {
  background: var(--accent-green);
  color: white;
}

.vacuum-btn.on:hover {
  background: var(--accent-green-dim);
  transform: translateY(-2px);
}

.vacuum-btn.off {
  background: var(--accent-red);
  color: white;
}

.vacuum-btn.off:hover {
  background: var(--accent-red-dim);
  transform: translateY(-2px);
}

/* System Info */
.system-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 15px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-blue);
}

/* Graph Panel */
.graph-panel {
  background: var(--bg-card);
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

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

.graph-header h3 {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 500;
}

.graph-controls {
  display: flex;
  gap: 15px;
}

.graph-select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  outline: none;
}

.graph-select:hover {
  border-color: var(--accent-blue);
}

.clear-graph-btn {
  background: var(--accent-red-dim);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.clear-graph-btn:hover {
  background: var(--accent-red);
  transform: translateY(-2px);
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Advanced Panel */
.advanced-panel {
  background: var(--bg-card);
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.security-badge {
  background: var(--accent-orange);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 15px;
}

.security-section {
  margin-bottom: 25px;
}

.pin-entry {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.security-select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 10px;
  min-width: 180px;
  cursor: pointer;
}

.pin-entry input {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 9px 20px;
  border-radius: 10px;
  width: 120px;
  font-size: 1rem;
  text-align: center;
}

.pin-entry input:focus {
  border-color: var(--accent-blue);
  outline: none;
}

.unlock-btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.unlock-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
}

.lock-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--accent-red);
  font-size: 0.9rem;
}

.lock-indicator.unlocked {
  color: var(--accent-green);
}

/* Register Browser */
.register-browser {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 20px;
}

.register-categories {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.category-btn.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.register-table {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.register-row {
  display: grid;
  grid-template-columns: 80px 100px 80px 1fr 80px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.register-row:hover {
  background: var(--bg-hover);
}

.register-row.selected {
  background: rgba(74, 108, 247, 0.2);
  border-left: 3px solid var(--accent-blue);
}

.register-row.header {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: default;
  position: sticky;
  top: 0;
}

.register-row.header:hover {
  background: var(--bg-card);
}

.reg-level {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 12px;
  text-align: center;
  width: fit-content;
}

.reg-level.level-4 {
  background: var(--accent-red-dim);
  color: white;
}

.reg-level.level-3 {
  background: var(--accent-orange);
  color: white;
}

.reg-level.level-2 {
  background: var(--accent-yellow);
  color: black;
}

.reg-level.level-1 {
  background: var(--accent-green-dim);
  color: white;
}

.reg-level.level-0 {
  background: var(--text-muted);
  color: white;
}

.register-controls {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 15px;
}

.selected-register {
  margin-bottom: 15px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 10px;
}

.reg-label {
  color: var(--text-muted);
  margin-right: 10px;
}

#selectedRegName {
  font-weight: 600;
  color: var(--accent-blue);
}

#selectedRegAddr {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: 5px;
}

.register-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.register-actions input {
  flex: 1;
  min-width: 150px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 10px 15px;
  border-radius: 10px;
}

.reg-action-btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.reg-action-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
}

.reg-message {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.reg-message.success {
  background: rgba(46, 204, 113, 0.2);
  color: var(--accent-green);
}

.reg-message.error {
  background: rgba(231, 76, 60, 0.2);
  color: var(--accent-red);
}

.flash-warning {
  color: var(--accent-orange);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(243, 156, 18, 0.1);
  border-radius: 10px;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}

.footer-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.footer-btn:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

.footer-right {
  display: flex;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    gap: 15px;
  }
  
  .header-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .pin-entry {
    flex-direction: column;
  }
  
  .register-categories {
    justify-content: center;
  }
  
  .register-actions {
    flex-direction: column;
  }
}

/* ==================== Slim Custom Scroller ==================== */
/* For WebKit browsers (Chrome, Safari, Edge) */
.register-table::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.register-table::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.register-table::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.register-table::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-hover);
  width: 8px;
}

.register-table::-webkit-scrollbar-corner {
  background: transparent;
}

/* For Firefox */
.register-table {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-blue) var(--bg-secondary);
}

/* For the whole page - optional subtle scrollbar */
body::-webkit-scrollbar {
  width: 8px;
}

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

body::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 10px;
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-hover);
}

/* Horizontal scrollbar for register table if needed */
.register-table::-webkit-scrollbar:horizontal {
  height: 6px;
}

/* Make the register table more compact */
.register-table {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
}

/* Slimmer register rows */
.register-row {
  display: grid;
  grid-template-columns: 60px 80px 140px 1fr 80px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

/* Even more compact for header */
.register-row.header {
  padding: 6px 12px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--accent-blue);
}

/* Adjust level badges */
.reg-level {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  text-align: center;
  width: fit-content;
  font-weight: 600;
}

/* Different colors for security levels */
.reg-level.level-4 {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

.reg-level.level-3 {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
}

.reg-level.level-2 {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  color: black;
}

.reg-level.level-1 {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

.reg-level.level-0 {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
  color: white;
}

/* Address styling */
.register-row span:nth-child(2) {
  font-family: 'Courier New', monospace;
  color: var(--accent-orange);
}

/* Register name styling */
.register-row span:nth-child(3) {
  font-weight: 500;
  color: var(--accent-blue);
}

/* Description column - truncate with ellipsis */
.register-row span:nth-child(4) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
  color: var(--text-secondary);
}

/* Access type badges */
.register-row span:nth-child(5) {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  text-align: center;
  width: fit-content;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-transform: uppercase;
}

/* Hover effect */
.register-row:hover {
  background: var(--bg-hover);
  transform: translateX(2px);
}

/* Selected row */
.register-row.selected {
  background: rgba(74, 108, 247, 0.15);
  border-left: 3px solid var(--accent-blue);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .register-row {
    grid-template-columns: 50px 70px 100px 1fr 70px;
    font-size: 0.8rem;
    padding: 6px 8px;
  }
  
  .register-row span:nth-child(4) {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .register-row {
    grid-template-columns: 40px 60px 80px 1fr 60px;
    font-size: 0.7rem;
  }
}

/* ==================== Overheat Alert Modal ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background: linear-gradient(135deg, #2a1a1a, #1a0f0f);
  margin: 15% auto;
  padding: 0;
  border: 2px solid #e74c3c;
  border-radius: 30px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 0 50px rgba(231, 76, 60, 0.5);
  animation: slideIn 0.3s ease;
  overflow: hidden;
}

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

.modal-header {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  padding: 25px;
  text-align: center;
  border-bottom: 2px solid #e74c3c;
}

.modal-header .alert-icon {
  font-size: 4rem;
  margin-bottom: 10px;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.modal-header h2 {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  margin: 0;
}

.modal-body {
  padding: 30px;
  text-align: center;
}

.alert-message {
  font-size: 1.5rem;
  color: #e74c3c;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.alert-details {
  background: rgba(231, 76, 60, 0.1);
  padding: 15px;
  border-radius: 15px;
  border: 1px solid #e74c3c;
}

#overheatChannel {
  font-size: 2rem;
  font-weight: 700;
  color: #e74c3c;
  display: block;
  margin-bottom: 5px;
}

#overheatTemp {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  display: block;
}

.modal-footer {
  padding: 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
  border-top: 1px solid #333;
}

.reset-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(231, 76, 60, 0.5);
}

.close-btn {
  background: transparent;
  color: #888;
  border: 1px solid #444;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.close-btn:hover {
  background: #333;
  color: white;
}

/* ==================== Overheat Badges ==================== */
.overheat-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #e74c3c;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  animation: pulse 1s infinite;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
  z-index: 100;
}

/* Add position relative to channel cards */
.channel-card {
  position: relative;
}

/* Temperature warning colors */
.temp-value.overheat {
  color: #e74c3c;
  animation: pulse 1s infinite;
}

.temp-value.warning {
  color: #f39c12;
}

.temp-value.normal {
  color: #2ecc71;
}

/* ==================== Blinking Animation for Overheat ==================== */
@keyframes blink-red {
  0% { border-color: #e74c3c; box-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
  50% { border-color: transparent; box-shadow: none; }
  100% { border-color: #e74c3c; box-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
}

@keyframes blink-bg {
  0% { background-color: rgba(231, 76, 60, 0.2); }
  50% { background-color: transparent; }
  100% { background-color: rgba(231, 76, 60, 0.2); }
}

.channel-card.overheat {
  animation: blink-red 1s infinite;
  border-width: 2px;
  border-style: solid;
}

.channel-card.overheat .temp-value-large {
  animation: blink-bg 1s infinite;
  color: #e74c3c;
  font-weight: bold;
}

/* Mute Button */
.mute-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.mute-btn:hover {
  transform: scale(1.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.mute-btn.muted {
  color: #e74c3c;
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.mute-btn.muted:hover {
  transform: scale(1.1);
  border-color: #e74c3c;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.2);
}

.connection-type-selector {
  display: flex;
  gap: 5px;
  margin-right: 10px;
}

.connection-option {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.connection-option:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.connection-option.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

#wifiConfig {
  margin-top: 10px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

#wifiConfig input {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: 5px;
  margin-right: 5px;
}

#wifiConfig small {
  display: block;
  color: var(--text-muted);
  margin-top: 5px;
  font-size: 0.7rem;
}

.copyright {
  text-decoration: none;
  color: #4a6cf7;
}

.export-csv-btn {
  background: var(--accent-green);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.export-csv-btn:hover {
  background: var(--accent-green-dim);
  transform: translateY(-2px);
}

.temp-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.temp-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
}

.temp-input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.set-btn {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.set-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
}

.vacuum-image {  
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 6px;
}

/* ==================== About Section with Animations ==================== */
.about-wrapper {
  max-width: 650px;
  margin: 0 auto;
  padding: 20px;
  animation: aboutFadeIn 0.6s ease-out;
}

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

/* Hero Animation */
.about-hero {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 30px 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: heroGlow 2s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(74, 108, 247, 0.1);
  }
  50% {
    box-shadow: 0 0 20px 0 rgba(74, 108, 247, 0.2);
  }
}

.about-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(74, 108, 247, 0.1) 0%, transparent 70%);
  animation: heroPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroPulse {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  50% {
    transform: translate(0, 0) scale(1.2);
    opacity: 0.5;
  }
}

.about-icon {
  font-size: 48px;
  margin-bottom: 10px;
  display: inline-block;
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.about-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #fff, #4a6cf7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(74, 108, 247, 0.3);
  }
  50% {
    text-shadow: 0 0 15px rgba(74, 108, 247, 0.5);
  }
}

/* Card Animations */
.about-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInUp 0.5s ease-out backwards;
  padding:20px;
}

.about-block:nth-child(2) { animation-delay: 0.1s; }
.about-block:nth-child(3) { animation-delay: 0.2s; }
.about-block:nth-child(4) { animation-delay: 0.3s; }
.about-block:nth-child(5) { animation-delay: 0.4s; }

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

.about-block:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.about-block-title {
  background: var(--bg-secondary);
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.about-block:hover .about-block-title {
  background: linear-gradient(135deg, var(--bg-secondary), rgba(74, 108, 247, 0.1));
}

.about-block-title i {
  color: #4a6cf7;
  font-size: 16px;
  transition: transform 0.3s ease;
}

.about-block:hover .about-block-title i {
  transform: scale(1.1) rotate(5deg);
}

/* Developer Section */
.about-block-content h2 {
  font-size: 20px;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  margin-top: 5px;
}

.about-block:hover .about-block-content h2 {
  background: linear-gradient(135deg, #6c5ce7, #4a6cf7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-link {
  display: inline-block;
  background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
  color: white;
  padding: 8px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

.about-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.about-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
}

.about-link:hover::before {
  left: 100%;
}

/* Features Animation */
.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.about-features div {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  transition: all 0.3s ease;
  animation: featureFadeIn 0.4s ease-out backwards;
  cursor: default;
}

.about-features div:nth-child(1) { animation-delay: 0.05s; }
.about-features div:nth-child(2) { animation-delay: 0.1s; }
.about-features div:nth-child(3) { animation-delay: 0.15s; }
.about-features div:nth-child(4) { animation-delay: 0.2s; }
.about-features div:nth-child(5) { animation-delay: 0.25s; }
.about-features div:nth-child(6) { animation-delay: 0.3s; }
.about-features div:nth-child(7) { animation-delay: 0.35s; }
.about-features div:nth-child(8) { animation-delay: 0.4s; }

@keyframes featureFadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.about-features div::before {
  content: "✓";
  color: #2ecc71;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
}

.about-features div:hover {
  transform: translateX(5px);
  color: var(--text-primary);
}

.about-features div:hover::before {
  transform: scale(1.2);
  color: #4a6cf7;
}

/* Model Items Animation */
.about-model {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: slideInRight 0.4s ease-out backwards;
}

.about-model:nth-child(1) { animation-delay: 0.05s; }
.about-model:nth-child(2) { animation-delay: 0.1s; }
.about-model:nth-child(3) { animation-delay: 0.15s; }

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

.about-model:hover {
  background: rgba(74, 108, 247, 0.05);
  padding-left: 10px;
  padding-right: 10px;  
}

.about-model span:first-child {
  font-weight: 600;
  color: #4a6cf7;
  transition: all 0.3s ease;
}

.about-model:hover span:first-child {
  transform: scale(1.05);
  display: inline-block;
}

/* Tech Details Animation */
.about-tech {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: slideInLeft 0.4s ease-out backwards;
}

.about-tech:nth-child(1) { animation-delay: 0.05s; }
.about-tech:nth-child(2) { animation-delay: 0.1s; }
.about-tech:nth-child(3) { animation-delay: 0.15s; }
.about-tech:nth-child(4) { animation-delay: 0.2s; }

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

.about-tech:hover {
  background: rgba(74, 108, 247, 0.05);
  padding-left: 10px;
  padding-right: 10px;  
}

.about-tech span:last-child {
  color: #4a6cf7;
  font-weight: 500;
  transition: all 0.3s ease;
}

.about-tech:hover span:last-child {
  transform: scale(1.02);
}

/* Credits Animation */
.about-credits {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  animation: fadeInUp 0.5s ease-out 0.5s backwards;
}

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

.about-credits strong {
  color: #4a6cf7;
  transition: all 0.3s ease;
  display: inline-block;
}

.about-credits strong:hover {
  transform: scale(1.05);
  text-shadow: 0 0 8px rgba(74, 108, 247, 0.5);
}

/* Particle Background Effect (Optional) */
.about-wrapper {
  position: relative;
}

.about-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(rgba(74, 108, 247, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.about-section:active .about-wrapper::before {
  opacity: 1;
}


/* ==================== Mobile Optimizations ==================== */
@media (max-width: 768px) {
  /* Header Improvements */
  .sticky-header {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }
  
  .logo-area {
    flex: 1;
  }
  
  .logo-area h1 {
    font-size: 1.1rem;
  }
  
  .logo-area img {
    height: 35px;
  }
  
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
  
  /* Time Display Mobile */
  .time-display {
    padding: 5px 10px;
    gap: 6px;
    font-size: 0.7rem;
  }
  
  .date-part {
    font-size: 0.65rem;
  }
  
  .date-part::after {
    margin-left: 5px;
  }
  
  .time-part {
    font-size: 0.75rem;
  }
  
  .clock-icon {
    font-size: 0.7rem;
  }
  
  /* Connection Status */
  .connection-status {
    gap: 4px;
  }
  
  .connection-status span {
    font-size: 0.7rem;
  }
  
  .connect-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
  }
  
  .connect-btn i {
    margin-right: 4px;
  }
  
  .install-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
  
  /* Graph Section Mobile */
  .graph-panel {
    padding: 15px;
  }
  
  .graph-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
  }
  
  .graph-header h3 {
    font-size: 1rem;
    margin: 0;
  }
  
  .graph-controls {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .graph-select {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .clear-graph-btn,
  .export-csv-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  
  .chart-container {
    height: 280px;
  }
  
  /* Chart Legend Mobile */
  .chartjs-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
  }
  
  .chartjs-legend li {
    font-size: 0.7rem;
  }
}

/* Extra Small Devices (Phones) */
@media (max-width: 480px) {
  .sticky-header {
    padding: 8px 10px;
  }
  
  .logo-area h1 {
    font-size: 0.9rem;
  }
  
  .logo-area img {
    height: 28px;
  }
  
  .time-display {
    display: none;
  }
  
  .connection-status span {
    font-size: 0.65rem;
  }
  
  .connect-btn {
    padding: 5px 10px;
    font-size: 0.65rem;
  }
  
  .graph-controls {
    flex-direction: column;
  }
  
  .graph-select {
    width: 100%;
  }
  
  .clear-graph-btn,
  .export-csv-btn {
    width: 100%;
    justify-content: center;
  }
  
  .chart-container {
    height: 240px;
  }
}

/* Optional: Add a compact time display for very small screens */
@media (max-width: 400px) {
  .compact-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 20px;
  }
  
  .compact-time i {
    font-size: 0.6rem;
  }
}

.mobile-only {
  display: none;
}

@media (max-width: 550px) {
  .desktop-time {
    display: none;
  }
  
  .mobile-only {
    display: flex;
  }
}

/* ==================== iOS Unsupported Modal ==================== */
.unsupported-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  animation: unsupportedFadeIn 0.4s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

@keyframes unsupportedFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(10px);
  }
}

.unsupported-content {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  margin: 20px auto;
  padding: 0;
  border-radius: 32px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(74, 108, 247, 0.3);
  animation: unsupportedSlideUp 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.unsupported-header {
  text-align: center;
  padding: 25px 20px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  z-index: 10;
  border-radius: 32px 32px 0 0;
}

.ios-icon {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
}

.ios-icon i {
  font-size: 2.5rem;
  color: #ffffff;
  background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(74, 108, 247, 0.3);
  position: relative;
  z-index: 2;
}

.ios-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #4a6cf7;
  animation: pulseRing 1.5s ease-out infinite;
  box-sizing: border-box;
  z-index: 1;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@keyframes iosIconPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(74, 108, 247, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(74, 108, 247, 0.5);
  }
}

.unsupported-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e74c3c;
  margin: 5px 0 0;
}

.unsupported-body {
  padding: 20px 25px;
}

.unsupported-message p {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  background: rgba(231, 76, 60, 0.1);
  padding: 12px;
  border-radius: 16px;
  border-left: 3px solid #e74c3c;
}

.alternatives h3,
.features-list h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
}

.alternative-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.alternative-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.alternative-item:hover {
  transform: translateX(5px);
  background: var(--bg-hover);
}

.alternative-item i {
  font-size: 1.5rem;
}

.alternative-item i.fa-chrome {
  color: #4285f4;
}

.alternative-item i.fa-android {
  color: #3ddc84;
}

.alternative-item i.fa-wifi {
  color: #f39c12;
}

.alternative-item div {
  flex: 1;
}

.alternative-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.alternative-item span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.features-list ul {
  list-style: none;
  padding-left: 0;
  margin: 10px 0 15px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.features-list li::before {
  content: "⚠️";
  font-size: 0.7rem;
}

.offline-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(46, 204, 113, 0.1);
  border-radius: 14px;
  border: 1px solid rgba(46, 204, 113, 0.3);
  margin-top: 15px;
}

.offline-note i {
  font-size: 1rem;
  color: #2ecc71;
}

.offline-note p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.unsupported-footer {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  position: sticky;
  bottom: 0;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border-radius: 0 0 32px 32px;
}

.unsupported-close-btn,
.unsupported-learn-btn {
  flex: 1;
  padding: 12px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.unsupported-close-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border: none;
}

.unsupported-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.unsupported-learn-btn {
  background: transparent;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
}

.unsupported-learn-btn:hover {
  background: rgba(74, 108, 247, 0.1);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 550px) {
  .unsupported-content {
    margin: 15px auto;
    width: 95%;
    max-height: 92vh;
  }
  
  .unsupported-header {
    padding: 20px 15px 15px;
  }
  
  .ios-icon i {
    font-size: 2.8rem;
  }
  
  .ios-pulse-ring {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
  }
  
  .unsupported-header h2 {
    font-size: 1.2rem;
  }
  
  .unsupported-body {
    padding: 15px 20px;
  }
  
  .unsupported-message p {
    font-size: 0.85rem;
    padding: 10px;
  }
  
  .alternative-item {
    padding: 8px;
  }
  
  .alternative-item i {
    font-size: 1.2rem;
  }
  
  .alternative-item strong {
    font-size: 0.75rem;
  }
  
  .alternative-item span {
    font-size: 0.6rem;
  }
  
  .features-list li {
    font-size: 0.75rem;
  }
  
  .offline-note p {
    font-size: 0.7rem;
  }
  
  .unsupported-footer {
    padding: 15px;
    gap: 10px;
  }
  
  .unsupported-close-btn,
  .unsupported-learn-btn {
    padding: 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 550px) {
  .ios-icon {
    width: 65px;
    height: 65px;
  }
  
  .ios-icon i {
    font-size: 2rem;
  }
  
  .ios-pulse-ring {
    width: 100%;
    height: 100%;
  }
}

/* ==================== Vertical Bars Container ==================== */
.vertical-bars-container {
  display: flex;
  justify-content: center;
  gap: 100px;
  margin: 0px 0;   
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.vertical-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vertical-bar-wrapper {
  height: 100px;
  display: flex;
  align-items: flex-end;
}

.vertical-bar-bg {
  width: 20px;
  height: 100px;
  background: var(--bg-primary);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.vertical-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* Power Bar - Green */
.vertical-bar-fill.power-fill {
  background: linear-gradient(0deg, #2ecc71, #27ae60);
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}

.standby-fill {
  background: linear-gradient(0deg, #f39c12, #e67e22);
  box-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

/* Standby Bar - Yellow/Orange */
.vertical-bar-fill.standby-fill {
  background: linear-gradient(0deg, #f39c12, #e67e22);
  box-shadow: 0 0 8px rgba(243, 156, 18, 0.3);
}

/* Shimmer Effect */
.vertical-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
  transform: translateX(-100%);
  pointer-events: none;
}

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

/* Percentage Value Below Bar */
.vertical-bar-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: 20px;
  min-width: 50px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.border-none{
    border: 0px solid var(--border-color);
}

/* Air Flow Bar - Blue */
.vertical-bar-fill.airflow-fill {
  background: linear-gradient(0deg, #3498db, #2980b9);
  box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* Label Below Percentage */
.vertical-bar-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* High Power Pulse */
.vertical-bar-fill.high-power {
  animation: powerPulse 1s infinite;
}

@keyframes powerPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); box-shadow: 0 0 12px rgba(46, 204, 113, 0.5); }
}

/* Critical Power */
.vertical-bar-fill.critical {
  animation: criticalPulse 0.6s infinite;
  background: linear-gradient(0deg, #e74c3c, #c0392b) !important;
}

@keyframes criticalPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); box-shadow: 0 0 15px rgba(231, 76, 60, 0.6); }
}

/* Hover Effect */
.vertical-bar-bg:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* Responsive */
@media (max-width: 600px) {
  .vertical-bars-container {
    gap: 50px;
  }
  
  .vertical-bar-bg {
    width: 20px;
    height: 80px;
  }
  
  .vertical-bar-value {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
  
  .vertical-bar-label {
    font-size: 0.55rem;
  }
}

/* ==================== Contact Card Styles ==================== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.company-brand {
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  margin-top: 10px;
  margin-bottom: 10px;
}

.company-logo-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.company-logo-contact i {
  font-size: 2rem;
  color: var(--accent-blue);
}

.company-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 15px;
  background: var(--bg-secondary);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(5px);
  background: var(--bg-hover);
}

.contact-item i {
  width: 35px;
  font-size: 1.2rem;
  color: var(--accent-blue);
  text-align: center;
}

.contact-item div {
  flex: 1;
}

.contact-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contact-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  word-break: break-all;
}

.contact-link:hover {
  color: var(--accent-blue);
}

/* Office Address */
.office-address {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 12px 15px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.office-address i {
  font-size: 1.2rem;
  color: var(--accent-orange);
  width: 35px;
  text-align: center;
}

.office-address p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding-top: 10px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 1.1rem;
}

.social-icon:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateY(-3px);
}

/* Responsive - Ensures single line on mobile */
@media (max-width: 550px) {
  .contact-item {
    gap: 12px;
    padding: 10px 12px;
  }
  
  .contact-item i {
    width: 30px;
    font-size: 1rem;
  }
  
  .contact-label {
    font-size: 0.6rem;
  }
  
  .contact-link {
    font-size: 0.8rem;
  }
  
  .company-name {
    font-size: 1.1rem;
  }
  
  .office-address {
    gap: 12px;
    padding: 10px 12px;
  }
  
  .office-address i {
    width: 30px;
    font-size: 1rem;
  }
  
  .office-address p {
    font-size: 0.7rem;
  }
}


/* ==================== Voice Control Styles ==================== */
.voice-btn {
  position: relative;
  background: linear-gradient(135deg, #2196F3, #4CAF50);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.voice-btn i {
  font-size: 1.2rem;
  color: white;
}

.voice-btn.listening {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  animation: voicePulse 1.5s infinite;
}

@keyframes voicePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(231, 76, 60, 0.3);
  }
}

.voice-pulse {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.voice-btn.listening .voice-pulse {
  border-color: #e74c3c;
  animation: pulseRing 1s ease-out infinite;
}

.voice-status {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 8px;
}

.voice-status.show {
  display: flex;
  animation: slideUp 0.3s ease;
}

.voice-status.listening {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
}

.voice-status i {
  font-size: 0.9rem;
}

.voice-status.listening i {
  color: #e74c3c;
  animation: spin 1s linear infinite;
}

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

.voice-commands-list {
  list-style: none;
  padding-left: 0;
}

.voice-commands-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.voice-commands-list li strong {
  color: var(--accent-blue);
  display: inline-block;
  width: 140px;
}

/* ==================== Animated Voice Help Modal ==================== */
.voice-help-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  animation: modalFadeIn 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(10px);
  }
}

.voice-help-content {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  margin: 5% auto;
  padding: 0;
  border-radius: 32px;
  width: 90%;
  max-width: 650px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(74, 108, 247, 0.3);
  animation: contentSlideUp 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
  overflow: hidden;
}

@keyframes contentSlideUp {
  from {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Header with Animated Icon */
.voice-help-header {
  text-align: center;
  padding: 25px 20px 20px;
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.1), rgba(108, 92, 231, 0.05));
  position: relative;
}

.help-icon-animation {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
}

.help-icon-animation i {
  font-size: 3rem;
  color: var(--accent-blue);
  background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: iconFloat 2s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.help-pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  border: 2px solid #4a6cf7;
  animation: pulseRing 1.5s ease-out infinite;
  opacity: 0;
}

.help-pulse-ring.delay-1 {
  animation-delay: 0.5s;
}

.help-pulse-ring.delay-2 {
  animation-delay: 1s;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.voice-help-header h2 {
  font-size: 1.8rem;
  margin: 0;
  background: linear-gradient(135deg, #fff, #4a6cf7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.voice-help-header p {
  color: var(--text-secondary);
  margin: 5px 0 0;
  font-size: 0.9rem;
}

.help-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* Category Tabs */
.command-categories {
  display: flex;
  gap: 5px;
  padding: 15px 20px 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.category-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.category-tab i {
  font-size: 1rem;
}

.category-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.category-tab.active {
  color: var(--accent-blue);
  border-bottom: 2px solid var(--accent-blue);
  background: linear-gradient(0deg, rgba(74, 108, 247, 0.1), transparent);
}

/* Commands Container */
.commands-container {
  padding: 20px;
  min-height: 350px;
}

.commands-group {
  display: none;
  animation: fadeInGroup 0.3s ease;
}

.commands-group.active {
  display: block;
}

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

/* Command Cards */
.command-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  margin-bottom: 10px;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: cardSlideIn 0.3s ease backwards;
}

.command-card:nth-child(1) { animation-delay: 0.05s; }
.command-card:nth-child(2) { animation-delay: 0.1s; }
.command-card:nth-child(3) { animation-delay: 0.15s; }
.command-card:nth-child(4) { animation-delay: 0.2s; }
.command-card:nth-child(5) { animation-delay: 0.25s; }

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

.command-card:hover {
  transform: translateX(5px);
  border-color: var(--accent-blue);
  background: var(--bg-hover);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.command-voice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-voice i {
  color: #e74c3c;
  font-size: 1rem;
  animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.command-voice span {
  font-weight: 600;
  color: var(--accent-orange);
  font-family: monospace;
  font-size: 0.9rem;
}

.command-action {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.command-action i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.command-card:hover .command-action i {
  transform: translateX(5px);
  color: var(--accent-green);
}

/* Voice Tip */
.voice-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.05));
  border-radius: 16px;
  margin-top: 15px;
  border: 1px solid rgba(46, 204, 113, 0.3);
  animation: tipGlow 2s ease-in-out infinite;
}

@keyframes tipGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(46, 204, 113, 0.2); }
  50% { box-shadow: 0 0 15px rgba(46, 204, 113, 0.4); }
}

.voice-tip i {
  font-size: 1.2rem;
  color: #f39c12;
}

.voice-tip span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Footer Buttons */
.voice-help-footer {
  display: flex;
  gap: 15px;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.voice-test-btn {
  flex: 1;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.voice-test-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.voice-close-btn {
  flex: 1;
  background: linear-gradient(135deg, #4a6cf7, #6c5ce7);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.voice-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 108, 247, 0.4);
}

/* Responsive */
@media (max-width: 550px) {
  .command-card {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .command-voice span {
    font-size: 0.8rem;
  }
  
  .category-tab span {
    display: none;
  }
  
  .category-tab {
    padding: 10px 5px;
  }
  
  .voice-help-header h2 {
    font-size: 1.4rem;
  }
}

/* Android/Mobile specific styles */
@media (max-width: 768px) {
  .voice-btn {
    width: 44px;
    height: 44px;
  }
  
  .voice-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  .voice-btn:hover .voice-tooltip {
    opacity: 1;
  }
  
  .voice-status {
    bottom: 120px;
    font-size: 0.7rem;
    padding: 6px 12px;
    white-space: nowrap;
  }
}

/* Permission request styling */
.mic-permission-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  padding: 10px 16px;
  border-radius: 30px;
  border: 1px solid var(--accent-blue);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

/* Custom scrollbar for commands container */
.commands-container::-webkit-scrollbar {
  width: 6px;
}

.commands-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.commands-container::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 10px;
}

.commands-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-hover);
}

/* Fix Help Modal Scrolling */
.voice-help-content {
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.commands-container {
  flex: 1;
  overflow-y: auto;
  max-height: 50vh;
  padding: 20px;
}

/* Make header and tabs sticky */
.voice-help-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-secondary);
}

.command-categories {
  position: sticky;
  top: 110px;
  z-index: 10;
  background: var(--bg-secondary);
}

.voice-help-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: var(--bg-secondary);
}

/* Prevent double scrollbar */
.voice-help-modal {
  overflow-y: auto !important;
}

.voice-help-content {
  overflow-y: visible !important;
  max-height: none !important;
}

.commands-container {
  overflow-y: auto !important;
  max-height: 55vh !important;
}

/* Hide body scroll when modal is open */
body:has(.voice-help-modal[style*="display: block"]) {
  overflow: hidden;
}

/* ==================== Voice Status ==================== */
.voice-status {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--accent-blue);
  backdrop-filter: blur(10px);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-status.show {
  display: flex;
  animation: slideUpVoice 0.3s ease;
}

@keyframes slideUpVoice {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.voice-status.listening {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
  animation: pulseBorder 1s infinite;
}

@keyframes pulseBorder {
  0%, 100% { border-color: #e74c3c; box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
  50% { border-color: #ff6b6b; box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
}

.voice-status i {
  font-size: 1rem;
}

.voice-status.listening i {
  color: #e74c3c;
  animation: micPulse 1s infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.voice-status .voice-text {
  font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .voice-status {
    bottom: 80px;
    padding: 8px 16px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .voice-status {
    bottom: 70px;
    padding: 6px 12px;
    font-size: 0.7rem;
    white-space: normal;
    text-align: center;
    max-width: 85%;
  }
}