* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: #f1f5f9;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.app-container {
  max-width: 500px;
  width: 100%;
  height: 100vh;
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.header {
  background: #1e293b;
  padding: 20px 20px 16px;
  flex-shrink: 0;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-btn {
  background: #334155;
  border: none;
  color: white;
  font-size: 20px;
  font-weight: bold;
  width: 48px;
  height: 48px;
border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.nav-btn:active {
  background: #475569;
  transform: scale(0.96);
}

.date-display {
  background: #0f172a;
  border-radius: 24px;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  flex: 1;
}

.date-display:active {
  background: #1e293b;
}

#bigDateDisplay {
  color: white;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.wheel-container {
  padding: 16px 12px;
  border-bottom: 1px solid #eef2ff;
  flex-shrink: 0;
}

.week-wheel {
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  display: flex;
  gap: 8px;
  padding-bottom: 8px;
}

.week-wheel::-webkit-scrollbar {
  height: 4px;
}

.week-wheel::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 10px;
}

.week-wheel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.day-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 70px;
  border-radius: 20px;
  padding: 10px 4px;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.day-card.has-value {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.day-card.active-day {
  background: #3b82f6;
  border-color: #3b82f6;
}

.day-card.active-day .day-name,
.day-card.active-day .day-value,
.day-card.active-day .day-date {
  color: white;
}

.day-name {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 6px;
}

.day-value {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.day-value.zero {
  color: #94a3b8;
  font-weight: 500;
  font-size: 16px;
}

.day-value.has-value {
  color: #059669;
}

.day-card.active-day .day-value.has-value {
  color: white;
}

.day-date {
  font-size: 11px;
  color: #94a3b8;
}

.day-card.active-day .day-date {
  color: rgba(255,255,255,0.8);
}

.editor {
  padding: 20px;
  border-bottom: 1px solid #eef2ff;
  flex-shrink: 0;
}

.number-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  border-radius: 60px;
  padding: 8px;
}

.num-btn {
  background: white;
  border: none;
  font-size: 28px;
  font-weight: bold;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.1s;
  color: #1e293b;
}

.num-btn:active {
  background: #e2e8f0;
  transform: scale(0.96);
}

.num-value {
  font-size: 32px;
  font-weight: 800;
  background: white;
  padding: 8px 20px;
  border-radius: 48px;
  min-width: 120px;
  text-align: center;
  font-family: monospace;
  color: #0f172a;
  cursor: pointer;
}

.num-value.has-value {
  color: #059669;
}

.num-value.zero {
  color: #94a3b8;
}

.hint {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 12px;
}

.stats {
  background: #fef9e3;
  margin: 16px;
  padding: 12px 20px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #92400e;
  flex-shrink: 0;
}

.total-value {
  background: #ffedd5;
  padding: 4px 16px;
  border-radius: 40px;
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 12px;
  padding: 0 16px 16px;
  flex-shrink: 0;
}

.action-btn {
  flex: 1;
  background: #eef2ff;
  border: none;
  padding: 14px 0;
  border-radius: 60px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.1s;
  color: #1e293b;
}

.action-btn.primary {
  background: #0f172a;
  color: white;
}

.action-btn:active {
  transform: scale(0.97);
}

.import-export {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 20px;
  flex-shrink: 0;
}

.import-export .action-btn {
  width: 100%;
  margin: 0;
  padding: 14px 0;
  border-radius: 60px;
  font-size: 14px;
}

.action-btn.secondary {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.action-btn.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

@media (max-width: 480px) {
  .day-card {
    min-width: 62px;
    padding: 8px 4px;
  }
  
  .day-value {
    font-size: 16px;
  }
  
  .day-value.zero {
    font-size: 14px;
  }
  
  .num-value {
    font-size: 28px;
    min-width: 100px;
  }
  
  .num-btn {
    width: 50px;
    height: 50px;
    font-size: 26px;
  }
  
  .action-btn {
    font-size: 13px;
    padding: 12px 0;
  }
}

.inline-number-input {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  background: white;
  border: 2px solid #3b82f6;
  border-radius: 48px;
  padding: 8px 20px;
  min-width: 120px;
  font-family: monospace;
  outline: none;
}

.inline-number-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.fuel-info {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 12px;
  margin: 0 16px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  animation: slideUp 0.2s ease;
}