/* NEW FEATURES CSS - Add this to your existing styles */

/* Editable Desktop Name */
#computerName {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
  outline: none;
}

#computerName:hover {
  background: rgba(255, 255, 255, 0.1);
}

#computerName[contenteditable="true"] {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Apply animations */
.page.active {
  animation: fadeIn 0.3s ease;
}

.volume-slider-container.active,
.brightness-slider-container.active,
.text-display-container.active {
  animation: slideIn 0.3s ease;
}

.app-card {
  animation: scaleIn 0.2s ease;
  animation-fill-mode: backwards;
}

.app-card:nth-child(1) { animation-delay: 0.05s; }
.app-card:nth-child(2) { animation-delay: 0.1s; }
.app-card:nth-child(3) { animation-delay: 0.15s; }
.app-card:nth-child(4) { animation-delay: 0.2s; }
.app-card:nth-child(5) { animation-delay: 0.25s; }
.app-card:nth-child(6) { animation-delay: 0.3s; }

.copy.copied {
  animation: scaleIn 0.2s ease;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(20px);
  width: 180px;
  height: 60px;
  align-items: center;
  justify-content: space-around;
  border-radius: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-button {
  outline: 0;
  border: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: all ease-in-out 0.3s;
  cursor: pointer;
  position: relative;
}

.nav-button:hover {
  transform: translateY(-3px);
  color: #d4d4d4;
}

.nav-button.active {
  color: #d4d4d4;
  background: rgba(255, 255, 255, 0.1);
}

.nav-button svg {
  width: 24px;
  height: 24px;
}

/* Logs Page */
.heartbeat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.heartbeat-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
}

.heartbeat-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.heartbeat-item.online {
  border-left: 4px solid #10b981;
}

.heartbeat-item.offline {
  border-left: 4px solid #6b7280;
  opacity: 0.6;
}

.heartbeat-pulse {
  width: 64px;
  height: 48px;
  flex-shrink: 0;
}

.heartbeat-pulse svg polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.heartbeat-pulse svg polyline#back {
  stroke: rgba(16, 185, 129, 0.2);
}

.heartbeat-pulse.online svg polyline#front {
  stroke: #10b981;
  stroke-dasharray: 48, 144;
  stroke-dashoffset: 192;
  animation: dash_heartbeat 1.4s linear infinite;
}

.heartbeat-pulse.offline svg polyline#back {
  stroke: rgba(107, 114, 128, 0.2);
}

.heartbeat-pulse.offline svg polyline#front {
  stroke: #6b7280;
  stroke-dasharray: 48, 144;
  stroke-dashoffset: 192;
  animation: none;
}

@keyframes dash_heartbeat {
  72.5% {
    opacity: 0;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.heartbeat-info {
  flex: 1;
}

.heartbeat-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.heartbeat-status {
  font-size: 13px;
  color: #9ca3af;
}

.heartbeat-time {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Adjust container padding for bottom nav */
body {
  padding-bottom: 100px;
}

@media (max-width: 500px) {
  .bottom-nav {
    width: 160px;
    height: 56px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .nav-button {
    width: 46px;
    height: 46px;
  }
}


/* Specs Page */
.specs-selector {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  cursor: pointer;
}

.specs-selector:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.specs-content {
  margin-top: 24px;
}

.specs-loading {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spec-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.spec-item h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #e0e0e0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.spec-item p {
  margin: 8px 0;
  font-size: 14px;
  color: #9ca3af;
}

.spec-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.spec-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.spec-offline {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.spec-offline svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: block;
  opacity: 0.5;
}


/* ===========================
   LOGS PAGE GALLERY
=========================== */

.logs-gallery-container {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 100px);
  overflow: hidden;
}

.logs-gallery {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  touch-action: pan-y pinch-zoom;
}

.logs-gallery-slide {
  min-width: 100%;
  flex-shrink: 0;
  padding: 40px 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.logs-gallery-slide.active {
  opacity: 1;
}

.logs-gallery-slide .panel {
  margin: 0 auto;
  width: min(580px, 92vw);
}

/* Gallery Navigation Arrows */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #9ca3af;
  opacity: 0;
  pointer-events: none;
}

.gallery-arrow svg {
  width: 24px;
  height: 24px;
}

.gallery-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}

.gallery-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #d4d4d4;
  transform: translateY(-50%) scale(1.1);
}

.gallery-arrow-left {
  left: 20px;
}

.gallery-arrow-right {
  right: 20px;
}

/* Gallery Dots */
.gallery-dots {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-dot.active {
  background: rgba(255, 255, 255, 0.4);
  width: 24px;
  border-radius: 5px;
}

.gallery-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
}

/* Gallery Indicator */
.gallery-indicator {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Mobile: Show arrows on mobile devices */
@media (max-width: 768px) {
  .gallery-arrow {
    opacity: 0.7;
    pointer-events: auto;
    width: 40px;
    height: 40px;
  }
  
  .gallery-arrow-left {
    left: 10px;
  }
  
  .gallery-arrow-right {
    right: 10px;
  }
  
  .gallery-arrow svg {
    width: 20px;
    height: 20px;
  }
}

/* Desktop: Show arrows on hover */
@media (hover: hover) {
  .logs-gallery-container:hover .gallery-arrow.visible {
    opacity: 1;
  }
}


/* ===========================
   UNREGISTERED SELECT DROPDOWN
=========================== */

.unregistered-select {
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(20, 20, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
  /* Custom arrow */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999999' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.unregistered-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background-color: rgba(255, 255, 255, 0.06);
}

.unregistered-select option {
  background: #141414;
  color: #e0e0e0;
}


/* ===========================
   MOVE BUTTON
=========================== */

.move-btn {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.move-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

/* ===========================
   MOVE MODAL
=========================== */

.move-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.move-modal-overlay.active {
  display: flex;
}

.move-modal {
  background: rgba(18, 18, 18, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px;
  width: min(420px, 92vw);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: scaleIn 0.2s ease;
}

.move-modal-header {
  margin-bottom: 24px;
  text-align: center;
}

.move-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 6px;
}

.move-modal-subtitle {
  font-size: 13px;
  color: #6b7280;
}

.move-dsk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.move-dsk-btn {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
}

.move-dsk-btn .dsk-label {
  font-size: 14px;
  font-weight: 700;
}

.move-dsk-btn .dsk-status {
  font-size: 10px;
  letter-spacing: 0.3px;
  opacity: 0.7;
}

/* Available slot */
.move-dsk-btn.available:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #d4d4d4;
  transform: translateY(-2px);
}

/* Selected slot */
.move-dsk-btn.selected {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Current slot (source) */
.move-dsk-btn.current {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Occupied slot */
.move-dsk-btn.occupied {
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  color: #4b5563;
  cursor: not-allowed;
  opacity: 0.45;
}

.move-modal-actions {
  display: flex;
  gap: 10px;
}

.move-confirm-btn,
.move-cancel-btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.move-confirm-btn {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  opacity: 0.4;
  pointer-events: none;
}

.move-confirm-btn:not(:disabled):not([disabled]) {
  opacity: 1;
  pointer-events: auto;
}

.move-confirm-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.move-cancel-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.move-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}
