/* Tracker Page Styles */

.tracker-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 80px);
}

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

.tracker-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  margin: 0;
}

.tracker-date-container {
  position: relative;
  display: flex;
  align-items: center;
}

.tracker-date-wrapper {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  pointer-events: auto;
  z-index: 100;
  user-select: none;
}

.tracker-date-wrapper:hover {
  border-color: rgba(0, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.tracker-date {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  white-space: nowrap;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.tracker-date:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Mini Calendar Popup */
.mini-calendar-popup {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 255, 255, 0.2);
  z-index: 1000;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.mini-calendar-popup.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.mini-calendar-month-year {
  flex: 1;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mini-calendar-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 6px;
  color: var(--neon-cyan);
  font-size: 1.2rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.mini-calendar-nav-btn:hover {
  background: rgba(0, 255, 255, 0.2);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
  transform: scale(1.1);
}

.mini-calendar-nav-btn:active {
  transform: scale(0.95);
}

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

.mini-calendar-day-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  padding: 4px 0;
  letter-spacing: 0.05em;
}

.mini-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.mini-calendar-day:hover:not(.other-month):not(.future-day) {
  background: rgba(0, 255, 255, 0.2);
  color: white;
  transform: scale(1.1);
}

.mini-calendar-day.today {
  background: rgba(0, 255, 255, 0.3);
  color: white;
  font-weight: 700;
  border: 1px solid var(--neon-cyan);
}

.mini-calendar-day.selected {
  background: rgba(0, 255, 255, 0.5);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.mini-calendar-day.past-day {
  opacity: 0.7;
}

.mini-calendar-day.future-day {
  opacity: 0.4;
  cursor: not-allowed;
}

.mini-calendar-day.future-day:hover {
  transform: none;
  background: transparent;
}

.mini-calendar-day.has-meals {
  background: rgba(0, 255, 200, 0.2);
  border-color: rgba(0, 255, 200, 0.5);
  position: relative;
}

.mini-calendar-day.has-meals::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #00ffc8;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 255, 200, 0.8);
}

.mini-calendar-day.has-meals.selected {
  background: rgba(0, 255, 255, 0.5);
  border-color: var(--neon-cyan);
}

.mini-calendar-day.has-meals.selected::after {
  background: black;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.mini-calendar-day.has-meals.today {
  background: rgba(0, 255, 200, 0.25);
  border-color: rgba(0, 255, 200, 0.6);
}

.mini-calendar-day.has-meals.today::after {
  background: #00ffc8;
  box-shadow: 0 0 8px rgba(0, 255, 200, 0.8);
}

.mini-calendar-day.other-month {
  opacity: 0.3;
  cursor: default;
}

.mini-calendar-day.other-month:hover {
  transform: none;
  background: transparent;
}

.tracker-main {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

.tracker-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.food-entry-section {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 255, 255, 0.1);
  position: relative;
  z-index: 10;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.food-entry-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.food-entry-section:hover::before {
  opacity: 1;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  margin: 0 0 20px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  border-bottom: 2px solid rgba(0, 255, 255, 0.3);
  padding-bottom: 12px;
}

.food-search {
  margin-bottom: 24px;
  position: relative;
  z-index: 11;
}

.search-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  transition: all 0.3s ease;
  outline: none;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: text;
}

.search-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
}

.food-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  position: relative;
  z-index: 1;
}

/* Custom scrollbar for food list */
.food-list::-webkit-scrollbar {
  width: 8px;
}

.food-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.food-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.3);
  border-radius: 4px;
}

.food-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.5);
}

.brand-group {
  margin-bottom: 24px;
}

.brand-header {
  font-size: 16px;
  font-weight: 700;
  color: rgba(0, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.load-more-indicator {
  text-align: center;
  padding: 16px;
  margin-top: 16px;
}

.load-more-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-style: italic;
}

.food-item {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(0, 255, 255, 0.25);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 8px;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

.food-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 255, 255, 0.3);
}

.food-item:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 255, 255, 0.2);
}

.food-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.food-item-name {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  line-height: 1.5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  flex: 1;
  letter-spacing: 0.01em;
}

.food-item-calories-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.food-item-calories {
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.food-item-serving {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  white-space: nowrap;
}

.food-item-details {
  display: flex;
  gap: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  flex-wrap: wrap;
}

.food-item-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.food-item-detail span:first-child {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.food-item-detail span:last-child {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.summary-panel {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 255, 0.3);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out 0.2s both;
  height: fit-content;
}

.summary-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.summary-panel:hover::before {
  opacity: 1;
}

.summary-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-stat {
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 12px;
}

.summary-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.summary-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.summary-stat-unit {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 4px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  border-radius: 4px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.6);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  position: relative;
  z-index: 1;
}

.empty-state a,
.empty-state .btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 1rem;
  line-height: 1.6;
}

.meal-item {
  position: relative;
}

.meal-delete-btn {
  background: rgba(255, 0, 0, 0.2);
  border: 1px solid rgba(255, 0, 0, 0.4);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
}

.meal-delete-btn:hover {
  background: rgba(255, 0, 0, 0.4);
  border-color: rgba(255, 0, 0, 0.6);
  transform: scale(1.1);
}

.food-added-message {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 255, 255, 0.3);
}

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

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

/* Responsive */
@media (max-width: 1024px) {
  .tracker-main {
    grid-template-columns: 1fr;
  }
  
  .summary-panel {
    order: -1;
  }
}

