/* Page-specific styles */

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

/* Display Mode Section - styled like dual-status-container */
.display-mode-section {
  margin-bottom: 20px;
  padding: 15px;
  background-color: var(--black3-color);
  border-radius: 12px;
}

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

.display-mode-header h3 {
  margin: 0;
  font-size: 1rem;
}

.display-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.display-color-mode-btn {
  padding: 10px 12px;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px;
  color: var(--white-color);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 250ms ease;
  font-family: "Montserrat", sans-serif;
  height: auto;
}

/* Hover state */
.display-color-mode-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Active state - Clean white minimal (matching dual-status-container) */
.display-color-mode-btn.active {
  background: var(--white-color) !important;
  border-color: var(--white-color) !important;
  color: var(--black-color);
}

/* BLE Characteristics Card */
.ble-char-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.ble-char-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ble-char-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(249, 130, 108, 0.2);
}

.ble-char-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.ble-char-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white-color);
}

.ble-char-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--acc1-color);
  font-family: 'Courier New', monospace;
  min-width: 40px;
  text-align: right;
  transition: all 0.2s ease;
}

/* Clickable Device ID Item */
#device-id-item[style*="cursor: pointer"] {
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.2s ease;
}

#device-id-item[style*="cursor: pointer"]:hover {
  background: rgba(249, 130, 108, 0.08);
  border-color: rgba(249, 130, 108, 0.3);
}

#device-id-item[style*="cursor: pointer"]:hover .ble-char-value {
  color: rgba(249, 130, 108, 1);
  text-shadow: 0 0 8px rgba(249, 130, 108, 0.3);
}

#device-id-item[style*="cursor: pointer"]:active {
  transform: scale(0.98);
  background: rgba(249, 130, 108, 0.12);
}

.ble-char-uuid {
  font-size: 0.7rem;
  color: var(--white2-color);
  opacity: 0.5;
  font-family: 'Courier New', monospace;
  word-break: break-all;
}



.refresh-ble-button {
  width: 100%;
  height: auto;
  padding: 12px 16px;
  margin-top: 15px;
  background: rgba(249, 130, 108, 0.1);
  border: 1px solid rgba(249, 130, 108, 0.3);
  border-radius: 8px;
  color: var(--white-color);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
}

.refresh-ble-button:hover:not(:disabled) {
  background: rgba(249, 130, 108, 0.2);
  border-color: rgba(249, 130, 108, 0.5);
  transform: translateY(-2px);
}

.refresh-ble-button:active:not(:disabled) {
  transform: translateY(0);
}

.refresh-ble-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.refresh-ble-button svg {
  transition: transform 0.3s ease;
}

.refresh-ble-button:hover:not(:disabled) svg {
  transform: rotate(180deg);
}

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

/* Reboot Device Button */
.reboot-device-button {
  width: 100%;
  height: auto;
  padding: 12px 16px;
  margin-top: 10px;
  background: rgba(203, 32, 64, 0.1);
  border: 1px solid rgba(203, 32, 64, 0.3);
  border-radius: 8px;
  color: var(--white-color);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
}

.reboot-device-button:hover:not(:disabled) {
  background: rgba(203, 32, 64, 0.2);
  border-color: rgba(203, 32, 64, 0.5);
  transform: translateY(-2px);
}

.reboot-device-button:active:not(:disabled) {
  transform: translateY(0);
}

.reboot-device-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.reboot-device-button svg {
  transition: transform 0.3s ease;
}

.reboot-device-button:hover:not(:disabled) svg {
  transform: rotate(180deg);
}

/* Settings Page - Now uses unified .page-content-container class */

.settings-section {
  margin: 30px 0;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--white-color);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* About Page - Now uses unified .page-content-container class */

.about-content {
  padding: 20px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.about-card {
  background: rgba(22, 22, 26, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 25px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.about-card:hover {
  background: rgba(22, 22, 26, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Hero Card */
.about-hero-card {
  text-align: center;
  padding: 35px 25px;
}

.hero-icon-wrapper {
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

.hero-icon {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(249, 130, 108, 0.4));
}

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

.about-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--white-color);
  margin-bottom: 10px;
  text-align: center;
}

.about-version {
  font-size: 1rem;
  color: var(--acc1-color);
  text-align: center;
  font-weight: 500;
  margin-bottom: 0;
}

.about-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc1-color), transparent);
  margin: 20px auto;
  border-radius: 2px;
}

.about-copyright {
  margin-top: 15px;
}

.copyright-text {
  font-size: 0.95rem;
  color: var(--white-color);
  font-weight: 500;
  margin: 0 0 8px 0;
  opacity: 0.9;
}

.copyright-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--white2-color);
  opacity: 0.7;
  margin: 0;
}

.lock-icon {
  width: 14px;
  height: 14px;
  stroke: var(--acc1-color);
  opacity: 0.8;
}

/* Collapsible Sections */
.collapsible-section {
  padding: 0;
  overflow: visible;
}

.section-toggle-button {
  height: 40px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--white-color);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Montserrat", sans-serif;
}

.section-toggle-button:hover {
  background: rgba(249, 130, 108, 0.05);
}

.toggle-icon {
  width: 20px;
  height: 20px;
  stroke: var(--acc1-color);
  transition: transform 0.3s ease;
}

.section-toggle-button.expanded .toggle-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  padding: 0 6px 25px;
  animation: fadeIn 0.3s ease-in-out;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white-color);
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(249, 130, 108, 0.2);
}

.about-card p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--white-color);
  margin: 5px 0;
}

.about-card p.fade {
  opacity: 0.7;
}

/* Debug Info */
.debug-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 15px;
}

.debug-item:last-child {
  border-bottom: none;
}

.debug-label {
  font-size: 0.85rem;
  color: var(--white2-color);
  opacity: 0.8;
  font-weight: 500;
  min-width: 140px;
}

.debug-value {
  font-size: 0.85rem;
  color: var(--white-color);
  font-weight: 400;
  text-align: right;
  word-break: break-word;
  font-family: 'Courier New', monospace;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .about-content {
    padding: 10px 0 90px;
  }

  .about-card {
    padding: 10px;
  }

  .about-title {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.1rem;
  }
}

/* Smooth page transitions */
.page {
  min-height: calc(100vh - 200px);
  width: 100%;
}

.page .control-panel {
  padding-bottom: 120px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

