/* Mobile Compact Navigation - Space Efficient */

/* Hide desktop navigation on mobile */
@media (max-width: 768px) {
  .left-nav {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }
  
  .bottom-brand {
    display: none !important;
  }
}

/* Compact Mobile Header */
.mobile-compact-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  z-index: 200;
  display: none;
  min-height: 56px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .mobile-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Ensure authentication buttons are always visible */
  .mobile-login-btn,
  .mobile-signup-btn,
  .mobile-logout-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .mobile-compact-header {
    padding: 6px 8px;
    min-height: 52px;
  }
  
  .mobile-header-controls {
    gap: 4px;
  }
  
  .mobile-control-btn {
    min-width: 26px;
    height: 26px;
    font-size: 10px;
    padding: 3px 5px;
  }
  
  .mobile-login-btn,
  .mobile-signup-btn,
  .mobile-logout-btn {
    min-width: 28px;
    height: 28px;
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .mobile-brand-text {
    font-size: 0.7rem;
  }
}

/* Logo and Title - Compact */
.mobile-logo-compact {
  display: flex !important;
  align-items: center;
  gap: 8px;
  visibility: visible !important;
  opacity: 1 !important;
}

.mobile-logo-compact img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.mobile-brand-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text);
  margin-left: 4px;
}


/* Progress Indicator - Compact */
.mobile-progress {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Header Controls - Compact */
.mobile-header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mobile-control-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-weight: 500;
}

/* Mobile Settings Panel */
.mobile-settings-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg, #000000);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border, rgba(255, 255, 255, 0.2));
  z-index: 300;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-settings-panel.show {
  right: 0;
}

.mobile-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.2));
  background: var(--panel, rgba(0, 0, 0, 0.8));
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mobile-settings-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.mobile-settings-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-settings-close:hover {
  background: var(--border);
  color: var(--text);
}

