/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.hidden {
  display: none !important;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-content h2 {
  margin-bottom: 1rem;
  text-align: center;
}

/* Modal header with close button */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.25rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background-color: #f8f9fa;
  color: #dc3545;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem; /* Space for scrollbar */
}

/* Expandable textarea for description */
.modal-content textarea {
  resize: vertical;
  min-height: 3rem;
  max-height: 20rem;
  overflow-y: auto;
  transition: height 0.2s ease;
  box-sizing: border-box;
}

/* Auto-expand textarea on focus */
.modal-content textarea:focus {
  min-height: 3rem;
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.modal-content input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.modal-content button {
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-content button:hover {
  background-color: #0056b3;
}

.error-message {
  color: #dc3545;
  text-align: center;
  margin-top: 1rem;
}

/* Passkey styles */
.passkey-divider {
  text-align: center;
  margin: 1.5rem 0 1rem;
  position: relative;
  color: #6c757d;
  font-size: 0.875rem;
}

.passkey-divider::before,
.passkey-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background-color: #dee2e6;
}

.passkey-divider::before {
  left: 0;
}

.passkey-divider::after {
  right: 0;
}

.passkey-btn {
  width: 100%;
  padding: 0.75rem;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.passkey-btn:hover {
  background-color: #5a6268;
}

.passkey-description {
  color: #6c757d;
  font-size: 0.875rem;
  margin: 0.5rem 0 1.5rem;
  text-align: center;
  line-height: 1.4;
}

.passkey-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-primary {
  flex: 1;
  padding: 0.75rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  flex: 1;
  padding: 0.75rem;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* Header styles */
header {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  color: #333;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Garmin Connect styles */
.garmin-connect-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
  width: 100%;
  justify-content: center;
}

/* Hide desktop Garmin Connect buttons in mobile view */
@media (max-width: 768px) {
  .garmin-connect-section {
    display: none;
  }
}

.garmin-btn {
  background-color: #00a0d1;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s;
}

.garmin-btn:hover {
  background-color: #0086b0;
}

.garmin-share-btn {
  background-color: #00a0d1;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.garmin-share-btn:hover {
  background-color: #0086b0;
}

/* Tab Navigation styles */
.tab-navigation {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 2rem;
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.tab-btn:hover {
  color: #333;
  background-color: #f8f9fa;
}

.tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #f8f9fa;
}

.tab-icon {
  font-size: 1.2rem;
}

.tab-label {
  font-weight: 500;
}

/* Tab Content styles */
.tab-content {
  display: none;
  overflow-y: auto;
}

.tab-content.active {
  display: block !important;
}

/* Desktop: proper height calculation */
@media (min-width: 769px) {
  .tab-content {
    height: calc(100vh - 135px); /* header + tab nav */
    max-height: calc(100vh - 135px);
  }
}

/* Mobile: different height */
@media (max-width: 768px) {
  .tab-content {
    height: calc(100vh - 60px);
  }
}

.version-info {
  font-size: 0.9em;
  color: #6c757d;
  margin-right: 15px;
}

.test-notification-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  margin-right: 10px;
  transition: background-color 0.2s;
}

.test-notification-btn:hover {
  background-color: #218838;
}

.clear-cache-btn {
  background-color: #ffc107;
  color: #212529;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  margin-right: 10px;
  transition: background-color 0.2s;
}

.clear-cache-btn:hover {
  background-color: #e0a800;
}

.logout-btn {
  padding: 0.5rem 1rem;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background-color: #c82333;
}

/* Main content */
main {
  margin: 0 auto;
}

/* PDF List styles */
.pdf-list h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

.pdf-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.pdf-item {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pdf-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pdf-item h3 {
  margin-bottom: 0.5rem;
  color: #333;
}

.pdf-item .progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
}

.pdf-item .progress-fill {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease;
}

.pdf-item .progress-text {
  font-size: 0.875rem;
  color: #666;
}

/* PDF Viewer styles */
.pdf-viewer {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.viewer-header {
  padding: 1rem 1.5rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  padding: 0.5rem 1rem;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #545b62;
}

.viewer-header h3 {
  flex: 1;
  text-align: center;
  margin: 0;
}

.progress-info {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #666;
}

.viewer-controls {
  padding: 1rem 1.5rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.viewer-controls button {
  padding: 0.5rem 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.viewer-controls button:hover {
  background-color: #0056b3;
}

.viewer-controls button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.viewer-controls input[type="number"] {
  width: 80px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

#zoomLevel {
  min-width: 50px;
  text-align: center;
  font-weight: 500;
}

#fitToViewBtn {
  background-color: #28a745 !important;
  font-weight: 500;
}

#fitToViewBtn:hover {
  background-color: #218838 !important;
}

.pdf-container {
  padding: 2rem;
  text-align: center;
  background-color: #f8f9fa;
  min-height: 600px;
  height: calc(100vh - 300px); /* More space for the PDF */
  overflow: auto;
  position: relative;
}

#pdfCanvas {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  height: auto;
}

/* Loading state */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  font-size: 1.125rem;
  color: #666;
}

/* Hamburger Menu Styles */
.hamburger-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.hamburger-menu-btn span {
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.mobile-menu-overlay.hidden {
  display: none;
}

.mobile-menu-content {
  width: 280px;
  height: 100%;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f9fa;
}

.mobile-menu-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}

.close-mobile-menu-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.close-mobile-menu-btn:hover {
  background-color: #e9ecef;
}

.mobile-tab-navigation {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-tab-btn {
  background: none;
  border: none;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #666;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
  font-size: 1rem;
  text-align: left;
  width: 100%;
}

.mobile-tab-btn:hover {
  color: #333;
  background-color: #f8f9fa;
}

.mobile-tab-btn.active {
  color: #007bff;
  border-left-color: #007bff;
  background-color: #f8f9fa;
}

.mobile-tab-icon {
  font-size: 1.25rem;
  min-width: 24px;
}

.mobile-tab-label {
  font-weight: 500;
}

.mobile-action-buttons {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 0.5rem;
}

.mobile-action-btn {
  background: none;
  border: none;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #666;
  transition: all 0.2s ease;
  font-size: 1rem;
  text-align: left;
  width: 100%;
  border-radius: 0;
}

.mobile-action-btn:hover {
  color: #333;
  background-color: #f8f9fa;
}

.mobile-action-icon {
  font-size: 1.25rem;
  min-width: 24px;
}

.mobile-action-label {
  font-weight: 500;
}

.mobile-logout-btn {
  color: #dc3545;
}

.mobile-logout-btn:hover {
  color: #c82333;
  background-color: #f8d7da;
}

.mobile-garmin-btn {
  color: #007bff;
}

.mobile-garmin-btn:hover {
  color: #0056b3;
  background-color: #e3f2fd;
}

.mobile-garmin-share-btn {
  color: #28a745;
}

.mobile-garmin-share-btn:hover {
  color: #1e7e34;
  background-color: #d4edda;
}

.mobile-version-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  margin-top: auto;
}

.mobile-version-label {
  text-align: right;
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.mobile-version-text {
  font-size: 0.9rem;
  color: #007bff;
  font-weight: 600;
  font-family: monospace;
}

/* Responsive design */
@media (max-width: 768px) {
  header {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .hamburger-menu-btn {
    display: flex;
  }

  .header-info {
    display: none;
  }

  header h1 {
    font-size: 1.25rem;
  }

  main {
    padding: 1rem;
  }

  .pdf-items {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pdf-item {
    padding: 1rem;
  }

  .viewer-header {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    padding: 0.75rem 1rem;
  }

  .viewer-header h3 {
    font-size: 1rem;
    line-height: 1.3;
  }

  .progress-info {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
  }

  .viewer-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    justify-content: center;
  }

  .viewer-controls button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: auto;
  }

  .viewer-controls input[type="number"] {
    width: 60px;
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  #zoomLevel {
    min-width: 40px;
    font-size: 0.875rem;
  }

  .pdf-container {
    padding: 0.5rem;
    height: calc(100vh - 250px);
  }

  #pdfCanvas {
    max-width: 100%;
    height: auto;
  }
}

/* Fullscreen PDF Viewer */
.fullscreen-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.fullscreen-viewer.hidden {
  display: none !important;
}

.fullscreen-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.exit-fullscreen-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.exit-fullscreen-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.fullscreen-page-info {
  font-size: 1rem;
  font-weight: 500;
}

.fullscreen-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0 80px 0;
  overflow: hidden;
}

#fullscreenCanvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fullscreen-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  z-index: 10;
}

.fullscreen-nav-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 50px;
}

.fullscreen-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.fullscreen-page-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.fullscreen-page-input input {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  width: 60px;
  text-align: center;
  font-size: 1rem;
}

.fullscreen-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  display: inline-block; /* Show on all devices */
}

.fullscreen-btn:hover {
  background-color: #218838;
}

.reload-btn {
  background-color: #17a2b8;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  display: inline-block;
}

.reload-btn:hover {
  background-color: #138496;
}

/* Mobile-specific fullscreen styles */
@media (max-width: 768px) {
  .fullscreen-header {
    padding: 0.75rem;
  }

  .fullscreen-page-info {
    font-size: 0.9rem;
  }

  .fullscreen-controls {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .fullscreen-nav-btn {
    font-size: 1.25rem;
    padding: 0.5rem 0.75rem;
    min-width: 40px;
  }

  .fullscreen-page-input {
    font-size: 0.9rem;
  }

  .fullscreen-page-input input {
    width: 50px;
    font-size: 0.9rem;
    padding: 0.4rem;
  }
}

@media (max-width: 480px) {
  .fullscreen-header {
    padding: 0.5rem;
  }

  .fullscreen-page-info {
    font-size: 0.8rem;
  }

  .fullscreen-controls {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .fullscreen-nav-btn {
    font-size: 1.1rem;
    padding: 0.4rem 0.6rem;
    min-width: 35px;
  }

  .fullscreen-page-input {
    font-size: 0.8rem;
  }

  .fullscreen-page-input input {
    width: 45px;
    font-size: 0.8rem;
    padding: 0.3rem;
  }
}

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

  header {
    padding: 0.5rem 0.75rem;
  }

  header h1 {
    font-size: 1.125rem;
  }

  .logout-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
  }

  main {
    padding: 0.75rem;
  }

  .pdf-list h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .pdf-item {
    padding: 0.75rem;
  }

  .pdf-item h3 {
    font-size: 1rem;
  }

  .pdf-item .progress-text {
    font-size: 0.8rem;
  }

  .modal-content {
    margin: 1rem;
    width: calc(100% - 2rem);
    padding: 1.5rem;
  }

  .modal-content h2 {
    font-size: 1.25rem;
  }

  .modal-content input,
  .modal-content button {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .viewer-header {
    padding: 0.5rem 0.75rem;
  }

  .viewer-header h3 {
    font-size: 0.9rem;
  }

  .back-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
  }

  .viewer-controls {
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
  }

  .viewer-controls button {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 60px;
  }

  .viewer-controls input[type="number"] {
    width: 50px;
    padding: 0.4rem;
    font-size: 0.8rem;
  }

  #zoomLevel {
    min-width: 35px;
    font-size: 0.8rem;
  }

  .pdf-container {
    padding: 0.25rem;
    height: calc(100vh - 220px);
  }
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
  /* Improve touch targets */
  .pdf-item {
    min-height: 80px;
  }

  .viewer-controls button {
    min-height: 44px; /* iOS recommended touch target size */
  }

  /* Better spacing for mobile */
  .pdf-items {
    margin-top: 0.5rem;
  }

  /* Improve modal on mobile */
  .modal {
    padding: 1rem;
  }

  .modal-content {
    max-width: 90vw;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pdf-container {
    height: calc(100vh - 180px);
  }

  .viewer-header {
    padding: 0.5rem 1rem;
  }

  .viewer-controls {
    padding: 0.5rem 1rem;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #pdfCanvas {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Notes functionality styles */
.notes-toggle-btn,
.all-notes-btn {
  padding: 8px 12px;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.notes-toggle-btn:hover,
.all-notes-btn:hover {
  background-color: #138496;
}

.notes-toggle-btn.active {
  background-color: #28a745;
}

.viewer-content {
  display: flex;
  flex: 1;
  gap: 20px;
  padding: 20px;
}

.pdf-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.notes-panel {
  width: 350px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

.notes-header {
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notes-header h4 {
  margin: 0;
  color: #333;
}

.add-note-btn {
  padding: 6px 12px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.add-note-btn:hover {
  background-color: #218838;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.note-item {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  border-left: 4px solid #17a2b8;
}

.note-content {
  margin-bottom: 10px;
  line-height: 1.5;
  color: #333;
}

.note-meta {
  font-size: 12px;
  color: #6c757d;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.note-actions {
  display: flex;
  gap: 8px;
}

.note-edit-btn,
.note-delete-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.note-edit-btn {
  background-color: #ffc107;
  color: #212529;
}

.note-edit-btn:hover {
  background-color: #e0a800;
}

.note-delete-btn {
  background-color: #dc3545;
  color: white;
}

.note-delete-btn:hover {
  background-color: #c82333;
}

.note-edit-form {
  margin-top: 10px;
}

.note-edit-textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.note-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.note-save-btn,
.note-cancel-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.note-save-btn {
  background-color: #28a745;
  color: white;
}

.note-save-btn:hover {
  background-color: #218838;
}

.note-cancel-btn {
  background-color: #6c757d;
  color: white;
}

.note-cancel-btn:hover {
  background-color: #5a6268;
}

/* Media Player Note Styling */
.media-player .note-item .note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #666;
}

.media-player .note-item .note-timestamp {
  cursor: pointer;
  color: #007bff;
  text-decoration: underline;
}

.media-player .note-item .note-timestamp:hover {
  color: #0056b3;
}

.media-player .note-item .note-actions {
  display: flex;
  gap: 4px;
}

.media-player .note-item .edit-note-btn,
.media-player .note-item .delete-note-btn {
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-player .note-item .edit-note-btn:hover {
  background: #0056b3;
}

.media-player .note-item .delete-note-btn {
  background: #dc3545;
}

.media-player .note-item .delete-note-btn:hover {
  background: #c82333;
}

.no-notes {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 20px;
}

/* Notes view styles */
.notes-view {
  padding: 20px;
}

.notes-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.notes-view-header h3 {
  margin: 0;
  color: #333;
}

.notes-sort-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.notes-sort-controls select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: white;
}

.all-notes-list {
  display: grid;
  gap: 20px;
}

.all-note-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #17a2b8;
}

.all-note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.all-note-pdf-info {
  flex: 1;
}

.all-note-pdf-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.all-note-page-info {
  font-size: 14px;
  color: #6c757d;
}

.all-note-date {
  font-size: 12px;
  color: #6c757d;
  text-align: right;
}

.all-note-content {
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
}

.all-note-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.all-note-edit-btn,
.all-note-delete-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.all-note-edit-btn {
  background-color: #ffc107;
  color: #212529;
}

.all-note-edit-btn:hover {
  background-color: #e0a800;
}

.all-note-delete-btn {
  background-color: #dc3545;
  color: white;
}

.all-note-delete-btn:hover {
  background-color: #c82333;
}

/* Responsive design for notes */
@media (max-width: 768px) {
  .viewer-content {
    flex-direction: column;
  }

  .notes-panel {
    width: 100%;
    max-height: 300px;
  }

  .notes-view-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .notes-sort-controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* Todo App Styles */
.todo-container {
  max-width: 800px;
  margin: 0 auto;
}

.todo-header {
  background: white;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.todo-header h2 {
  color: #333;
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.todo-header p {
  color: #666;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
}

.todo-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.stat-label {
  font-size: 0.7rem;
  color: #666;
  font-weight: 500;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #007bff;
}

.todo-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.todo-search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.todo-search-input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.todo-search-input:focus {
  outline: none;
  border-color: #007bff;
}

.todo-search-clear-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.todo-search-clear-btn:hover {
  color: #333;
}

.add-todo-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.add-todo-btn:hover {
  background-color: #218838;
}

.settings-btn {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.settings-btn:hover {
  background-color: #5a6268;
}

.todo-filters {
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-filters,
.priority-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn,
.priority-filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.filter-btn:hover,
.priority-filter-btn:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
}

.filter-btn.active,
.priority-filter-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.priority-filter-btn.active[data-priority="high"] {
  background-color: #dc3545;
  border-color: #dc3545;
}

.priority-filter-btn.active[data-priority="medium"] {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #212529;
}

.priority-filter-btn.active[data-priority="low"] {
  background-color: #28a745;
  border-color: #28a745;
}

.tag-filters {
  flex: 1;
  min-width: 200px;
}

.tag-filter-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
  min-height: 38px;
}

.sort-options {
  min-width: 150px;
}

.sort-select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.todo-item {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #dee2e6;
  transition: all 0.2s;
}

.todo-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.todo-item.completed {
  opacity: 0.7;
  border-left-color: #28a745;
}

.todo-item.completed .todo-title {
  text-decoration: line-through;
  color: #6c757d;
}

.todo-item.high-priority {
  border-left-color: #dc3545;
}

.todo-item.medium-priority {
  border-left-color: #ffc107;
}

.todo-item.low-priority {
  border-left-color: #28a745;
}

.todo-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.todo-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  flex: 1;
}

.todo-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.todo-toggle-btn,
.todo-edit-btn,
.todo-delete-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.todo-toggle-btn {
  color: #28a745;
}

.todo-toggle-btn:hover {
  background-color: #d4edda;
}

.todo-edit-btn {
  color: #007bff;
}

.todo-edit-btn:hover {
  background-color: #cce7ff;
}

.todo-delete-btn {
  color: #dc3545;
}

.todo-delete-btn:hover {
  background-color: #f8d7da;
}

.todo-description {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.todo-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.todo-priority {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.priority-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.priority-high {
  background-color: #f8d7da;
  color: #721c24;
}

.priority-medium {
  background-color: #fff3cd;
  color: #856404;
}

.priority-low {
  background-color: #d4edda;
  color: #155724;
}

.todo-due-date {
  color: #6c757d;
}

.todo-due-date.overdue {
  color: #dc3545;
  font-weight: 500;
}

.todo-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.todo-tag {
  background-color: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

/* Form styles for todo modals */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-primary {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* Responsive design for todo app */
@media (max-width: 768px) {
  .todo-stats {
    gap: 1rem;
  }

  .todo-controls {
    flex-direction: column;
  }

  .todo-header-row {
    flex-direction: column;
    gap: 1rem;
  }

  .todo-actions {
    align-self: flex-end;
  }

  .form-row {
    flex-direction: column;
  }

  .form-actions {
    flex-direction: column;
  }
}

/* Responsive Design for Todo Filters */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .status-filters,
  .priority-filters {
    justify-content: center;
  }

  .tag-filters,
  .sort-options {
    min-width: auto;
    width: 100%;
  }

  .filter-btn,
  .priority-filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Empty state styles */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state p {
  margin-bottom: 1.5rem;
  color: #666;
}

/* Compact empty state for journal entries */
.journal-entries-section .empty-state {
  padding: 1rem;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

.journal-entries-section .empty-state-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.journal-entries-section .empty-state h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.journal-entries-section .empty-state p {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: #6c757d;
}

/* All Journal Entries Section */
.all-journal-entries-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.all-journal-entries-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.all-journal-entries-section h3 {
  color: #333;
  margin: 0;
  font-size: 1.25rem;
}

.return-to-today-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.return-to-today-btn:hover {
  background-color: #0056b3;
}

.all-journal-entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.all-journal-entry-item {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
  background-color: #fafafa;
  transition: all 0.2s;
  cursor: pointer;
}

.all-journal-entry-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
  background-color: white;
}

.all-journal-entry-date {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.all-journal-entry-preview {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Day grouping styles */
.journal-day-group {
  margin-bottom: 1.5rem;
}

.journal-day-header {
  background-color: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0 6px 6px 0;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.journal-day-entries {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.empty-state .add-todo-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.empty-state .add-todo-btn:hover {
  background-color: #218838;
}

/* Pulse animation for highlighting due todos */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
  }
}

/* Work Tracker Styles */
.work-tracker-container {
  max-width: 1200px;
  margin: 0 auto;
}

.work-tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.work-tracker-header h2 {
  color: #333;
  margin: 0;
}

.work-tracker-controls {
  display: flex;
  gap: 1rem;
}

.start-work-btn,
.stop-work-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.start-work-btn {
  background-color: #28a745;
  color: white;
}

.start-work-btn:hover {
  background-color: #218838;
}

.stop-work-btn {
  background-color: #dc3545;
  color: white;
}

.stop-work-btn:hover {
  background-color: #c82333;
}

.work-tracker-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

.work-tracker-right-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Calendar Widget Styles */
.calendar-widget {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: fit-content;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.calendar-header h3 {
  margin: 0;
  color: #333;
  font-size: 1rem;
}

.calendar-nav-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #007bff;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.calendar-nav-btn:hover {
  background-color: #e9ecef;
}

.calendar-grid {
  padding: 0.75rem;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 0.25rem;
}

.calendar-weekdays div {
  text-align: center;
  font-weight: 600;
  color: #6c757d;
  padding: 0.25rem;
  font-size: 0.75rem;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  position: relative;
  font-size: 0.8rem;
  min-height: 30px;
}

.calendar-day:hover {
  background-color: #f8f9fa;
}

.calendar-day.selected {
  background-color: #007bff;
  color: white;
}

.calendar-day.today {
  background-color: #e3f2fd;
  color: #1976d2;
  font-weight: 600;
}

.calendar-day.has-entries {
  background-color: #d4edda;
  color: #155724;
  font-weight: 600;
}

.calendar-day.has-entries::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background-color: #28a745;
  border-radius: 50%;
}

.calendar-day.other-month {
  color: #adb5bd;
}

/* Current Work Session Styles */
.current-work-session {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid #28a745;
}

.current-work-session h3 {
  color: #333;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.work-session-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.work-task-title {
  font-size: 1rem;
  font-weight: 600;
}

.work-timer {
  font-size: 1.5rem;
  font-weight: 700;
  color: #28a745;
  text-align: center;
  font-family: "Courier New", monospace;
}

.work-tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-tag {
  background-color: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Work Entries Section */
.work-entries-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.work-entries-section h3 {
  color: #333;
  margin-bottom: 1rem;
}

.work-entries-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-entry {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
  transition: all 0.2s;
}

.work-entry:hover {
  border-color: #007bff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.work-entry-in-progress {
  border-color: #28a745 !important;
  background-color: #f8fff9;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.in-progress-badge {
  background-color: #28a745;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.work-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.work-entry-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.work-entry-time {
  color: #6c757d;
  font-size: 0.9rem;
}

.work-entry-duration {
  font-weight: 600;
  color: #28a745;
  font-family: "Courier New", monospace;
}

.work-entry-description {
  color: #666;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0.5rem 0;
  white-space: pre-line;
}

.work-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.work-entry-tag {
  background-color: #f8f9fa;
  color: #495057;
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  font-size: 0.75rem;
}

.work-entry-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.work-entry-actions button {
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.edit-work-btn {
  background-color: #007bff;
  color: white;
}

.edit-work-btn:hover {
  background-color: #0056b3;
}

.delete-work-btn {
  background-color: #dc3545;
  color: white;
}

.delete-work-btn:hover {
  background-color: #c82333;
}

/* Tags Dropdown Styles */
.tags-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.tags-dropdown-item {
  padding: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tags-dropdown-item:hover {
  background-color: #f8f9fa;
}

.tags-dropdown-item.selected {
  background-color: #007bff;
  color: white;
}

/* Journal Styles */
.journal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.journal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.journal-header h2 {
  color: #333;
  margin: 0;
  font-size: 2rem;
}

.journal-controls {
  display: flex;
  gap: 1rem;
}

.add-journal-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-journal-btn:hover {
  background-color: #218838;
}

.journal-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
}

.journal-calendar-widget {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
}

.journal-right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.journal-entries-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.journal-entries-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.journal-entries-section h3 {
  color: #333;
  margin: 0;
  font-size: 1.25rem;
}

.journal-entries-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.journal-entry {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1.5rem;
  transition: all 0.2s;
  background-color: #fafafa;
}

.journal-entry:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
  background-color: white;
}

.journal-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.journal-entry-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.journal-entry-time {
  color: #6c757d;
  font-size: 0.9rem;
}

.journal-entry-content {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  white-space: pre-line;
}

.journal-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.journal-entry-tag {
  background-color: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* YouTube embed container */
.youtube-embed-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.youtube-embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Instagram embed container */
.instagram-embed-container {
  position: relative;
  width: 100%;
  max-width: 540px;
  min-height: 680px;
  margin: 1rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: #f9f9f9;
}

.instagram-embed {
  position: relative;
  width: 100%;
  height: 680px;
  min-height: 680px;
  border: none;
  border-radius: 8px;
}

.journal-entry-actions {
  display: flex;
  gap: 0.5rem;
}

.journal-entry-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.edit-journal-btn {
  background-color: #007bff;
  color: white;
}

.edit-journal-btn:hover {
  background-color: #0056b3;
}

.delete-journal-btn {
  background-color: #dc3545;
  color: white;
}

.delete-journal-btn:hover {
  background-color: #c82333;
}

.decrypt-journal-btn {
  background-color: #17a2b8;
  color: white;
}

.decrypt-journal-btn:hover {
  background-color: #138496;
}

/* Checkbox styles */
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-label .checkmark {
  margin-right: 0.5rem;
}

/* Encrypted entry indicators */
.journal-entry.encrypted {
  border-left: 4px solid #007bff;
  background-color: #f8f9ff;
}

.journal-entry.encrypted .journal-entry-title::before {
  content: "🔒 ";
  margin-right: 0.5rem;
}

.journal-entry.encrypted .journal-entry-content {
  font-style: italic;
  color: #6c757d;
}

/* Password modal styles */
.password-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.password-modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
}

.password-modal h3 {
  margin-bottom: 1rem;
  color: #333;
}

.password-modal .form-group {
  margin-bottom: 1rem;
}

.password-modal input[type="password"],
.password-modal input[type="text"]#entryPassword {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: monospace;
  letter-spacing: 0.2em;
}

.password-modal .form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Responsive Design for Work Tracker */
@media (max-width: 768px) {
  .work-tracker-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-tracker-right-column {
    gap: 0.75rem;
    order: 1; /* First: Work Progress Tracker content */
  }

  .calendar-widget {
    order: 4; /* Last: Calendar */
  }

  .work-tracker-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .work-tracker-controls {
    width: 100%;
    justify-content: center;
  }

  .calendar-day {
    font-size: 0.8rem;
  }

  .work-timer {
    font-size: 1.5rem;
  }

  .work-entry-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Mobile Modal Adjustments */
  .modal-content {
    width: 95%;
    max-width: none;
    padding: 1.5rem;
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .modal-content form {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem; /* Space for scrollbar */
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .form-row .form-group {
    width: 100%;
  }

  /* Mobile button layout - side by side */
  .form-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-between;
  }

  .form-actions button {
    flex: 1;
    min-width: 0;
  }

  .modal-content input[type="datetime-local"] {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px; /* Better touch target */
  }

  /* Mobile Tab Adjustments */
  .tab-navigation {
    display: none;
  }

  /* Mobile Journal Adjustments */
  .journal-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .journal-calendar-widget {
    order: 2; /* Calendar after entries on mobile */
  }

  .journal-right-column {
    order: 1; /* Entries first on mobile */
  }

  .journal-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .journal-controls {
    width: 100%;
    justify-content: center;
  }
}

/* Checkbox Styles */
.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: #eee;
  border: 2px solid #ddd;
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
  transition: all 0.2s;
}

.checkbox-label:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-label input:checked ~ .checkmark {
  background-color: #007bff;
  border-color: #007bff;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Media Player Styles */
.media-list {
  padding: 1rem;
}

.media-list h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

.media-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.filter-btn:hover {
  background-color: #e9ecef;
}

.filter-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.media-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.media-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.media-icon {
  font-size: 2rem;
  min-width: 3rem;
  text-align: center;
}

.media-details {
  flex: 1;
  min-width: 0;
}

.media-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-artist {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-album {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.media-progress {
  margin-top: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.progress-fill {
  height: 100%;
  background-color: #007bff;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: #666;
}

.no-media {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Media Player Interface */
.media-player {
  padding: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.back-btn {
  padding: 0.5rem 1rem;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.back-btn:hover {
  background-color: #5a6268;
}

.player-header h3 {
  margin: 0;
  flex: 1;
  color: #333;
}

.media-info {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.player-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.audio-player,
.video-player {
  width: 100%;
}

.audio-player audio,
.video-player video {
  width: 100%;
  height: auto;
}

.audio-info {
  padding: 1rem;
  background-color: #f8f9fa;
}

.audio-metadata {
  text-align: center;
}

.audio-artist {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.25rem;
}

.audio-album {
  font-size: 0.9rem;
  color: #666;
}

.player-controls {
  padding: 1rem;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.play-pause-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.play-pause-btn:hover {
  background-color: #e9ecef;
}

.progress-slider {
  flex: 1;
  min-width: 200px;
}

.time-info {
  display: flex;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: #666;
  min-width: 80px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mute-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
}

.volume-slider {
  width: 80px;
}

.playback-rate {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.playback-rate label {
  color: #666;
}

.playback-rate select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: white;
}

.notes-toggle-btn,
.bookmark-btn {
  padding: 0.5rem 1rem;
  background-color: #17a2b8;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.notes-toggle-btn:hover,
.bookmark-btn:hover {
  background-color: #138496;
}

/* Notes and Bookmarks Panels */
.notes-panel,
.bookmarks-panel {
  margin-top: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.notes-panel h4,
.bookmarks-panel h4 {
  margin: 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  color: #333;
}

.notes-controls {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.add-note-btn {
  padding: 0.5rem 1rem;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-note-btn:hover {
  background-color: #218838;
}

.notes-list,
.bookmarks-list {
  max-height: 300px;
  overflow-y: auto;
}

.note-item,
.bookmark-item {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.note-item:last-child,
.bookmark-item:last-child {
  border-bottom: none;
}

.note-header,
.bookmark-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.note-timestamp,
.bookmark-title {
  font-weight: 600;
  color: #007bff;
  cursor: pointer;
  text-decoration: underline;
}

.note-timestamp:hover,
.bookmark-title:hover {
  color: #0056b3;
}

.bookmark-timestamp {
  font-size: 0.8rem;
  color: #666;
}

.delete-note-btn,
.delete-bookmark-btn {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.delete-note-btn:hover,
.delete-bookmark-btn:hover {
  background-color: #f8d7da;
}

.note-content,
.bookmark-note {
  color: #333;
  line-height: 1.4;
}

/* Modal Styles for Media Player */
#addMediaNoteModal .modal-content,
#addMediaBookmarkModal .modal-content {
  max-width: 500px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .media-items {
    grid-template-columns: 1fr;
  }

  .player-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .progress-slider {
    min-width: auto;
  }

  .volume-control {
    justify-content: center;
  }

  .playback-rate {
    justify-content: center;
  }

  .player-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .media-info {
    justify-content: center;
  }
}

/* GPX Heatmap Styles */
.gpx-map-container {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gpx-sidebar {
  width: 320px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition: transform 0.3s ease, width 0.3s ease, margin-left 0.3s ease;
  position: relative;
}

/* Sidebar collapse button */
.gpx-sidebar-collapse-btn {
  position: fixed;
  top: 135px;
  left: 0;
  width: 40px;
  height: 40px;
  background: #007bff;
  border: none;
  border-radius: 0 8px 8px 0;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 20px;
  padding: 0;
}

.gpx-sidebar-collapse-btn:hover {
  background: #0056b3;
}

.gpx-sidebar-collapse-btn .collapse-icon {
  transition: transform 0.3s ease;
  display: inline-block;
}

/* Collapsed sidebar state - Desktop only */
@media (min-width: 769px) {
  .gpx-sidebar.collapsed {
    margin-left: -320px; /* Hide sidebar to the left */
    border-right: none;
  }

  /* When sidebar is NOT collapsed, button at right edge */
  .gpx-sidebar:not(.collapsed) + .gpx-map .gpx-sidebar-collapse-btn,
  .gpx-sidebar-collapse-btn {
    left: 320px;
  }

  /* When sidebar IS collapsed, button at left edge */
  .gpx-sidebar.collapsed + .gpx-map ~ .gpx-sidebar-collapse-btn,
  .gpx-map-container:has(.gpx-sidebar.collapsed) .gpx-sidebar-collapse-btn {
    left: 0;
  }

  .gpx-sidebar.collapsed ~ * .collapse-icon,
  .gpx-map-container:has(.gpx-sidebar.collapsed) .collapse-icon {
    transform: rotate(180deg);
  }
}

/* Mobile collapsed state (different behavior) */
@media (max-width: 768px) {
  .gpx-sidebar.collapsed {
    transform: translateX(-100%);
    border-right: none;
  }
}

/* GPX Control Buttons Container */
.gpx-control-buttons {
  position: absolute;
  bottom: 80px;
  right: 20px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 1002;
}

/* Individual Control Button */
.gpx-control-btn {
  width: 50px;
  height: 50px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  font-size: 24px;
  padding: 0;
}

.gpx-control-btn:hover {
  background: #0056b3;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gpx-control-btn:active {
  transform: scale(0.95);
}

/* Display mode states for routes toggle button */
.gpx-control-btn#heatmapToggleBtn.mode-hidden {
  opacity: 0.5;
  background: #6c757d;
}

.gpx-control-btn#heatmapToggleBtn.mode-routes {
  background: rgba(0, 123, 255, 0.9);
  color: white;
}

/* Location centering toggle states */
.gpx-control-btn#locationCenterToggleBtn.active {
  background: #28a745;
}

.gpx-control-btn#locationCenterToggleBtn.inactive {
  background: #6c757d;
  opacity: 0.6;
}

.gpx-control-btn#locationCenterToggleBtn.inactive:hover {
  opacity: 1;
}

/* Recording toggle button states */
.gpx-control-btn#recordToggleBtn.inactive {
  background: #6c757d;
  opacity: 0.6;
}

.gpx-control-btn#recordToggleBtn.inactive:hover {
  opacity: 1;
}

.gpx-control-btn#recordToggleBtn.active.recording {
  background: #dc3545;
  animation: recording-pulse 2s ease-in-out infinite;
}

@keyframes recording-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* Create Track Button States */
.gpx-control-btn#createTrackBtn.inactive {
  background: #6c757d;
  opacity: 0.6;
}

.gpx-control-btn#createTrackBtn.inactive:hover {
  opacity: 1;
}

.gpx-control-btn#createTrackBtn.active {
  background: #28a745;
  animation: create-track-pulse 2s ease-in-out infinite;
}

@keyframes create-track-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Manual Track Creation Controls */
.gpx-create-track-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  min-width: 250px;
  max-width: 350px;
}

.gpx-create-track-info {
  margin-bottom: 10px;
}

.gpx-create-track-info span {
  display: block;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.gpx-create-track-actions {
  display: flex;
  gap: 10px;
}

.gpx-save-track-btn,
.gpx-cancel-track-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
}

.gpx-save-track-btn {
  background: #28a745;
  color: white;
}

.gpx-save-track-btn:hover:not(:disabled) {
  background: #218838;
  transform: scale(1.05);
}

.gpx-save-track-btn:disabled {
  background: #6c757d;
  opacity: 0.5;
  cursor: not-allowed;
}

.gpx-cancel-track-btn {
  background: #dc3545;
  color: white;
}

.gpx-cancel-track-btn:hover {
  background: #c82333;
  transform: scale(1.05);
}

/* Show All Routes button */
.gpx-show-all-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(0, 123, 255, 0.9);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s;
}

.gpx-show-all-btn:hover {
  background: rgba(0, 123, 255, 1);
  transform: scale(1.05);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .gpx-sidebar-collapse-btn {
    display: flex;
  }

  .gpx-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    z-index: 4;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .gpx-sidebar.collapsed {
    transform: translateX(-100%);
    width: 280px;
  }

  .gpx-map {
    width: 100%;
  }

  .gpx-show-all-btn {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: calc(100% - 20px);
  }

  .gpx-heatmap-toggle-btn {
    bottom: 80px;
    right: 10px;
  }
}

.gpx-sidebar-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.gpx-sidebar-header h3 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 18px;
}

.gpx-stats {
  margin-bottom: 0;
}

.gpx-stats div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 13px;
  color: #666;
}

.gpx-stats div span:last-child {
  font-weight: 600;
  color: #333;
}

.gpx-filters {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.gpx-filters select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 8px;
}

.gpx-filters .filter-input {
  margin-top: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gpx-filters .filter-input.hidden {
  display: none;
}

.gpx-filters .filter-input label {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}

.gpx-filters .filter-input input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.gpx-filters .filter-input input[type="date"] {
  min-width: 140px;
}

.gpx-track-list {
  flex: 1;
  overflow-y: auto;
  padding: 5px;
}

.gpx-track-item {
  padding: 12px;
  margin: 5px;
  border-radius: 6px;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.gpx-track-item:hover {
  background: #e9ecef;
  border-left-color: #007bff;
}

.gpx-track-item.active {
  background: #e7f3ff;
  border-left-color: #0056b3;
}

.gpx-track-item-title {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  font-size: 14px;
}

.gpx-track-item-details {
  font-size: 12px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gpx-track-item-detail {
  display: flex;
  align-items: center;
  gap: 3px;
}

.garmin-export-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.garmin-export-btn:hover {
  background: #218838;
}

#resetViewBtn {
  display: none; /* Hidden by default, shown in routes view */
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 4;
  padding: 10px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
  align-items: center;
  gap: 6px;
}

#resetViewBtn:hover {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gpx-actions {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.gpx-actions button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.gpx-actions button:hover {
  background: #0056b3;
}

.gpx-actions button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.gpx-map {
  flex: 1;
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 1;
}

.gpx-track-info {
  position: absolute;
  bottom: 80px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: none;
}

.gpx-track-info h4 {
  margin: 0 0 10px 0;
  color: #333;
}

.gpx-track-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.gpx-track-stat {
  text-align: center;
}

.gpx-track-stat-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
}

.gpx-track-stat-value {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.gpx-track-actions {
  display: flex;
  gap: 10px;
}

.gpx-track-actions button {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.gpx-track-actions .export-btn {
  background: #28a745;
  color: white;
}

.gpx-track-actions .export-btn:hover {
  background: #218838;
}

.gpx-track-actions .delete-track-btn {
  background: #dc3545;
  color: white;
}

.gpx-track-actions .delete-track-btn:hover {
  background: #c82333;
}

.gpx-track-actions .close-btn {
  background: #6c757d;
  color: white;
}

.gpx-track-actions .close-btn:hover {
  background: #5a6268;
}

/* GPX Loading Overlay */
.gpx-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpx-loading-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 90%;
  width: 400px;
}

.gpx-loading-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 1.5rem;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.gpx-loading-title {
  margin: 0 0 1.5rem 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.gpx-loading-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.gpx-loading-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gpx-loading-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.gpx-loading-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #007bff;
}

.gpx-loading-progress {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gpx-loading-progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.gpx-loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.gpx-loading-progress-text {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

/* Mobile optimizations for loading overlay */
@media (max-width: 768px) {
  .gpx-loading-content {
    width: 85%;
    padding: 1.5rem;
  }

  .gpx-loading-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .gpx-loading-stats {
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
  }

  .gpx-loading-stat-label {
    font-size: 0.65rem;
  }

  .gpx-loading-stat-value {
    font-size: 1rem;
  }

  .gpx-loading-spinner {
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
  }
}

.error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.success {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: rgba(40, 167, 69, 0.9);
  color: white;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}