.mobile-settings-content {
  padding: 24px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Custom scrollbar for settings content */
.mobile-settings-content::-webkit-scrollbar {
  width: 6px;
}

.mobile-settings-content::-webkit-scrollbar-track {
  background: var(--panel);
  border-radius: 3px;
}

.mobile-settings-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.mobile-settings-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Notification Status Styles */
.mobile-notification-status {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 0;
}

.status-item:last-child {
  margin-bottom: 0;
}

.status-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.status-value {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-value.granted {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.status-value.denied {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.status-value.default {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.status-value.enabled {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.status-value.disabled {
  color: #6b7280;
  background: rgba(107, 114, 128, 0.1);
}

.mobile-settings-section {
  margin-bottom: 24px;
  background: var(--panel, rgba(0, 0, 0, 0.6));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Theme-specific mobile settings panel backgrounds */
.theme-light .mobile-settings-panel {
  background: #ffffff;
  border-left-color: #e2e8f0;
}

.theme-light .mobile-settings-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.theme-light .mobile-settings-content {
  background: #ffffff;
}

.theme-light .mobile-settings-section {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.theme-nature .mobile-settings-panel {
  background: rgba(34, 197, 94, 0.95);
  border-left-color: rgba(34, 197, 94, 0.3);
}

.theme-nature .mobile-settings-header {
  background: rgba(34, 197, 94, 0.8);
  border-bottom-color: rgba(34, 197, 94, 0.3);
}

.theme-nature .mobile-settings-content {
  background: rgba(34, 197, 94, 0.95);
}

.theme-nature .mobile-settings-section {
  background: rgba(34, 197, 94, 0.6);
  border-color: rgba(34, 197, 94, 0.3);
}

.mobile-settings-section h4 {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-auth-buttons,
.mobile-settings-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-settings-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
}

.mobile-settings-btn:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-settings-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.mobile-settings-label {
  flex: 1;
}

/* Authentication buttons in settings - special styling */
.mobile-settings-btn.mobile-login-btn,
.mobile-settings-btn.mobile-signup-btn,
.mobile-settings-btn.mobile-logout-btn {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border: 1px solid var(--accent);
  color: white;
  font-weight: 600;
}

.mobile-settings-btn.mobile-login-btn:hover,
.mobile-settings-btn.mobile-signup-btn:hover,
.mobile-settings-btn.mobile-logout-btn:hover {
  background: linear-gradient(135deg, #8b5cf6, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile Form Elements */
.mobile-form-group {
  margin-bottom: 20px;
  width: 100%;
}

/* Ensure form groups have enough space */
.mobile-form-group input[type="number"] {
  display: block;
  width: 100%;
  max-width: 300px;
}

/* Pomodoro save button styling */
#mobile-save-pomo {
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

#mobile-save-pomo:hover {
  background: var(--accent-hover, var(--accent));
  transform: translateY(-1px);
}

#mobile-save-pomo:active {
  transform: translateY(0);
}

.mobile-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.mobile-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  min-width: 120px;
}

/* Specific styling for number inputs to ensure they have enough space */
.mobile-input[type="number"] {
  min-width: 150px;
  text-align: center;
}

/* Weekly target input should be extra wide */
#mobile-weekly-target {
  min-width: 250px;
  font-size: 18px;
  font-weight: 600;
  width: 100%;
  max-width: 400px;
  padding: 18px 24px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  text-align: center;
  box-sizing: border-box;
}

#mobile-weekly-target:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
}

#mobile-weekly-target:hover {
  border-color: var(--accent);
}

.mobile-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.mobile-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-input-row .mobile-input {
  flex: 1;
}

.mobile-save-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mobile-save-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.mobile-checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 0;
}

.mobile-checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.mobile-checkbox-group label {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}

.mobile-notification-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* Enhanced Notification Styles */
.mobile-notification-types {
  margin: 16px 0;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.mobile-notification-types h5 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-notification-status {
  margin-top: 16px;
  padding: 12px;
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.status-item:last-child {
  margin-bottom: 0;
}

.status-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.status-value {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  padding: 2px 8px;
  background: var(--card-bg);
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Notification Sound Preview */
.mobile-sound-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.mobile-sound-preview-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-sound-preview-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Notification History Modal */
.mobile-notification-history-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mobile-notification-history-modal.show {
  display: flex;
}

.mobile-notification-history-content {
  background: var(--card-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.mobile-notification-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-notification-history-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.mobile-notification-history-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-notification-history-close:hover {
  background: var(--border);
  color: var(--text);
}

.mobile-notification-history-list {
  padding: 16px 20px;
}

.mobile-notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-notification-item:hover {
  background: var(--accent-bg);
  border-color: var(--accent);
}

.mobile-notification-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.mobile-notification-content {
  flex: 1;
}

.mobile-notification-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.mobile-notification-message {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mobile-notification-time {
  font-size: 11px;
  color: var(--text-muted);
}

.mobile-notification-actions {
  display: flex;
  gap: 4px;
}

.mobile-notification-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-notification-action-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* Notification Badge */
.mobile-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  border: 2px solid var(--card-bg);
}

/* Enhanced Mobile Notifications */
.mobile-notification-toast {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-notification-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.mobile-notification-toast-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.mobile-notification-toast-icon {
  font-size: 20px;
}

.mobile-notification-toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.mobile-notification-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mobile-notification-toast-close:hover {
  background: var(--border);
  color: var(--text);
}

.mobile-notification-toast-message {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.mobile-notification-toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mobile-notification-toast-action {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-notification-toast-action:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.mobile-notification-toast-action.secondary {
  background: var(--border);
  color: var(--text);
}

.mobile-notification-toast-action.secondary:hover {
  background: var(--text-muted);
  color: white;
}


.mobile-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-control-btn.active {
  background: var(--accent);
  color: white;
}

/* Compact Navigation Panel */
.mobile-nav-panel {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  z-index: 190;
  display: none;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .mobile-nav-panel {
    display: block;
  }
}

.mobile-nav-panel.open {
  transform: translateY(0);
}

/* Horizontal Navigation Items */
.mobile-nav-items {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  -ms-overflow-style: auto;
  scroll-behavior: smooth;
}

.mobile-nav-items::-webkit-scrollbar {
  height: 4px;
}

.mobile-nav-items::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-nav-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.mobile-nav-items::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.mobile-nav-item {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.mobile-nav-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-item.active {
  background: var(--accent);
  color: white;
}

.mobile-nav-icon {
  font-size: 12px;
  line-height: 1;
}

.mobile-nav-label {
  font-size: 0.6rem;
  line-height: 1;
}

/* Adjust main content for mobile header */
@media (max-width: 768px) {
  .main-content {
    padding-top: 60px !important;
    margin-top: 0 !important;
  }
  
  .main-content.with-nav {
    padding-top: 60px !important;
    margin-top: 0 !important;
  }
  
  /* Ensure welcome section is visible */
  #welcome-section {
    margin-top: 0 !important;
    padding-top: 20px !important;
  }
  
  /* Fix any overlapping content */
  .page {
    padding-top: 0 !important;
  }
}

/* Compact Cards and Content */
@media (max-width: 768px) {
  .card {
    margin: 0;
    padding: 6px;
    border-radius: 8px;
  }
  
  .card:first-child {
    margin-top: 0 !important;
    border-radius: 0 0 8px 8px !important;
  }
  
  .section h2 {
    font-size: 1.2rem;
    margin: 8px 0;
  }
  
  .input {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .primary, .secondary {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .task-item {
    padding: 16px;
    margin: 8px 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .task-item .row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .task-checkbox {
    align-self: center;
    order: 1;
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
  }
  
  .task-title {
    order: 2;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px 0;
    padding: 0 8px;
  }
  
  .task-meta {
    order: 3;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 8px 0;
  }
  
  .task-actions {
    order: 4;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
  }
  
  .countdown-container {
    padding: 12px;
  }
  
  .countdown-item {
    padding: 8px;
  }
  
  .modal-content {
    margin: 20px;
    padding: 16px;
    max-height: 80vh;
    overflow-y: auto;
  }
  
  /* Deadline Section Mobile Optimizations */
  .countdown {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin: 12px auto;
    padding: 0 4px;
    max-width: 100%;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }
  
  .countdown::-webkit-scrollbar {
    height: 3px;
  }
  
  .countdown::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .countdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }
  
  .countdown .segment {
    text-align: center;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-width: 60px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .countdown .num {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
    line-height: 1.2;
    word-break: break-all;
    overflow-wrap: break-word;
  }
  
  .countdown .label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* Ensure deadline section is fully visible */
  #deadline-section {
    min-height: auto;
    overflow: visible;
  }
  
  #deadline-section .card {
    overflow: visible;
  }
  
  /* Ensure pomodoro section is fully visible */
  #pomodoro-section {
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  #pomodoro-section .card {
    overflow-y: auto;
    overflow-x: hidden;
  }
  
  /* Mobile row adjustments */
  .row {
    flex-direction: column;
    gap: 8px;
  }
  
  .row input,
  .row button {
    width: 100%;
  }
  
  
  /* Notes Section Mobile Optimizations */
  #notes-section {
    margin-top: 0 !important;
  }
  
  #notes-section .section {
    padding: 4px !important;
    margin: 0 !important;
    border-radius: 0 0 8px 8px !important;
  }
  
  #notes-section .row {
    margin-bottom: 4px !important;
    gap: 2px;
  }
  
  #notes-section h2 {
    margin: 2px 0 !important;
    font-size: 1rem !important;
  }
  
  #notes-section .section-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }
  
  #notes-section .section-actions button {
    width: 100%;
    margin: 0 !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
  }
  
  .notes-grid {
    margin-top: 2px !important;
    gap: 4px !important;
  }
  
  .notes-empty {
    padding: 10px 5px !important;
  }
  
  .notes-empty .empty-icon {
    font-size: 24px !important;
    margin-bottom: 4px !important;
  }
  
  .notes-empty h4 {
    font-size: 14px !important;
    margin: 0 0 2px 0 !important;
  }
  
  .notes-empty p {
    font-size: 11px !important;
  }
  
  /* Mobile-specific countdown fixes */
  /* Hide summary text on mobile */
  #countdown-human {
    display: none !important;
  }
  
  /* Mobile countdown - restructured with rows */
  .countdown.mobile-restructured {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    margin: 12px 0;
    width: 100%;
  }
  
  .countdown-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  /* Row 1: Year, Month, Day, Hour */
  .countdown-row:first-child .segment {
    flex: 1;
    min-width: calc(25% - 6px);
    max-width: calc(25% - 6px);
  }
  
  /* Row 2: Min, Sec, Micro, Milli */
  .countdown-row:nth-child(2) .segment {
    flex: 1;
    min-width: calc(25% - 6px);
    max-width: calc(25% - 6px);
  }
  
  /* Row 3: Nano (centered) */
  .countdown-row:last-child .segment {
    flex: 0 0 auto;
    min-width: calc(50% - 4px);
    max-width: calc(50% - 4px);
  }
  
  /* Mobile countdown segment styling */
  .countdown.mobile-restructured .segment {
    padding: 16px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }
  
  .countdown.mobile-restructured .num {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--accent);
    line-height: 1.2;
    display: block;
    white-space: nowrap;
    margin-bottom: 8px;
  }
  
  .countdown.mobile-restructured .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
  }
  
  /* Heatmap Mobile Fixes */
  /* Hide month labels on mobile */
  .heatmap-months {
    display: none !important;
  }
  
  .heatmap-left-labels {
    width: 40px !important;
    font-size: 0.7rem !important;
  }
  
  .heatmap-cell {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
  }
  
  .heatmap-grid {
    gap: 2px !important;
  }
  
  .heatmap-col {
    gap: 2px !important;
  }
  
  .heatmap-body {
    gap: 6px !important;
    margin-left: 0 !important;
  }
  
  
}

/* Hide/show animation */
.mobile-nav-panel.closing {
  transform: translateY(-100%);
}

/* Smooth transitions */
* {
  transition: all 0.2s ease;
}

/* Mobile Toast Notifications */
.mobile-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: #2196F3;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  max-width: 90%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-toast-success {
  background: #4CAF50;
}

.mobile-toast-error {
  background: #F44336;
}

.mobile-toast-warning {
  background: #FF9800;
}

.mobile-toast-info {
  background: #2196F3;
}

/* Touch optimizations */
@media (max-width: 768px) {
  button, .mobile-nav-item, .mobile-control-btn {
    min-height: 44px;
    min-width: 44px;
  }
}
